Compare commits

...
Author SHA1 Message Date
ksmithandClaude Sonnet 5 2068df471f install.sh: actually restart services when their unit files change
systemctl enable --now only starts a service if it's stopped — on a
re-run where a unit file's ExecStart changed (e.g. picking up a new
EVECTION_GUNICORN_BIND), the already-running process just kept running
on its old command line indefinitely. This is exactly what happened
switching gunicorn from a Unix socket to TCP: the new unit file was
written and daemon-reload'd, but gunicorn itself never restarted, so it
kept listening on the old socket. Restart explicitly instead of relying
on --now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-31 09:05:46 -06:00
+6 -1
View File
@@ -201,7 +201,12 @@ for unit in evection-gunicorn evection-celery-worker evection-celery-beat; do
"$APP_DIR/docs/deploy/${unit}.service" > "/etc/systemd/system/${unit}.service"
done
systemctl daemon-reload
systemctl enable --now evection-gunicorn evection-celery-worker evection-celery-beat
systemctl enable evection-gunicorn evection-celery-worker evection-celery-beat
# Not "enable --now": that only starts a service if it's stopped, so a
# re-run after a unit file changed (e.g. a new EVECTION_GUNICORN_BIND)
# would reload the daemon but leave the already-running process on its
# stale old ExecStart indefinitely. Always restart explicitly instead.
systemctl restart evection-gunicorn evection-celery-worker evection-celery-beat
echo
echo "==> Services installed. Checking status..."