summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Ritter2022-08-03 16:30:37 +0200
committerSteffen Ritter2022-08-03 16:30:37 +0200
commit4097893db68d119d5184c5cb5b6e3980cae2737b (patch)
tree2566bddb0f5ff3133bf6fa0b0a37edb4b50cea36
parent[SSPS] Make dnbd3-stage4-cleanup run as user dnbd3 (diff)
downloadsetup-scripts-4097893db68d119d5184c5cb5b6e3980cae2737b.tar.gz
setup-scripts-4097893db68d119d5184c5cb5b6e3980cae2737b.tar.xz
setup-scripts-4097893db68d119d5184c5cb5b6e3980cae2737b.zip
[SSPS] Little improvement for config-backup script
-rwxr-xr-xsatellit_installer/static_files/system/etc/cron.weekly/backup-satconfig.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/satellit_installer/static_files/system/etc/cron.weekly/backup-satconfig.sh b/satellit_installer/static_files/system/etc/cron.weekly/backup-satconfig.sh
index ae97535..7dacd3d 100755
--- a/satellit_installer/static_files/system/etc/cron.weekly/backup-satconfig.sh
+++ b/satellit_installer/static_files/system/etc/cron.weekly/backup-satconfig.sh
@@ -1,12 +1,12 @@
#!/bin/sh
-DIR="/root/backup/"
+DIR="/root/automatic_config_backup/"
BACKUP_FILE=$(/opt/taskmanager/scripts/system-backup | tail -n 1 | cut -d' ' -f 2)
mkdir -p "$DIR"
cd "$DIR" || exit 1
-mv $BACKUP_FILE $DIR
+mv "$BACKUP_FILE" "$DIR"
# remove backups older than 180 days
-find $DIR/*.tgz -type f -mtime +180 -exec rm -f {} \;
+find "$DIR" -name "*.tgz" -type f -mtime +180 -exec rm -f {} \;