Lines 7-33
Link Here
|
7 |
# BEFORE: LOGIN |
7 |
# BEFORE: LOGIN |
8 |
# KEYWORD: shutdown |
8 |
# KEYWORD: shutdown |
9 |
|
9 |
|
10 |
command="%%PREFIX%%/sbin/ipsec" |
|
|
11 |
. /etc/rc.subr |
10 |
. /etc/rc.subr |
12 |
|
11 |
|
13 |
name="strongswan" |
12 |
name=strongswan |
14 |
rcvar=${name}_enable |
13 |
rcvar=strongswan_enable |
|
|
14 |
|
15 |
extra_commands="reload statusall" |
15 |
extra_commands="reload statusall" |
16 |
|
16 |
|
17 |
load_rc_config $name |
17 |
load_rc_config $name |
18 |
|
18 |
|
19 |
start_cmd="strongswan_command start" |
19 |
command="%%PREFIX%%/sbin/ipsec" |
20 |
stop_cmd="strongswan_command stop" |
|
|
21 |
restart_cmd="strongswan_command restart" |
22 |
status_cmd="strongswan_command status" |
23 |
reload_cmd="strongswan_command reload" |
24 |
statusall_cmd="strongswan_command statusall" |
25 |
|
20 |
|
|
|
21 |
start_precmd="strongswan_precmd" |
22 |
stop_cmd="strongswan_cmd" |
23 |
status_cmd="strongswan_cmd" |
24 |
reload_cmd="strongswan_cmd" |
25 |
statusall_cmd="strongswan_cmd" |
26 |
|
26 |
|
27 |
strongswan_command() |
27 |
strongswan_precmd() |
28 |
{ |
28 |
{ |
29 |
$command ${rc_arg} |
29 |
command_args=${rc_arg} |
30 |
} |
30 |
} |
31 |
|
31 |
|
32 |
run_rc_command "$1" |
32 |
strongswan_cmd() |
|
|
33 |
{ |
34 |
${command} ${rc_arg} |
35 |
} |
33 |
|
36 |
|
|
|
37 |
run_rc_command "$1" |