[icinga-checkins] icinga.org: icinga2/master: Init script: condrestart should only restart a running service

git at icinga.org git at icinga.org
Mon Aug 8 17:57:03 CEST 2016


Module: icinga2
Branch: master
Commit: 47726d7701991a4a80e44f6df331c465a2520e10
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=47726d7701991a4a80e44f6df331c465a2520e10

Author: Berthold Cogel <cogel at uni-koeln.de>
Date:   Thu Jul 28 17:52:35 2016 +0200

Init script: condrestart should only restart a running service

fixes #11650

Signed-off-by: Michael Friedrich <michael.friedrich at netways.de>

---

 etc/initsystem/icinga2.init.d.cmake |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/etc/initsystem/icinga2.init.d.cmake b/etc/initsystem/icinga2.init.d.cmake
index 204de13..dd01430 100644
--- a/etc/initsystem/icinga2.init.d.cmake
+++ b/etc/initsystem/icinga2.init.d.cmake
@@ -165,11 +165,17 @@ case "$1" in
   status)
         status
         ;;
-  restart|condrestart)
+  restart)
 	checkconfig restart fail
         stop nofail
         start
         ;;
+  condrestart)
+        status > /dev/null 2>&1 || exit 0
+        checkconfig restart fail
+        stop nofail
+        start
+        ;;
   reload)
 	reload
 	;;



More information about the icinga-checkins mailing list