setup.sh: restart agentbbs on (re)deploy so rebuilt binaries actually load

enable --now leaves an already-running service untouched, so a redeploy's new
binary never loaded. Use enable + restart.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-06-14 09:28:31 +00:00
parent 31c444829d
commit ceaf055e0e

View file

@ -457,7 +457,10 @@ systemctl reload caddy 2>/dev/null || systemctl restart caddy
log "configuring firewall + starting agentbbs"
ufw allow 22/tcp >/dev/null
ufw --force enable >/dev/null
systemctl enable --now agentbbs
# enable + restart (not just `enable --now`): a redeploy rebuilds the binary, and
# `enable --now` would leave the OLD process running, so the new build wouldn't load.
systemctl enable agentbbs >/dev/null 2>&1 || true
systemctl restart agentbbs
sleep 1
systemctl is-active --quiet agentbbs \