diff --git a/addons/init.d/nagios b/addons/init.d/nagios index 833b47d..825a70e 100644 --- a/addons/init.d/nagios +++ b/addons/init.d/nagios @@ -5,9 +5,9 @@ . `dirname $0`/functions option config standard_option /etc/nagios/nagios.cfg -option pidfile reserved_option /var/lib/nagios/nagios.lock +option pidfile reserved_option /var/nagios/nagios.pid -option bin reserved_option /opt/nagios/bin/nagios +option bin reserved_option /usr/sbin/nagios option cmdline reserved_option '$bin -d $opt_config' # perform a forced synchronisation before starting the daemon diff --git a/addons/init.d/nagios b/addons/init.d/nagios index ba8c2a1..833b47d 100644 --- a/addons/init.d/nagios +++ b/addons/init.d/nagios @@ -12,15 +12,13 @@ option cmdline reserved_option '$bin -d $opt_config' # perform a forced synchronisation before starting the daemon function fct_pre_start { - for opt in log_file status_file lock_file ; do + for opt in status_file lock_file ; do valueof $opt_config $opt > /dev/null 2>&1 REPLY=${REPLY%/*} [ -z "$REPLY" ] && continue [ ! -d "$REPLY" ] && mkdir -p $REPLY && \ chown nagios:nagios $REPLY - [ "$opt" = "log_file" -a "$REPLY" != "/var/log/nagios" ] && \ - ln -s $REPLY /var/log/nagios [ "$opt" = "lock_file" -a "x$REPLY" != "x" ] && pidfile=$REPLY done }