ports/net/silc-server/files/silcd.in
Doug Barton 1d6b4b3f91 Begin the process of deprecating sysutils/rc_subr by
s#. %%RC_SUBR%%#. /etc/rc.subr#
2010-03-27 00:15:24 +00:00

41 lines
625 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: silcd
# REQUIRE: NETWORKING
#
# Add the following line to /etc/rc.conf[.local] to enable silcd:
#
# silcd_enable="YES"
#
silcd_enable=${silcd_enable-"NO"}
. /etc/rc.subr
name=silcd
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/${name}
pidfile=/var/run/${name}.pid
extra_commands="keygen"
keygen_cmd="silcd_keygen"
start_precmd="silcd_precmd"
silcd_keygen()
{
umask 077
${command} -C %%PREFIX%%/etc/silc
}
silcd_precmd()
{
if [ ! -f %%PREFIX%%/etc/silc/silcd.prv -a ! -f %%PREFIX%%/etc/silc/silcd.pub ]; then
run_rc_command keygen
fi
}
load_rc_config ${name}
run_rc_command "$1"