Fix looking for the wrong kinda backups in dokuwiki backup script
This commit is contained in:
parent
7646396dac
commit
c3fa85aacb
@ -27,7 +27,7 @@ fi
|
||||
# Purge oldest backup if we need to
|
||||
currentbackupcount="$(ls -1 "$OUTDIR" | wc -l)"
|
||||
if (( currentbackupcount >= retention )); then
|
||||
lastbackup="$(find "$OUTDIR" -name \*.zip 2>/dev/null | sort | head -n 1)"
|
||||
lastbackup="$(find "$OUTDIR" -name \*.tar.gz 2>/dev/null | sort | head -n 1)"
|
||||
if [ -f "$lastbackup" ]; then
|
||||
log "Removing old backup: $lastbackup"
|
||||
rm "$lastbackup"
|
||||
|
Loading…
Reference in New Issue
Block a user