Trap handler

This commit is contained in:
Kroese 2023-05-08 22:33:32 +02:00 committed by GitHub
parent 8bd47994b6
commit fd65d5b31d

View File

@ -3,7 +3,7 @@ set -eu
stop() { stop() {
trap - SIGINT EXIT trap - SIGINT EXIT
{ pkill -f nc || true } 2>/dev/null { pkill -f nc || true; } 2>/dev/null
} }
trap 'stop' EXIT SIGINT SIGTERM SIGHUP trap 'stop' EXIT SIGINT SIGTERM SIGHUP