#!/bin/sh
RESULT=`/etc/init.d/icinga2 checkconfig`
EXITCODE=$?

if [ "${EXITCODE}" -ne "0" ]
  then
    echo "ERROR - Configuration errors detected"
    exit 1
else
    echo "OK - No configuration errors detected"
    exit 0
fi
