Load functions first

refs #6449
This commit is contained in:
Jean Flach 2018-07-18 13:36:37 +02:00
parent 92056c592e
commit 383ca5011c
1 changed files with 7 additions and 7 deletions

View File

@ -15,6 +15,13 @@
# Description: Icinga 2 is a monitoring and management system for hosts, services and networks.
### END INIT INFO
# Get function from functions library
if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
elif [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi
# load system specific defines
SYSCONFIGFILE=@ICINGA2_SYSCONFIGFILE@
if [ -f $SYSCONFIGFILE ]; then
@ -50,13 +57,6 @@ getent passwd $ICINGA2_USER >/dev/null 2>&1 || (echo "Icinga user '$ICINGA2_USER
getent group $ICINGA2_GROUP >/dev/null 2>&1 || (echo "Icinga group '$ICINGA2_GROUP' does not exist. Exiting." && exit 6)
getent group $ICINGA2_COMMAND_GROUP >/dev/null 2>&1 || (echo "Icinga command group '$ICINGA2_COMMAND_GROUP' does not exist. Exiting." && exit 6)
# Get function from functions library
if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
elif [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi
# Start Icinga 2
start() {
printf "Starting Icinga 2: "