From: hno <> Date: Sat, 25 Jun 2005 03:11:08 +0000 (+0000) Subject: Fix snapshot procedure to be less sensitive on file dates when removing old X-Git-Tag: SQUID_3_0_PRE4~721 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33c7397f5b8d7b0320feb9105b052f4ba975efdc;p=thirdparty%2Fsquid.git Fix snapshot procedure to be less sensitive on file dates when removing old copies, relying on the file names instead. --- diff --git a/mksnapshot-cron.sh b/mksnapshot-cron.sh index b931be0e07..00abe20fa2 100755 --- a/mksnapshot-cron.sh +++ b/mksnapshot-cron.sh @@ -42,7 +42,7 @@ make_snapshot() ln -s $file $dst/squid-$ver.snapshot$type # cleanup old snapshots - ls -t $dst/*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$type | tail +$save | xargs rm -f + ls $dst/*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$type | sort -r -t- +2 | tail +$save | xargs rm -f done # update web page