Init script shouldn't run config validation as root.

Fixes #5761
This commit is contained in:
Gunnar Beutner 2014-03-17 10:14:21 +01:00
parent 3aa8bd6164
commit a066cbf110

View File

@ -120,7 +120,7 @@ checkconfig() {
printf "Checking configuration:"
echo "Validating the configuration file:"
if ! $DAEMON -c $ICINGA2_CONFIG_FILE -C; then
if ! $DAEMON -c $ICINGA2_CONFIG_FILE -C -u $ICINGA2_USER -g $ICINGA2_GROUP; then
echo "Not "$1"ing Icinga 2 due to configuration errors."
if [ "x$2" = "xfail" ]; then
exit 1