Implement init script option: checkconfig.

This commit is contained in:
Gunnar Beutner 2013-09-25 12:42:53 +02:00
parent 0b4c554711
commit 4b7c9c413d
1 changed files with 12 additions and 2 deletions

View File

@ -103,6 +103,13 @@ reload() {
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
status() {
@ -131,11 +138,14 @@ case "$1" in
stop
start
;;
reload)
reload)
reload
;;
checkconfig)
checkconfig
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
echo $"Usage: $0 {start|stop|restart|reload|checkconfig|status}"
exit 1
esac
exit 0