From ee4de3343d26ff2507ca8aa987491179fccbf98d Mon Sep 17 00:00:00 2001 From: Thomas Constans Date: Fri, 30 Sep 2022 11:59:34 +0200 Subject: [PATCH] forgot trap --- backup.sh | 2 ++ 1 file changed, 2 insertions(+) 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