mirror of https://github.com/Icinga/icinga2.git
Get ICINGA2_USER and GROUP from sysconfig
This commit is contained in:
parent
88f77f9f8d
commit
ba41d7f249
|
@ -31,15 +31,13 @@ if [ ! -e $ICINGA2_CONFIG_FILE ]; then
|
|||
exit 6
|
||||
fi
|
||||
|
||||
ICINGA2_USER=`$DAEMON variable get --current RunAsUser`
|
||||
if [ $? != 0 ]; then
|
||||
echo "Could not fetch RunAsUser variable. Error '$ICINGA2_USER'. Exiting."
|
||||
if [ ! $ICINGA2_USER ]; then
|
||||
echo "Could not fetch \$ICINGA2_USER. Exiting."
|
||||
exit 6
|
||||
fi
|
||||
|
||||
ICINGA2_GROUP=`$DAEMON variable get --current RunAsGroup`
|
||||
if [ $? != 0 ]; then
|
||||
echo "Could not fetch RunAsGroup variable. Error '$ICINGA2_GROUP'. Exiting."
|
||||
if [ ! $ICINGA2_GROUP ]; then
|
||||
echo "Could not fetch \$ICINGA2_GROUP. Exiting."
|
||||
exit 6
|
||||
fi
|
||||
|
||||
|
|
|
@ -13,15 +13,13 @@ else
|
|||
fi
|
||||
|
||||
|
||||
ICINGA2_USER=`$DAEMON variable get --current RunAsUser`
|
||||
if [ $? != 0 ]; then
|
||||
echo "Could not fetch RunAsUser variable. Error '$ICINGA2_USER'. Exiting."
|
||||
if [ ! $ICINGA2_USER ]; then
|
||||
echo "Could not fetch \$ICINGA2_USER. Exiting."
|
||||
exit 6
|
||||
fi
|
||||
|
||||
ICINGA2_GROUP=`$DAEMON variable get --current RunAsGroup`
|
||||
if [ $? != 0 ]; then
|
||||
echo "Could not fetch RunAsGroup variable. Error '$ICINGA2_GROUP'. Exiting."
|
||||
if [ ! $ICINGA2_GROUP ]; then
|
||||
echo "Could not fetch \$ICINGA2_GROUP. Exiting."
|
||||
exit 6
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue