]> granicus.if.org Git - icinga2/commitdiff
Load functions first 6451/head
authorJean Flach <jean-marcel.flach@icinga.com>
Wed, 18 Jul 2018 11:36:37 +0000 (13:36 +0200)
committerJean Flach <jean-marcel.flach@icinga.com>
Wed, 18 Jul 2018 11:36:37 +0000 (13:36 +0200)
refs #6449

etc/initsystem/icinga2.init.d.cmake

index c37977f57479ea36ed3ba8eafb7405b2c5a80fab..f0698726f9b9270b7fef88db15b91f2fec1ce8c0 100644 (file)
 # 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: "