summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--2.4/scripts/apache2-logrotate8
1 files changed, 6 insertions, 2 deletions
diff --git a/2.4/scripts/apache2-logrotate b/2.4/scripts/apache2-logrotate
index 9dd431c..5d9f8dc 100644
--- a/2.4/scripts/apache2-logrotate
+++ b/2.4/scripts/apache2-logrotate
@@ -1,11 +1,15 @@
# Apache2 logrotate snipet for Gentoo Linux
-# Contributes by Chuck Short
+# Originally contributed by Chuck Short
#
/var/log/apache2/*log {
missingok
notifempty
sharedscripts
postrotate
- /etc/init.d/apache2 reload > /dev/null 2>&1 || true
+ if test -d /run/systemd/system ; then
+ systemctl reload apache2.service > /dev/null 2>&1 || true
+ else
+ /etc/init.d/apache2 reload > /dev/null 2>&1 || true
+ fi
endscript
}