[apache2] 02/08: Use 'invoke-rc.d' in logrotate script

Stefan Fritsch sf at moszumanska.debian.org
Sun Aug 6 16:51:10 UTC 2017


This is an automated email from the git hooks/post-receive script.

sf pushed a commit to branch master
in repository apache2.

commit 730ae4775ff18211f9f4d99ad3c754a0fbc12a71
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Sat Aug 5 21:04:12 2017 +0200

    Use 'invoke-rc.d' in logrotate script
---
 debian/apache2.logrotate | 4 ++--
 debian/changelog         | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/apache2.logrotate b/debian/apache2.logrotate
index c0cc58a..37c5f22 100644
--- a/debian/apache2.logrotate
+++ b/debian/apache2.logrotate
@@ -8,8 +8,8 @@
 	create 640 root adm
 	sharedscripts
 	postrotate
-                if /etc/init.d/apache2 status > /dev/null ; then \
-                    /etc/init.d/apache2 reload > /dev/null; \
+                if invoke-rc.d apache2 status > /dev/null 2>&1; then \
+                    invoke-rc.d apache2 reload > /dev/null 2>&1; \
                 fi;
 	endscript
 	prerotate
diff --git a/debian/changelog b/debian/changelog
index bdd0019..777a468 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
 apache2 (2.4.27-4) UNRELEASED; urgency=medium
 
+  * Use 'invoke-rc.d' instead of init script in logrotate script.
+    Closes: #857607
   * Use 'service' instead of init script in monit example config.
 
  -- Stefan Fritsch <sf at debian.org>  Sat, 05 Aug 2017 20:59:48 +0200

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git



More information about the Pkg-apache-commits mailing list