diff --git a/deploy/S99garmin.sh b/deploy/S99garmin.sh old mode 100644 new mode 100755 diff --git a/deploy/push.sh b/deploy/push.sh index a7f25d1..8608693 100755 --- a/deploy/push.sh +++ b/deploy/push.sh @@ -15,7 +15,11 @@ # Never touches .env, .venv or the database on the far side. set -e -HOST="${1:-ericwyuan@192.168.50.64}" +# DHCP-assigned and has already changed once (192.168.50.64 -> .65 on the +# 2026-09-06 reboot) — this default will go stale again after the NAS's next +# reboot unless a DHCP reservation is set for it on the router. Until then, +# pass the current IP explicitly: `./deploy/push.sh ericwyuan@`. +HOST="${1:-ericwyuan@192.168.50.65}" PORT="${2:-2222}" # Needed for the sudo restart below. Prompted for rather than stored, and only # used over the already-authenticated ssh master connection. @@ -69,6 +73,18 @@ $TAR --exclude .venv --exclude .env --exclude __pycache__ \ # them. echo "==> deploy scripts" $TAR -C "$REPO/deploy" . | sh_ "tar xzf - -C '$APP/deploy'" +# tar carries whatever bit the local file has, and it silently had none: +# S99garmin.sh lost +x at some point before this repo existed, every deploy +# since then re-clobbered the NAS's copy back to non-executable, and nothing +# noticed until a 2026-09-06 reboot left the service down for two days — +# DSM's rc.d runner does not execute a script it cannot execute, and does not +# warn either. Asserted here so a future loss of the bit fails the deploy +# instead of failing silently at the next reboot. +sh_ "chmod +x '$APP/deploy/S99garmin.sh' '$APP/deploy/start.sh' '$APP/deploy/stop.sh'" +if ! sh_ "[ -x '$APP/deploy/S99garmin.sh' ]"; then + echo "S99garmin.sh is not executable after chmod — the boot script will not run on the next reboot" >&2 + exit 1 +fi echo "==> static (cleared first, so stale JS chunks do not pile up)" if [ ! -f "$REPO/client/build/index.html" ]; then