add trap for SIGTERM and SIGINT
This commit is contained in:
parent
7f1e35b20a
commit
ac28d14ed8
1 changed files with 8 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue