From a194f3c8de2023161c5d37e69033adfb1a3b33cd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 24 Jan 2021 15:02:10 +0000 Subject: [PATCH] fix(backup): fix backup not correctly exiting on cancelling backup (#3197) * backup lock file only gets created when compression starts * fix backup not correctly exiting on canceling backup --- lgsm/functions/command_backup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) mode change 100755 => 100644 lgsm/functions/command_backup.sh diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh old mode 100755 new mode 100644 index e778cb8a6..728a19e35 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -24,6 +24,8 @@ fn_backup_trap(){ fn_script_log_info "Backup ${backupname}.tar.gz: REMOVED" # Remove lock file. rm -f "${lockdir:?}/backup.lock" + fn_backup_start_server + unset exitbypass core_exit.sh } @@ -252,12 +254,12 @@ fn_backup_start_server(){ } # Run functions. -fn_backup_check_lockfile fn_backup_create_lockfile fn_backup_init fn_backup_stop_server fn_backup_dir fn_backup_migrate_olddir +fn_backup_check_lockfile fn_backup_compression fn_backup_prune fn_backup_start_server