From aad1a54dfddf8fd594d64f4ba6250e9236a189ea Mon Sep 17 00:00:00 2001 From: Yves Gugger Date: Wed, 17 Dec 2025 12:59:45 +0100 Subject: [PATCH] Deploy: detect systemd via /etc/systemd/system and restart services (no nohup) --- deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 1e5a71b..a7d260c 100755 --- a/deploy.sh +++ b/deploy.sh @@ -147,7 +147,7 @@ if ! $FRONTEND_ONLY; then echo " ✓ DB migrations applied" # Restart backend via systemd when available (preferred). Fallback to nohup only if the unit is missing. - if systemctl list-unit-files 2>/dev/null | grep -q '^pounce-backend\\.service'; then + if [ -f "/etc/systemd/system/pounce-backend.service" ]; then echo " Restarting backend via systemd..." echo "user" | sudo -S systemctl restart pounce-backend sleep 2 @@ -213,7 +213,7 @@ if ! $BACKEND_ONLY; then echo " ✓ Public files copied to standalone" # Restart frontend via systemd when available (preferred). Fallback to nohup only if the unit is missing. - if systemctl list-unit-files 2>/dev/null | grep -q '^pounce-frontend\\.service'; then + if [ -f "/etc/systemd/system/pounce-frontend.service" ]; then echo " Restarting frontend via systemd..." echo "user" | sudo -S systemctl restart pounce-frontend sleep 2