Update pfsense-backup.sh

This commit is contained in:
2020-08-22 02:51:10 +02:00
committed by GitHub
parent 0d17d59791
commit 7fbda36ca1
+1 -2
View File
@@ -68,8 +68,7 @@ if [ $cron -eq 1 ]; then
if [ ! -z $keepfiles ]; then if [ ! -z $keepfiles ]; then
remove=$(ls -d -1tr $destination/*.xml | tail -n +$keepfiles | head -n1) remove=$(ls -d -1tr $destination/*.xml | tail -n +$keepfiles | head -n1)
if [ ! -z $remove ]; then if [ ! -z $remove ]; then
keepfiles=$((keepfiles + 1)) del=$(ls $destination/*.xml | head -n -$keepfiles)
del=$(ls $destination/*.xml | tail -n -$keepfiles | head -n1)
rm -f $del rm -f $del
echo "Backup removed at $del" echo "Backup removed at $del"
fi fi