summaryrefslogtreecommitdiff
path: root/net/portfwd/files/portfwd.in
blob: a5de411f1ce14be9f366702f16e716f2ea8efd89 (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
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: portfwd
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable the portfwd daemon:
#
# portfwd_enable="YES"
#

. /etc/rc.subr

name=portfwd
rcvar=portfwd_enable

load_rc_config ${name}

: ${portfwd_enable:="NO"}
: ${portfwd_config:="%%PREFIX%%/etc/portfwd.conf"}

required_files="${portfwd_config}"
command="/usr/sbin/daemon"
command_args="-f -r %%PREFIX%%/sbin/portfwd -g -c ${portfwd_config}"

run_rc_command "$1"