mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2025-01-18 16:22:33 +01:00
Merge pull request #2 from waja/fix/remove_old_dumps
Remove backslash before ${TARGET}, it breaks cleanup
This commit is contained in:
commit
cc9514d67c
1 changed files with 2 additions and 2 deletions
|
@ -21,8 +21,8 @@ if [ -n "$MAX_BACKUPS" ]; then
|
||||||
while [ `ls -1 /backup | wc -l` -gt "$MAX_BACKUPS" ];
|
while [ `ls -1 /backup | wc -l` -gt "$MAX_BACKUPS" ];
|
||||||
do
|
do
|
||||||
TARGET=`ls -1 /backup | sort | head -n 1`
|
TARGET=`ls -1 /backup | sort | head -n 1`
|
||||||
echo "Backup \${TARGET} is deleted"
|
echo "Backup ${TARGET} is deleted"
|
||||||
rm -rf /backup/\${TARGET}
|
rm -rf /backup/${TARGET}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue