]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix snapshot procedure to be less sensitive on file dates when removing old
authorhno <>
Sat, 25 Jun 2005 03:11:08 +0000 (03:11 +0000)
committerhno <>
Sat, 25 Jun 2005 03:11:08 +0000 (03:11 +0000)
copies, relying on the file names instead.

mksnapshot-cron.sh

index b931be0e07ef43af1c484cad519bcfc53b9fb21e..00abe20fa2e59f8591fd159b72dc8ad2866235f9 100755 (executable)
@@ -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