From 383ca5011cf6e29461f908083671826991a542c5 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Wed, 18 Jul 2018 13:36:37 +0200 Subject: [PATCH] Load functions first refs #6449 --- etc/initsystem/icinga2.init.d.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/etc/initsystem/icinga2.init.d.cmake b/etc/initsystem/icinga2.init.d.cmake index c37977f57..f0698726f 100644 --- a/etc/initsystem/icinga2.init.d.cmake +++ b/etc/initsystem/icinga2.init.d.cmake @@ -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: "