fix(systemd): set Restart=always and PUBSCRIPT_WEB_DIST in user service and force-restart on .deb install
CI / build (push) Waiting to run

This commit is contained in:
Schwitzz
2026-11-02 14:11:07 -06:00
parent 8b208affc4
commit 557a58af27
2 changed files with 7 additions and 5 deletions
+4 -3
View File
@@ -148,9 +148,10 @@ fi
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true
fi
# Stop any stale background server from a previous package build so the next
# launch or systemd restart serves the updated /opt/pubscript bundle cleanly.
pkill -f "/opt/pubscript/server/dist/server.mjs" >/dev/null 2>&1 || true
# Stop any stale background server from a previous package build so systemd
# (Restart=on-failure / Restart=always) or the next desktop launch starts the
# freshly installed /opt/pubscript server and asset bundle.
pkill -9 -f "/opt/pubscript/server/dist/server.mjs" >/dev/null 2>&1 || true
exit 0
EOF
chmod 0755 "$STAGE_DIR/DEBIAN/postinst"