]> git.pld-linux.org Git - packages/apache.git/blobdiff - apache.logrotate
- allow work without systemd-units
[packages/apache.git] / apache.logrotate
index 2226453c4496f00fe70d2492faab165e110d5533..cc7aa6a250d8936a24440f764e534fef9ca920fd 100644 (file)
@@ -1,27 +1,18 @@
-/var/log/httpd/access_log {
-    olddir /var/log/archiv/httpd
+/var/log/httpd/*access_log
+/var/log/httpd/*combined_log
+/var/log/httpd/*agent_log
+/var/log/httpd/*error_log
+/var/log/httpd/*referer_log
+/var/log/httpd/*request_log
+/var/log/httpd/*rewrite_log
+{
+    olddir /var/log/archive/httpd
+    sharedscripts
     postrotate
-       /bin/killall -USR1 httpd
-    endscript
-}
-
-/var/log/httpd/agent_log {
-    olddir /var/log/archiv/httpd
-    postrotate
-       /bin/killall -USR1 httpd
-    endscript
-}
-
-/var/log/httpd/error_log {
-    olddir /var/log/archiv/httpd
-    postrotate
-       /bin/killall -USR1 httpd
-    endscript
-}
-
-/var/log/httpd/referer_log {
-    olddir /var/log/archiv/httpd
-    postrotate
-       /bin/killall -USR1 httpd
+       if [ -x /bin/systemd_booted ] && /bin/systemd_booted; then
+               /bin/systemctl reload httpd.service
+       else
+               /sbin/service httpd flush-logs > /dev/null
+       fi
     endscript
 }
This page took 0.032815 seconds and 4 git commands to generate.