blob: fdc10649661025d573a83e84431dce2573a3a8a4 (
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
31
32
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: nncp-daemon
# REQUIRE: DAEMON NETWORKING FILESYSTEMS
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# nncp_daemon_enable (bool): Set to NO by default.
# Set it to YES to enable nncp-daemon.
# nncp_daemon_config (path): Set to %%PREFIX%%/etc/nncp.hjson by default.
# nncp_daemon_bind (string): Address:port to bind to
# Default is "[::]:5400".
. /etc/rc.subr
name=nncp_daemon
rcvar=nncp_daemon_enable
load_rc_config $name
: ${nncp_daemon_enable:="NO"}
: ${nncp_daemon_config="%%PREFIX%%/etc/nncp.hjson"}
: ${nncp_daemon_bind="[::]:5400"}
command=%%PREFIX%%/bin/nncp-daemon
command_args="-quiet -bind $nncp_daemon_bind -cfg $nncp_daemon_config &"
run_rc_command "$1"
|