add trap for SIGTERM and SIGINT

This commit is contained in:
James Barnett 2017-02-03 07:46:37 -06:00
parent 7f1e35b20a
commit ac28d14ed8
No known key found for this signature in database
GPG key ID: E4B5E45AA3B8C5C3

View file

@ -22,6 +22,14 @@
set -e
function kill_exit
{
printf "\nExited due to user intervention.\n"
exit 1
}
trap kill_exit SIGTERM SIGINT
SNAPPER_CONFIG_FILE=/etc/conf.d/snapper
ERRORMSG=" \033[00;31mERROR:\033[00m"