Browse Source

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
pull/3199/head
Daniel Gibbs 4 years ago
parent
commit
a194f3c8de
  1. 4
      lgsm/functions/command_backup.sh

4
lgsm/functions/command_backup.sh

@ -24,6 +24,8 @@ fn_backup_trap(){
fn_script_log_info "Backup ${backupname}.tar.gz: REMOVED" fn_script_log_info "Backup ${backupname}.tar.gz: REMOVED"
# Remove lock file. # Remove lock file.
rm -f "${lockdir:?}/backup.lock" rm -f "${lockdir:?}/backup.lock"
fn_backup_start_server
unset exitbypass
core_exit.sh core_exit.sh
} }
@ -252,12 +254,12 @@ fn_backup_start_server(){
} }
# Run functions. # Run functions.
fn_backup_check_lockfile
fn_backup_create_lockfile fn_backup_create_lockfile
fn_backup_init fn_backup_init
fn_backup_stop_server fn_backup_stop_server
fn_backup_dir fn_backup_dir
fn_backup_migrate_olddir fn_backup_migrate_olddir
fn_backup_check_lockfile
fn_backup_compression fn_backup_compression
fn_backup_prune fn_backup_prune
fn_backup_start_server fn_backup_start_server

Loading…
Cancel
Save