mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Don't kill container on backend restart commanded
This commit is contained in:
@@ -5,9 +5,12 @@ export INSTALL_DIR=/app
|
||||
|
||||
# Check if there are any entries with cron_restart_backend
|
||||
if grep -q "cron_restart_backend" "${LOG_EXECUTION_QUEUE}"; then
|
||||
killall python3
|
||||
sleep 2
|
||||
/services/start-backend.sh >/dev/null 2>&1 &
|
||||
echo "$(date): Restarting backend triggered by cron_restart_backend"
|
||||
|
||||
# Create marker for entrypoint.sh to restart the service instead of killing the container
|
||||
touch /tmp/backend_restart_pending
|
||||
|
||||
killall python3 || echo "killall python3 failed or no process found"
|
||||
|
||||
# Remove all lines containing cron_restart_backend from the log file
|
||||
# Atomic replacement with temp file
|
||||
|
||||
Reference in New Issue
Block a user