Browse Source

Update 'SOURCES/squid.logrotate'

Eliezer Croitoru 9 months ago
parent
commit
13fa75776f
1 changed files with 10 additions and 13 deletions
  1. 10 13
      SOURCES/squid.logrotate

+ 10 - 13
SOURCES/squid.logrotate

@@ -1,15 +1,12 @@
 /var/log/squid/*.log {
-    weekly
-    rotate 5
-    compress
-    notifempty
-    missingok
-    sharedscripts
-    postrotate
-      # Asks squid to reopen its logs. (log_rotate 0 is set in squid.conf)
-      # errors redirected to make it silent if squid is not running
-      /usr/sbin/squid -k rotate 2>/dev/null
-      # Wait a little to allow Squid to catch up before the logs is compressed
-      sleep 1
-    endscript
+        daily
+        compress
+        delaycompress
+        rotate 5
+        missingok
+        nocreate
+        sharedscripts
+        postrotate
+                test ! -e /var/run/squid.pid || test ! -x /usr/sbin/squid || /usr/sbin/squid -k rotate 2>/dev/null
+        endscript
 }