Fix container signal handling
This commit is contained in:
1 parent
52ccca7161
commit
6a17690742
2 files changed
+11
-2
No files matched your search
+10
-1
@@ -1,4 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Run the application in the background
|
||||
python generate_config.py && python pterodisbot.py
|
||||
python generate_config.py && python pterodisbot.py &
|
||||
|
||||
# Capture the application's process ID
|
||||
pid=$!
|
||||
|
||||
# Trap the SIGTERM signal and pass it through to the process upon stopping the container
|
||||
trap "kill -TERM $pid" SIGTERM
|
||||
|
||||
# Wait for process to complete
|
||||
wait $pid
|
||||
Reference in new issue
Block a user