Implement init script option: checkconfig.

This commit is contained in:
Gunnar Beutner 2013-09-25 12:42:53 +02:00
parent 0b4c554711
commit 4b7c9c413d

View File

@ -103,6 +103,13 @@ reload() {
fi fi
} }
# Check the Icinga 2 configuration
checkconfig() {
printf "Checking configuration:"
echo "Validating the configuration file:"
exec $DAEMON -c $ICINGA2_CONFIG_FILE -C
}
# Print status for Icinga 2 # Print status for Icinga 2
status() { status() {
@ -131,11 +138,14 @@ case "$1" in
stop stop
start start
;; ;;
reload) reload)
reload reload
;; ;;
checkconfig)
checkconfig
;;
*) *)
echo $"Usage: $0 {start|stop|restart|status}" echo $"Usage: $0 {start|stop|restart|reload|checkconfig|status}"
exit 1 exit 1
esac esac
exit 0 exit 0