Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
# Changelog: Taken from Debian Project package nsca in squeeze of architecture i386
# Modified for Nagios 3.3.1
# Esteban Monge [email protected]
#!/bin/sh
### BEGIN INIT INFO
# Provides: nsca
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
# simple debian init script for nsca
# by sean finney <[email protected]>
DAEMON=/usr/local/nagios/bin/nsca
NAME=nsca
DESC="Nagios Service Check Acceptor"
CONF=/usr/local/nagios/etc/nsca.cfg
OPTS="--daemon -c $CONF"
PIDFILE="/var/run/nsca.pid"
###
test -f $DAEMON || exit 0
# grab an arbitrary config setting from nsca.cfg
get_config(){
grep "^[[:space:]]*$1=" $CONF 2>/dev/null | tail | cut -d= -f2-
}
# if the pid_file is specified in the configuration file, nsca will
# take care of the pid handling for us. if it isn't we should continue
# as we have before
PIDFILE=`get_config pid_file`
# if pidfile isn't set
if [ -z "$PIDFILE" ]; then
# then this is the default PIDFILE
PIDFILE="/var/run/nsca.pid"
# run nsca in the foreground, and have s-s-d fork it for us
OPTS="-f $OPTS"
# and then this is how we call SSD
SSD_STARTOPTS="--background --pidfile $PIDFILE --make-pidfile"
SSD_STOPOPTS="--pidfile $PIDFILE"
else
# but if pid_file is set, we don't have to do anything
SSD_STARTOPTS="--pidfile $PIDFILE"
SSD_STOPOPTS="--pidfile $PIDFILE"
fi
SSD_START="start-stop-daemon --start --oknodo -S $SSD_STARTOPTS --exec $DAEMON"
SSD_STOP="start-stop-daemon --stop --oknodo -K $SSD_STOPOPTS --exec $DAEMON"
die(){
echo $@
exit 1
}
case "$1" in
start)
echo -n "Starting $DESC: "
if [ ! -d "/var/run/nagios" ]; then
mkdir -p /var/run/nagios || die "ERROR: couldn't create /var/run/nagios"
fi
$SSD_START -- $OPTS || die "ERROR: could not start $NAME."
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
$SSD_STOP -- $OPTS || die "ERROR: could not stop $NAME."
rm -f $PIDFILE
echo "$NAME."
;;
reload|force-reload)
echo -n "Reloading $DESC: "
$SSD_STOP --signal HUP -- $OPTS || die "ERROR: could not reload $NAME."
echo "$NAME."
;;
restart)
$0 stop
$0 start
;;
esac
Could you try that again, or maybe zip the pdf, it does not seem to be attached.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
How many passive nsca checks are you running? ocsp has had occasional, isolated bugs, not to mention it is not working correctly with core 4. Are you running core 4?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.