]> granicus.if.org Git - icinga2/commitdiff
Fix checkconfig error message.
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 22 May 2014 15:26:56 +0000 (17:26 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 22 May 2014 15:26:56 +0000 (17:26 +0200)
Fixes #6269

etc/init.d/icinga2.cmake

index 26b108cca3b5bb5ca20f0f94388856200df0d18e..0e24daf44838c3fa0bbf41ad7495a7617a99a50f 100644 (file)
@@ -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
 }