Skip to content
Snippets Groups Projects

msobczyk/handle signals in docker entrypoint

Merged Marcin Sobczyk requested to merge msobczyk/handle-signals-in-docker-entrypoint into develop
Compare and Show latest version
1 file
+ 3
1
Compare changes
  • Side-by-side
  • Inline
+ 3
1
@@ -7,13 +7,15 @@ SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
cleanup () {
echo "Performing cleanup...."
jobs -l
while pkill -INT -P $$
do
sleep 1
done
echo "Cleanup actions done."
}
trap cleanup INT QUIT HUP TERM
trap cleanup EXIT
trap 'exit' INT HUP
if [[ "$EUID" -eq 0 ]]; then
Loading