commit: 64371485b30887df6097de53f106803ecc746dae Author: Pacho Ramos <pachoramos <AT> gmail <DOT> com> AuthorDate: Fri Feb 12 14:09:08 2021 +0000 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> CommitDate: Fri Feb 12 14:26:22 2021 +0000 URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=64371485
2.4/scripts/apache2-logrotate: handle systemd Bug: https://bugs.gentoo.org/646032 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org> Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> 2.4/scripts/apache2-logrotate | 8 ++++++-- 1 file 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 }
