freebsd-ports/net-p2p/dcd/files/dcd.sh.in
Daniel Gerzo efcfa37d04 - fix the handling of sig_stop signal in the rc.d script
PR:		148867
Submitted by:	danger
Approved by:	az (maintainer) via private email
2010-07-27 19:34:34 +00:00

34 lines
697 B
Bash

#!/bin/sh
# PROVIDE: dcd
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# dcd_enable (bool): Set to NO by default.
# Set it to YES to enable dcd.
. /etc/rc.subr
name="dcd"
rcvar=${name}_enable
command=%%PREFIX%%/sbin/dcd
sig_stop=KILL
stop_cmd=stop_cmd
load_rc_config $name
stop_cmd()
{
kill $sig_stop $rc_pid
rm -f $pidfile
}
: ${dcd_enable="NO"}
run_rc_command "$1"