From bb7907846e44771b3d6d76ab9ec15d15fa16fc8e Mon Sep 17 00:00:00 2001 From: Peter van Arkel Date: Tue, 19 May 2026 18:58:41 +0200 Subject: [PATCH] (bugfix) Restart systemd services during native updates Change the native installer to enable services and then explicitly restart web, worker, and scheduler so updated Django code is loaded after each install or update. Document that the installer refreshes app files and restarts systemd services as part of the normal update flow. --- README.md | 2 +- scripts/install-systemd | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 340f058..5653078 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ sudo scripts/install-systemd --non-interactive ``` The installer preserves an existing `/etc/pobsync/pobsync.env` unless you pass `--force-env`. It refreshes the installed -app, Python dependencies, migrations, static files, and systemd services. +app, Python dependencies, migrations, static files, and restarts the systemd services so new Django code is loaded. Then check: diff --git a/scripts/install-systemd b/scripts/install-systemd index ef844d2..19628d9 100755 --- a/scripts/install-systemd +++ b/scripts/install-systemd @@ -464,7 +464,8 @@ else note_step "Create Django superuser" "SKIPPED" fi -run_step "Enable and start services" systemctl enable --now pobsync-web.service pobsync-worker.service pobsync-scheduler.service +run_step "Enable services" systemctl enable pobsync-web.service pobsync-worker.service pobsync-scheduler.service +run_step "Restart services" systemctl restart pobsync-web.service pobsync-worker.service pobsync-scheduler.service if [ "$WITH_NGINX" -eq 1 ]; then if ! command -v nginx >/dev/null 2>&1; then