From 3f361bcb05a99f2acb7a597e05673baca25fc009 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 22 May 2014 17:26:56 +0200 Subject: [PATCH] Fix checkconfig error message. Fixes #6269 --- etc/init.d/icinga2.cmake | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 } -- 2.40.0