diff --git a/backup.sh b/backup.sh index 796c6fa..0a750e4 100644 --- a/backup.sh +++ b/backup.sh @@ -4,6 +4,8 @@ source functions.sh pidfile=/var/run/backup_script +trap cleanup EXIT + function cleanup { echo "bye bye" test -f $pidfile && rm -f $pidfile