mirror of https://github.com/Icinga/icinga2.git
Implement init script option: checkconfig.
This commit is contained in:
parent
0b4c554711
commit
4b7c9c413d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue