From da6fd8c2a4e5498e1c3ebf5afc7f3b54e6ea4d04 Mon Sep 17 00:00:00 2001 From: Erfan <143827987+erfjab@users.noreply.github.com> Date: Sat, 16 Nov 2024 01:36:04 +0330 Subject: [PATCH] fix: Fix the bug of not deleting files (#32) --- install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 5247988..39779aa 100644 --- a/install.sh +++ b/install.sh @@ -867,13 +867,17 @@ fi cat < "$backup_script" #!/bin/bash +set -e + ip=\$(hostname -I | awk '{print \$1}') timestamp=\$(TZ='Asia/Tehran' date +%m%d-%H%M) -base_name="/root/${name}_\${timestamp}." -backup_name="/root/${name}_\${timestamp}${compression_ext}" +base_name="/root/${name}_\${timestamp}_backuper." +backup_name="/root/${name}_\${timestamp}_backuper${compression_ext}" caption="${CAPTION_TEXT}" rm -f "\$backup_name"* +rm -f *"_backuper.sql" +$(echo -e "$rm_commands") $(echo -e "$DB")