4
# Required-Start: $remote_fs $syslog
5
# Required-Stop: $remote_fs $syslog
6
# Default-Start: 2 3 4 5
10
# 2005/06/17 Dustin Laurence (based on the Debian initscript for ntop)
12
# Run mbmon in daemon mode at startup for the benefit of e.g. gkrellm
15
DAEMON="/usr/bin/$NAME"
16
DESC="motherboard sensor monitoring daemon"
17
CFG="/etc/default/$NAME"
19
test -f $DAEMON || exit 0
21
if test -f $CFG ; then
24
# better change this in the /etc/default/mbmon file and leave this alone
25
MBMONPORT="411" # This port seems appropriate and unused
26
START_MBMON=0 # default is not to start the daemon
29
test -n "$MBMONPORT" || exit 0
31
[ "$START_MBMON" -eq 1 ] || {
32
echo "Not starting ${DESC}."
33
echo "Edit ${CFG} if you want it to start automatically"
38
echo -n "Starting $DESC: "
39
start-stop-daemon --start --quiet --name $NAME --exec $DAEMON -- \
41
if ps xa | grep -v grep | grep $DAEMON > /dev/null ; then
44
echo "$NAME not started."
48
echo -n "Stopping $DESC: "
49
start-stop-daemon --stop --oknodo --name $NAME --exec $DAEMON --retry 9
50
if ps xa | grep -v grep | grep $DAEMON > /dev/null ; then
51
echo "$NAME not stopped. Need to kill manually."
56
restart | force-reload)
62
if ps aux | grep -v grep | grep -q '$DAEMON' ; then
69
echo "Usage: $0 {start|stop|restart|force-reload}" >&2