aboutsummaryrefslogtreecommitdiff
path: root/net/cnupm/files/cnupm.sh.in
blob: 2a9a338520205c0c55c7d6138d1b647870526892 (plain) (blame)
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
33
34
35
36
37
#!/bin/sh
#
# $FreeBSD$
#

#
# Add the following lines to /etc/rc.conf to enable rsyncd:
#
# cnupm_enable="YES"
# cnupm_ifaces="rl0"	# Change this with your interface!
# cnupm_flags=""	# Set this one to override default flags
#
# See cnupm(8) for flags
#

. /etc/rc.subr

name=cnupm
rcvar=cnupm_enable
command=%%PREFIX%%/sbin/cnupm
cnupm_flags="-ep -f inet -u cnupm"

load_rc_config ${name}

cnupm_enable=${cnupm_enable:-"NO"}

case ${cnupm_enable} in
[Yy][Ee][Ss])
	if [ -z ${cnupm_iface} ]; then
		err 1 "cnupm_iface is not set - edit /etc/rc.conf"
	fi
esac

cnupm_flags="-i ${cnupm_iface} ${cnupm_flags:-""}"
pidfile=~${name}/${name}-${cnupm_iface}.pid

run_rc_command "$1"