Update sysconfig read

This commit is contained in:
Jean Flach 2018-06-18 10:27:35 +02:00
parent 2b5ea38217
commit 44fae88d43
2 changed files with 12 additions and 4 deletions

View File

@ -3,9 +3,13 @@
# This script prepares directories and files needed for running Icinga2
#
# With sysvinit we need to pass the environment this way. Or do we?
# Load sysconf on systems where the initsystem does not pass the environment
if [ "$1" != "" ]; then
if [ -r "$1" ]; then
source "$1"
else
echo "Unable to read sysconf from '$1'. Exiting." && exit 6
fi
fi
# Set defaults, to overwrite see "@ICINGA2_SYSCONFIGFILE@"

View File

@ -1,8 +1,12 @@
#!/bin/sh
# With sysvinit we need to pass the environment this way. Or do we?
# Load sysconf on systems where the initsystem does not pass the environment
if [ "$1" != "" ]; then
if [ -r "$1" ]; then
source "$1"
else
echo "Unable to read sysconf from '$1'. Exiting." && exit 6
fi
fi
# Set defaults, to overwrite see "@ICINGA2_SYSCONFIGFILE@"