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