Merge pull request #6451 from Icinga/fix/initscripts

Fix initscripts
This commit is contained in:
Michael Friedrich 2018-07-18 14:08:13 +02:00 committed by GitHub
commit 3c059aac66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 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: "

View File

@ -6,7 +6,7 @@
# Load sysconf on systems where the initsystem does not pass the environment
if [ "$1" != "" ]; then
if [ -r "$1" ]; then
source "$1"
. "$1"
else
echo "Unable to read sysconf from '$1'. Exiting." && exit 6
fi

View File

@ -3,7 +3,7 @@
# Load sysconf on systems where the initsystem does not pass the environment
if [ "$1" != "" ]; then
if [ -r "$1" ]; then
source "$1"
. "$1"
else
echo "Unable to read sysconf from '$1'. Exiting." && exit 6
fi