Fixing crond issues #945 and #965

This commit is contained in:
root
2025-01-19 22:11:32 +00:00
parent 5562ae7add
commit b5dce3f6aa
6 changed files with 30 additions and 29 deletions

View File

@@ -5,8 +5,9 @@ LOG_FILE="${INSTALL_DIR}/log/execution_queue.log"
# Check if there are any entries with cron_restart_backend
if grep -q "cron_restart_backend" "$LOG_FILE"; then
# Kill all python processes (restart handled by s6 overlay)
pkill -f "python " && echo 'done'
# Restart python application using s6
s6-svc -r /var/run/s6-rc/servicedirs/netalertx
echo 'done'
# Remove all lines containing cron_restart_backend from the log file
sed -i '/cron_restart_backend/d' "$LOG_FILE"