-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathfreebsd.rc.d
55 lines (43 loc) · 976 Bytes
/
freebsd.rc.d
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
#
# PROVIDE: chaosvpn
# REQUIRE: ipfilter FILESYSTEMS sysctl netif tinc
# BEFORE: SERVERS routing
# KEYWORD: nojail
# Define these chaosvpn_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/threeproxy
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
chaosvpn_enable=${chaosvpn_enable:-"NO"}
. /etc/rc.subr
name="chaosvpn"
rcvar="chaosvpn_enable"
command="/usr/local/sbin/chaosvpn"
start_precmd="chaosvpn_prestart"
start_cmd="chaosvpn_start"
#stop_cmd="chaosvpn_stop"
#reload_cmd="chaosvpn_reload"
#extra_commands="reload"
procname=${command:-chaosvpn}
load_rc_config $name
: ${chaosvpn_config:="/usr/local/etc/tinc/chaosvpn.conf"}
: ${chaosvpn_flags:="-d"}
chaosvpn_prestart()
{
}
chaosvpn_start()
{
for cfg in ${chaosvpn_config}
do
echo "Starting ChaosVPN for ${cfg}"
$command -d -c $cfg
done
}
chaosvpn_stop()
{
echo "**FIXME** chaosvpn_stop() to be implemented"
}
run_rc_command "$1"
# eof