blob: 8f6bb47ce4aa4fa6d3969f6034a0ecddc9dda83b (
plain)
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$
# PROVIDE: strongswan
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# strongswan_enable (bool): Set to NO by default.
# Set it to YES to enable strongswan.
. /etc/rc.subr
name="strongswan"
rcvar=strongswan_enable
command="%%PREFIX%%/sbin/ipsec"
extra_commands="reload statusall"
load_rc_config $name
start_cmd="strongswan_command start"
stop_cmd="strongswan_command stop"
restart_cmd="strongswan_command restart"
status_cmd="strongswan_command status"
reload_cmd="strongswan_command reload"
statusall_cmd="strongswan_command statusall"
strongswan_command()
{
$command ${rc_arg}
}
run_rc_command "$1"
|