mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Dockerfile.debian building and running
This commit is contained in:
15
install/production-filesystem/services/cron_script.sh
Executable file
15
install/production-filesystem/services/cron_script.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
export INSTALL_DIR=/app
|
||||
|
||||
|
||||
|
||||
# Check if there are any entries with cron_restart_backend
|
||||
if grep -q "cron_restart_backend" "${LOG_EXECUTION_QUEUE}"; then
|
||||
# Restart python application using s6
|
||||
killall python3
|
||||
/services/start-backend.sh &
|
||||
echo 'done'
|
||||
|
||||
# Remove all lines containing cron_restart_backend from the log file
|
||||
sed -i '/cron_restart_backend/d' "${LOG_EXECUTION_QUEUE}"
|
||||
fi
|
||||
Reference in New Issue
Block a user