From: Michael Friedrich Date: Thu, 22 May 2014 15:26:56 +0000 (+0200) Subject: Fix checkconfig error message. X-Git-Tag: v2.0.0-beta1~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f361bcb05a99f2acb7a597e05673baca25fc009;p=icinga2 Fix checkconfig error message. Fixes #6269 --- diff --git a/etc/init.d/icinga2.cmake b/etc/init.d/icinga2.cmake index 26b108cca..0e24daf44 100644 --- a/etc/init.d/icinga2.cmake +++ b/etc/init.d/icinga2.cmake @@ -124,10 +124,15 @@ checkconfig() { echo "Validating the configuration file:" if ! $DAEMON -c $ICINGA2_CONFIG_FILE -C -u $ICINGA2_USER -g $ICINGA2_GROUP; then - echo "Not "$1"ing Icinga 2 due to configuration errors." - if [ "x$2" = "xfail" ]; then - exit 1 - fi + if [ "x$1" = "x" ]; then + echo "Icinga 2 detected configuration errors." + exit 1 + else + echo "Not "$1"ing Icinga 2 due to configuration errors." + if [ "x$2" = "xfail" ]; then + exit 1 + fi + fi fi }