mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
Implement init script option: checkconfig.
This commit is contained in:
parent
0b4c554711
commit
4b7c9c413d
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user