mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-12 20:16:15 -08:00
fix(docker): exit cleanly on container stop
This commit is contained in:
1 parent
6afaa04a95
commit
7bd5957119
1 file changed
+7
-1
@@ -42,6 +42,11 @@ cleanup() {
|
||||
fi
|
||||
}
|
||||
|
||||
handle_signal() {
|
||||
cleanup
|
||||
exit 0
|
||||
}
|
||||
|
||||
process_is_running() {
|
||||
if [ ! -r "/proc/$1/stat" ]; then
|
||||
return 1
|
||||
@@ -51,7 +56,8 @@ process_is_running() {
|
||||
[ -n "$state" ] && [ "$state" != "Z" ]
|
||||
}
|
||||
|
||||
trap cleanup INT TERM EXIT
|
||||
trap handle_signal INT TERM
|
||||
trap cleanup EXIT
|
||||
|
||||
backend_ready=0
|
||||
|
||||
|
||||
Reference in new issue
Block a user