Docker: shutdown the entire process when any of the background jobs exits

This commit is contained in:
Nadav Ivgi 2018-03-14 13:56:54 +02:00
parent 7aaa8da4d9
commit 4ffaa487b3
1 changed files with 5 additions and 1 deletions

View File

@ -69,4 +69,8 @@ fi
echo "Starting Lightning Charge"
DEBUG=$DEBUG,lightning-charge,lightning-client \
charged -d /data/charge.db -l $LN_PATH -i 0.0.0.0 $@ $CHARGED_OPTS
charged -d /data/charge.db -l $LN_PATH -i 0.0.0.0 $@ $CHARGED_OPTS &
# shutdown the entire process when any of the background jobs exits (even if successfully)
wait -n
kill -TERM $$