Added a SIGTERM trap to the entrypoint script for faster stopping.

This commit is contained in:
Daan Selen 2025-02-06 10:52:14 +01:00
parent 393dac1c99
commit 41772f28bd

View File

@ -3,6 +3,14 @@
# Path to the configuration file (exists because of previous function). # Path to the configuration file (exists because of previous function).
config_file="/data/wg-dashboard.ini" config_file="/data/wg-dashboard.ini"
trap 'stop_service' SIGTERM
stop_service() {
echo "[WGDashboard] Stopping WGDashboard..."
./wgd.sh stop
exit 0
}
echo "------------------------- START ----------------------------" echo "------------------------- START ----------------------------"
echo "Starting the WireGuard Dashboard Docker container." echo "Starting the WireGuard Dashboard Docker container."