#!/bin/sh # $FreeBSD: head/security/ipsec-tools/files/racoon.in 340872 2014-01-24 00:14:07Z mat $ # # 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"