FreeBSD Port: upsmon-2.1.3
Yves Guérin
yvesguerin at yahoo.ca
Thu Jul 10 14:19:05 UTC 2008
Hello,
I redo the rc.d script
#!/bin/sh
# PatrioteBSD - Yves Guerin yvesguerin at yahoo.ca - 2008-07-10
#########################################
# JAMAIS TESTE AVEC upsmon_enable="YES"
# NEVER TESTED WITH upsmon_enable="YES"
#########################################
# put into /etc/rc.conf: upsmon_enable="YES"
# PROVIDE: upsmon
# REQUIRE: DAEMON
# BEFORE: shutdown
. /etc/rc.subr
name="upsmon"
upsmon_enable=${upsmon_enable:-"NO"}
rcvar=`set_rcvar`
start_cmd="upsmon_start"
stop_cmd="upsmon_stop"
upsmon_start()
{
# see /usr/local/share/doc/upsmon/INSTALL for command line option details
if [ -x /usr/local/sbin/upsmond ]; then
/usr/local/sbin/upsmond -p /dev/cuaa0 2>&1 > /dev/null && echo -n ' upsmond'
fi
}
upsmon_stop()
{
killall upsmond && echo -n ' upsmond'
}
load_rc_config $name
run_rc_command "$1"
Regards
Yves Guerin
_____________________________________________________________________________
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
More information about the freebsd-ports
mailing list