Deploy: detect systemd via /etc/systemd/system and restart services (no nohup)
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled

This commit is contained in:
2025-12-17 12:59:45 +01:00
parent 815f08dac0
commit aad1a54dfd

View File

@ -147,7 +147,7 @@ if ! $FRONTEND_ONLY; then
echo " ✓ DB migrations applied" echo " ✓ DB migrations applied"
# Restart backend via systemd when available (preferred). Fallback to nohup only if the unit is missing. # 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 " Restarting backend via systemd..."
echo "user" | sudo -S systemctl restart pounce-backend echo "user" | sudo -S systemctl restart pounce-backend
sleep 2 sleep 2
@ -213,7 +213,7 @@ if ! $BACKEND_ONLY; then
echo " ✓ Public files copied to standalone" echo " ✓ Public files copied to standalone"
# Restart frontend via systemd when available (preferred). Fallback to nohup only if the unit is missing. # 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 " Restarting frontend via systemd..."
echo "user" | sudo -S systemctl restart pounce-frontend echo "user" | sudo -S systemctl restart pounce-frontend
sleep 2 sleep 2