aboutsummaryrefslogtreecommitdiff
path: root/security/softether/files/softether_server.in
blob: be25c341a94b746a44c803b3edae92edcf91b6c4 (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
#!/bin/sh

# PROVIDE: softether_server
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable softether_server:
# softether_server_enable (bool):  Set to "NO" by default.
#                                  Set it to "YES" to enable
#
. /etc/rc.subr

name=softether_server
rcvar=softether_server_enable
load_rc_config ${name}

: ${softether_server_enable:=NO}

command="%%PREFIX%%/libexec/softether/vpnserver"

datadir="/var/db/softether"

start_precmd="${name}_precmd"
start_cmd="${command} start"
stop_cmd="${command} stop"

softether_server_precmd()
{
	if [ ! -d "${datadir}" ]; then
	    mkdir -p ${datadir}
	fi
}

run_rc_command "$1"