index ee21ca131c4ca4603d0691ed7dc49a363590e5c1..7898122cf130edc8a7a17e99c6a1d8963fc21ddc 100755 (executable)
NAME=nagixsc_http2nagios
DAEMONPATH=/usr/sbin
DAEMON=$DAEMONPATH/$NAME
-DAEMON_ARGS="-c /etc/nagixsc/http2nagios.cfg --daemon"
+DAEMON_ARGS="-c /etc/nagixsc/http2nagios.cfg"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
-# [ -r /etc/default/$NAME ] && . /etc/default/$NAME
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
+# Check if RUN is set to "yes".
+if [ "x$RUN" != "xyes" ] ; then
+ echo "$NAME has been disabled in /etc/default/$NAME."
+ exit 0
+fi
+
+DAEMON_ARGS="$DAEMON_ARGS --daemon"
+
is_running()
{
[ -f "$PIDFILE" ] || return 1