File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -37,23 +37,25 @@ is_object_valid 'backup' 'BACKUP' "$2"
3737# Perform verification if read-only mode is enabled
3838check_hestia_demo_mode
3939
40-
4140# ----------------------------------------------------------#
4241# Action #
4342# ----------------------------------------------------------#
4443
44+ backup_folder=$BACKUP
45+
4546line=$( grep " BACKUP='$backup '" $USER_DATA /backup.conf)
4647parse_object_kv_list " $line "
4748
48-
49+ deleted=0
4950if [[ " $TYPE " =~ " sftp" ]]; then
5051 sftp_delete " $backup "
52+ deleted=1
5153fi
5254if [[ " $TYPE " =~ " ftp" ]] && [ " $deleted " == " 0" ]; then
53- ftp_delete " backup"
55+ ftp_delete " $ backup"
5456fi
5557if [[ " $TYPE " =~ " local" ]]; then
56- rm -f $BACKUP /$2
58+ rm -f $backup_folder /$2
5759fi
5860
5961# Deleting backup
You can’t perform that action at this time.
0 commit comments