From 078671bd7b06e511f0c8d3dd1a9540d93cc97696 Mon Sep 17 00:00:00 2001 From: Lucas Costa Beyeler Date: Sun, 8 Oct 2017 18:23:03 -0300 Subject: [PATCH] Fixing the zmbackup to remove the PID file after finishing run --- project/lib/bash/BackupAction.sh | 1 + project/lib/bash/RestoreAction.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/project/lib/bash/BackupAction.sh b/project/lib/bash/BackupAction.sh index 307416c..b027276 100644 --- a/project/lib/bash/BackupAction.sh +++ b/project/lib/bash/BackupAction.sh @@ -137,6 +137,7 @@ function backup_main() echo "Backup session $SESSION finished on $(date)" else echo "Nothing to do. Closing..." + rm -rf $PID exit 2 fi } diff --git a/project/lib/bash/RestoreAction.sh b/project/lib/bash/RestoreAction.sh index 30255ff..1172010 100644 --- a/project/lib/bash/RestoreAction.sh +++ b/project/lib/bash/RestoreAction.sh @@ -37,6 +37,7 @@ function restore_main_mailbox() printf "\nRestore mail process with session $1 completed at $(date)\n" else echo "Nothing to do. Closing..." + rm -rf $PID exit 2 fi }