aboutsummaryrefslogtreecommitdiff
path: root/net/repeater/files/repeater.sh
blob: a98ae836b73065309c4fc8e9be9bd11239a7e840 (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
#!/bin/sh

# PROVIDE: repeater
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: FreeBSD shutdown

#
# Add the following lines to /etc/rc.conf to enable repeater:
#
# repeater_enable="YES"
#

. /etc/rc.subr

name=repeater
rcvar=`set_rcvar`

load_rc_config $name

repeater_enable=${repeater_enable:-"NO"}
repeater_server_port=${repeater_server_port:-5500}
repeater_viewer_port=${repeater_viewer_port:-5900}
repeater_log=${repeater_log:-"/var/run/repeater.log"}
command=/usr/local/sbin/repeater
procname=repeater
start_precmd="echo Starting ${procname}."
start_cmd="daemon ${procname} ${repeater_viewer_port} ${repeater_server_port} > ${repeater_log} 2>&1"

run_rc_command "$1"