Skip to content

Commit f09bed0

Browse files
committed
Fix to refer logdir and delete target only logfiles
1 parent cb7cc3c commit f09bed0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ if [ -z "${LogDir+x}" ]; then
7070
logfile=/dev/null
7171
else
7272
# Delete old logfiles
73-
find $logdir -mtime +$MaxLogAge | xargs rm -f
74-
logfile=$logdir/backup.log.`date +\%Y\%m\%d\%H\%M`
73+
find $LogDir -mtime +$MaxLogAge -name "*.log.*" | xargs rm -f
74+
logfile=$LogDir/backup.log.`date +\%Y\%m\%d\%H\%M`
7575
fi
7676

7777

0 commit comments

Comments
 (0)