Package: mbmon
Version: 2.05-2
Severity: wishlist
Just a small suggestion:
mbmon can operate as a daemon, and gkrellm requires it running that way to
monitor the motherboard sensors. I like to run gkrellm all the time, and
it's annoying to have to start it manually, plus mbmon needs to run as
root. Plus I have two X servers running so my wife and I can both stay
logged in (no comments about console security, please :-), and I'd not
want us both to be running mbmon separately.
I solved this problem by creating a mbmond init script, and it seems
useful enough that you might consider including it, or putting it in a
separate mbmond package (it would be a pretty trivial package, containing
just two scripts like those below and depending on mbmon). Here are my
scripts, and they're intended to be pretty close to Debian initscript
standards (at least by inspecting a few others). I left them at the
default priority or 20, though I don't think it matters too much.
The benefit would be making gkrellm "just work" with mbmon for users who
don't know how to write simple init scripts or at least start mbmon as a
daemon.
Dustin
/etc/default/mbmond
-----------------------------------------------------------------------
# mbmond config file
#
# Dustin Laurence 2005/06/17
# This port seems to be appropriate and unused
MBMONPORT="411"
-----------------------------------------------------------------------
/etc/init.d/mbmond
-----------------------------------------------------------------------
#! /bin/sh
#
# 2005/06/17 Dustin Laurence (based on the Debian initscript for ntop)
#
# Run mbmon in daemon mode at startup for the benefit of e.g. gkrellm
NAME="mbmon"
DAEMON="/usr/bin/$NAME"
DESC="motherboard sensor monitoring daemon"
INIT="/etc/default/$NAME"
test -f $DAEMON || exit 0
if test -f $INIT ; then
. $INIT
else
MBMONPORT="411" # This port seems appropriate and unused
fi
test -n "$MBMONPORT" || exit 0
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --name $NAME --exec $DAEMON -- \
-r -P $MBMONPORT
if ps xa | grep -v grep | grep $DAEMON > /dev/null ; then
echo $NAME
else
echo "$NAME not started."
fi
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --oknodo --name $NAME --user $USER --retry 9
if ps xa | grep -v grep | grep $DAEMON > /dev/null ; then
echo "$NAME not stopped. Need to kill manually."
else
echo $NAME
fi
;;
restart | force-reload)
$0 stop
sleep 2
$0 start
;;
reload)
if ps aux | grep -v grep | grep -q '$DAEMON' ; then
$0 stop
sleep 2
$0 start
fi
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
-----------------------------------------------------------------------
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]