diff options
author | 2021-02-12 15:09:08 +0100 | |
---|---|---|
committer | 2021-02-12 15:26:22 +0100 | |
commit | 64371485b30887df6097de53f106803ecc746dae (patch) | |
tree | 2cc8c8fd9978c04dab16c6c91d9301c2ec8a1b44 /2.4/scripts/apache2-logrotate | |
parent | rolltarball.sh: Check for 'Commit:' to determine G_USER (diff) | |
download | apache-64371485b30887df6097de53f106803ecc746dae.tar.gz apache-64371485b30887df6097de53f106803ecc746dae.tar.bz2 apache-64371485b30887df6097de53f106803ecc746dae.zip |
2.4/scripts/apache2-logrotate: handle systemd
Bug: https://bugs.gentoo.org/646032
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to '2.4/scripts/apache2-logrotate')
-rw-r--r-- | 2.4/scripts/apache2-logrotate | 8 |
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 } |