mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Move filesystem to more generic name & add perms
This commit is contained in:
28
install/production-filesystem/entrypoint.sh
Normal file
28
install/production-filesystem/entrypoint.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# verify container capabilities at startup
|
||||
/services/capcheck.sh
|
||||
|
||||
# Function to clean up background processes
|
||||
cleanup() {
|
||||
echo "Caught signal, shutting down services..."
|
||||
# Kill all background jobs
|
||||
kill $(jobs -p)
|
||||
wait
|
||||
echo "All services stopped."
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Trap SIGINT (Ctrl+C) and SIGTERM (docker stop)
|
||||
trap cleanup SIGINT SIGTERM
|
||||
|
||||
# Start all necessary services for NetAlertX in the background
|
||||
/services/start-crond.sh &
|
||||
/services/start-php-fpm.sh &
|
||||
/services/start-nginx.sh &
|
||||
/services/start-backend.sh &
|
||||
|
||||
# Wait for any background process to exit
|
||||
wait -n
|
||||
# Trigger cleanup if any process exits
|
||||
cleanup
|
||||
Reference in New Issue
Block a user