Changeset View
Changeset View
Standalone View
Standalone View
head/net/nncp/files/nncp-toss.in
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
#!/bin/sh | |||||
# | |||||
# $FreeBSD$ | |||||
# | |||||
# PROVIDE: nncp-toss | |||||
# REQUIRE: DAEMON NETWORKING FILESYSTEMS | |||||
# KEYWORD: shutdown | |||||
# | |||||
# Add these lines to /etc/rc.conf.local or /etc/rc.conf | |||||
# to enable this service: | |||||
# | |||||
# nncp_toss_enable (bool): Set to NO by default. | |||||
# Set it to YES to enable nncp-toss. | |||||
# nncp_toss_config (path): Set to %%PREFIX%%/etc/nncp.yaml by default. | |||||
# nncp_toss_cycle (int): Repeat tossing after that number of seconds. | |||||
# Default is "60". | |||||
. /etc/rc.subr | |||||
name=nncp_toss | |||||
rcvar=nncp_toss_enable | |||||
load_rc_config $name | |||||
: ${nncp_toss_enable:="NO"} | |||||
: ${nncp_toss_config="%%PREFIX%%/etc/nncp.yaml"} | |||||
: ${nncp_toss_cycle="60"} | |||||
command=%%PREFIX%%/bin/nncp-toss | |||||
command_args="-quiet -cycle $nncp_toss_cycle -cfg $nncp_toss_config &" | |||||
run_rc_command "$1" |