]> arthur.barton.de Git - backup-script.git/commitdiff
Catch SIGTERM as well as SIGINT
authorAlexander Barton <alex@barton.de>
Wed, 13 Jul 2016 13:29:51 +0000 (15:29 +0200)
committerAlexander Barton <alex@barton.de>
Wed, 13 Jul 2016 13:29:51 +0000 (15:29 +0200)
bin/backup-script

index bd329411ae4d709c79a924ae698d70ab35245615..a235190c3038a67f6941965e1099ee98443cfc24 100755 (executable)
@@ -81,7 +81,7 @@ CleanUp() {
 
 GotSignal() {
        echo
-       echo "--> Got break signal, cleaning up & aborting ..."
+       echo "--> Got signal, cleaning up & aborting ..."
        echo
        CleanUp
        echo -n "Aborted: "; date
@@ -356,7 +356,7 @@ if [ -n "$setup_exec" ]; then
        echo
 fi
 
-trap GotSignal SIGINT
+trap GotSignal SIGINT SIGTERM
 
 # check and create PID file
 if [ -e "$PIDFILE" ]; then