From 47726d7701991a4a80e44f6df331c465a2520e10 Mon Sep 17 00:00:00 2001 From: Berthold Cogel Date: Thu, 28 Jul 2016 17:52:35 +0200 Subject: [PATCH] Init script: condrestart should only restart a running service fixes #11650 Signed-off-by: Michael Friedrich --- 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 204de135f..dd01430ef 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 ;;