blob: c9a9e3474b829ad8a226ac4621c450690ed35fff (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: racoon
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Define these racoon_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/racoon
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
. /etc/rc.subr
name="racoon"
rcvar=racoon_enable
load_rc_config $name
racoon_enable=${racoon_enable:-"NO"} # Disable by default
racoon_dirs=${racoon_dirs:-"%%STATEDIR%%"} # For controlling socket
racoon_create_dirs=${racoon_create_dirs:-"NO"} # Create $racoon_dirs
#racoon_flags="" # Flags to racoon program
command="%%PREFIX%%/sbin/${name}"
pidfile="/var/run/${name}.pid"
start_precmd="${name}_prestart"
stop_postcmd="${name}_cleanup"
socketfile="%%STATEDIR%%/${name}.sock"
required_files="%%PREFIX%%/etc/${name}/${name}.conf"
required_modules="%%REQUIREMOD%%"
racoon_cleanup()
{
/bin/rm -f ${pidfile}
/bin/rm -f ${socketfile}
}
racoon_prestart()
{
racoon_cleanup
if checkyesno "${name}_create_dirs"; then
install -m 0755 -d $racoon_dirs
fi
}
run_rc_command "$1"
|