deploy
This commit is contained in:
parent
c165a6edae
commit
439b3732b5
1 changed files with 4 additions and 3 deletions
|
|
@ -587,7 +587,9 @@ jobs:
|
||||||
|
|
||||||
# Try to start it if it's stopped
|
# Try to start it if it's stopped
|
||||||
echo "🚀 Attempting to start backend..."
|
echo "🚀 Attempting to start backend..."
|
||||||
if timeout 30 sudo systemctl start mnemo_cards_server 2>&1; then
|
timeout 30 sudo systemctl start mnemo_cards_server 2>&1
|
||||||
|
START_EXIT_CODE=$?
|
||||||
|
if [ $START_EXIT_CODE -eq 0 ]; then
|
||||||
sleep 5 # Give more time to start
|
sleep 5 # Give more time to start
|
||||||
if timeout 30 sudo systemctl is-active --quiet mnemo_cards_server; then
|
if timeout 30 sudo systemctl is-active --quiet mnemo_cards_server; then
|
||||||
echo "✅ backend: started successfully"
|
echo "✅ backend: started successfully"
|
||||||
|
|
@ -596,8 +598,7 @@ jobs:
|
||||||
timeout 15 sudo systemctl status mnemo_cards_server --no-pager --lines=3 2>/dev/null || echo "Could not get status after start attempt"
|
timeout 15 sudo systemctl status mnemo_cards_server --no-pager --lines=3 2>/dev/null || echo "Could not get status after start attempt"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "❌ backend start command timed out or failed"
|
echo "❌ backend start command timed out or failed (exit code: $START_EXIT_CODE)"
|
||||||
sudo systemctl start mnemo_cards_server || echo "Start command failed"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue