]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix cleanup of old snapshots again. Got broken some months ago..
authorhno <>
Fri, 30 Dec 2005 09:21:19 +0000 (09:21 +0000)
committerhno <>
Fri, 30 Dec 2005 09:21:19 +0000 (09:21 +0000)
mksnapshot-cron.sh

index 29f93dad207ddbaa9da18630734491d8175e1ead..daa7d4c114447d33c5880fe592455bf73504c052 100755 (executable)
@@ -42,7 +42,7 @@ make_snapshot()
     ln -s $file $dst/squid-$ver.snapshot$type
 
     # cleanup old snapshots
-    ls $dst/*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$type | sed -e 's/.*\(-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'$type'\)/\1/' | sort -r | tail +$save | while read f; do
+    ls $dst/*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$type | sed -e 's/.*-\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'$type'\)/\1/' | sort -r | tail +$save | while read f; do
        rm -f $dst/*-$f
     done
   done