blob: 99dc6fc79204cf46fcd0e5279631ca2d6df1e746 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/sh
# 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.hjson 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.hjson"}
: ${nncp_toss_cycle="60"}
command=%%PREFIX%%/bin/nncp-toss
command_args="-quiet -cycle $nncp_toss_cycle -cfg $nncp_toss_config &"
run_rc_command "$1"
|