Compare commits

..
7 Commits
Author SHA1 Message Date
futile 5ee5a2cfb0 oops dont default to that 2026-07-25 21:36:41 +01:00
futile f6cfb706da sometimes do hot backups 2026-07-25 21:31:15 +01:00
futile 7d4f8ca9c5 home: update back urls 2026-07-24 16:43:49 +01:00
futile 3b661a698e update caddyfile 2026-07-24 16:41:00 +01:00
futile 132cc91d06 update caddyfile 2026-07-24 16:31:15 +01:00
futile 0fbe068197 update readme 2026-07-24 13:24:33 +01:00
futile 2ebf7ca958 scripts: update ssh port 2026-07-24 13:23:49 +01:00
7 changed files with 37 additions and 12 deletions
+13 -1
View File
@@ -5,9 +5,21 @@
atom.town { atom.town {
root * /srv/home root * /srv/home
file_server
encode zstd encode zstd
# /index.html -> /
@indexhtml path_regexp idx ^(.*/)index\.html$
redir @indexhtml {re.idx.1} permanent
# /something.html -> /something
@html path_regexp strip ^(.+)\.html$
redir @html {re.strip.1} permanent
# something -> something.html
try_files {path} {path}.html {path}/index.html
file_server
@assets path /assets/* @assets path /assets/*
header @assets Cache-Control "public, max-age=604800, immutable" header @assets Cache-Control "public, max-age=604800, immutable"
} }
+1
View File
@@ -11,3 +11,4 @@ here, you will be at home.
- [gitea](docs/services/gitea.md) - [gitea](docs/services/gitea.md)
- [backups](docs/backups.md) - [backups](docs/backups.md)
- [misc](docs/misc.md) - [misc](docs/misc.md)
- [todo](docs/todo.md)
+2 -1
View File
@@ -11,7 +11,8 @@ always remember to `docker compose stop` before doing any of this!
- to back up automatically, run `sudo EDITOR=micro crontab -e` and add the following: - to back up automatically, run `sudo EDITOR=micro crontab -e` and add the following:
``` ```
TZ=UTC TZ=UTC
0 6 * * * /home/admin/atom.town/scripts/volume-backup.sh 0 6 * * * /home/admin/atom.town/scripts/volume-backup.sh cold
0 0,12,18 * * * /home/admin/atom.town/scripts/volume-backup.sh hot
``` ```
**restoring** **restoring**
+1 -1
View File
@@ -25,7 +25,7 @@
<li>the mailserver also has a few other functions. it is an admin dashboard, which anyone can use to configure their own email account, and also the oidc (auth) provider.</li> <li>the mailserver also has a few other functions. it is an admin dashboard, which anyone can use to configure their own email account, and also the oidc (auth) provider.</li>
</ul> </ul>
</div> </div>
<a href="/" class="self-start font-normal pop">← back</a> <a href="/index.html" class="self-start font-normal pop">← back</a>
</div> </div>
</body> </body>
</html> </html>
+1 -1
View File
@@ -31,7 +31,7 @@
</ul> </ul>
</div> </div>
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<a href="/" class="self-start font-normal pop">← back</a> <a href="/index.html" class="self-start font-normal pop">← back</a>
<p class="font-extralight small">updated 2026-07-24 (<a href="https://git.atom.town/atom/town/commits/branch/main/home/terms-privacy.html" target="_blank" class="small">history</a>)</p> <p class="font-extralight small">updated 2026-07-24 (<a href="https://git.atom.town/atom/town/commits/branch/main/home/terms-privacy.html" target="_blank" class="small">history</a>)</p>
</div> </div>
</div> </div>
+3 -3
View File
@@ -109,14 +109,14 @@ banner bottom "installed cron"
banner top "configuring sshd" banner top "configuring sshd"
sudo tee /etc/ssh/sshd_config << 'EOF' sudo tee /etc/ssh/sshd_config << 'EOF'
Include /etc/ssh/sshd_config.d/*.conf Include /etc/ssh/sshd_config.d/*.conf
Port 67 Port 66
PermitRootLogin no PermitRootLogin no
PasswordAuthentication no PasswordAuthentication no
KbdInteractiveAuthentication no KbdInteractiveAuthentication no
EOF EOF
sudo semanage port -a -t ssh_port_t -p tcp 67 sudo semanage port -a -t ssh_port_t -p tcp 66
sudo systemctl restart sshd sudo systemctl restart sshd
banner bottom "configuring sshd" banner bottom "configuring sshd"
# finish # finish
echo -e "done! please log out and log back in with \e[1;5mssh -p 67 $(id -un)@$(curl -s https://checkip.amazonaws.com)\e[0m\n" echo -e "done! please log out and log back in with \e[1;5mssh -p 66 $(id -un)@$(curl -s https://checkip.amazonaws.com)\e[0m\n"
+16 -5
View File
@@ -8,19 +8,30 @@ function log() {
echo "[$(date -Iseconds)] $*" | tee -a "$LOG_FILE" echo "[$(date -Iseconds)] $*" | tee -a "$LOG_FILE"
} }
MODE="${1:-}"
if [[ "$MODE" != "cold" && "$MODE" != "hot" ]]; then
log "usage: $0 [cold|hot]" >&2
exit 1
fi
function cleanup() { function cleanup() {
log "cleanup: starting docker services" if [[ "$MODE" == "cold" ]]; then
docker compose start || true log "starting docker services"
docker compose start || true
fi
log "└───── backup finished ─────┘" log "└───── backup finished ─────┘"
} }
trap cleanup EXIT trap cleanup EXIT
log "┌────── backup started ─────┐" log "┌────── backup started ─────┐"
log "mode: $MODE"
cd "$WORKING_DIR" cd "$WORKING_DIR"
log "stopping docker services" if [[ "$MODE" == "cold" ]]; then
docker compose stop log "stopping docker services"
docker compose stop
fi
log "running backup" log "running backup"
/usr/local/bin/vykar backup /usr/local/bin/vykar backup 2>&1 | tee -a "$LOG_FILE"