FreeBSD Port: upsd-2.0.1.6_1

Yves Guérin yvesguerin at yahoo.ca
Thu Jul 10 14:17:17 UTC 2008


Hello,

I redo the rc.d script

#!/bin/sh


# PatrioteBSD - Yves Guerin - ygvesguerin at yah00.ca - 2008-07-10
#########################################
# JAMAIS TESTE AVEC upsd_enable="yes"
# NEVER TESTED WITH upsd_enable="YES"
#########################################

# mettre dans /etc/rc.conf: upsd_enable="YES"
# PROVIDE: upsd
# REQUIRE: DAEMON
# BEFORE: shutdown

. /etc/rc.subr

name="upsd"
upsd_enable=${upsd_enable:-"NO"}
rcvar=`set_rcvar`

start_cmd="upsd_start"
stop_cmd="upsd_stop"

upsd_start()
{
        [ -x /usr/local/sbin/upsd ] && /usr/local/sbin/upsd && echo -n ' upsd'
}

upsd_stop()
{
         [ -f /var/run/upsd.pid ] && kill -QUIT `cat /var/run/upsd.pid` && echo -n ' upsd'
}

load_rc_config $name
run_rc_command "$1"


Yves Guerin




      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr


More information about the freebsd-ports mailing list