Where necessary add $FreeBSD$ to the file No PORTREVISION bump necessary because this is a no-op
52 lines
955 B
Bash
52 lines
955 B
Bash
#!/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_create_dirs=${racoon_create_dirs:-"NO"} # Create $required_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_dirs="%%STATEDIR%%"
|
|
|
|
racoon_cleanup()
|
|
{
|
|
/bin/rm -f ${pidfile}
|
|
/bin/rm -f ${socketfile}
|
|
}
|
|
|
|
racoon_prestart()
|
|
{
|
|
racoon_cleanup
|
|
|
|
if checkyesno "${name}_create_dirs"; then
|
|
/bin/mkdir -p $required_dirs
|
|
fi
|
|
}
|
|
|
|
run_rc_command "$1"
|