diff options
author | Munechika SUMIKAWA <sumikawa@FreeBSD.org> | 2004-01-06 15:31:09 +0000 |
---|---|---|
committer | Munechika SUMIKAWA <sumikawa@FreeBSD.org> | 2004-01-06 15:31:09 +0000 |
commit | 698583c9b55f8b0ff5a27c2a0d3ad4d4f0c251f7 (patch) | |
tree | 79db599aeeb98a67b3f7e17e480f41f37d994f57 /security/racoon2/files/racoon.sh | |
parent | Update to 2.87. (diff) |
rcNG'fy racoon.sh and removed unnecessary patches.
Submitted by: ume
Diffstat (limited to '')
-rw-r--r-- | security/racoon2/files/racoon.sh | 56 |
1 files changed, 40 insertions, 16 deletions
diff --git a/security/racoon2/files/racoon.sh b/security/racoon2/files/racoon.sh index d6a5c1b3098a..ecde585dad87 100644 --- a/security/racoon2/files/racoon.sh +++ b/security/racoon2/files/racoon.sh @@ -1,18 +1,42 @@ #!/bin/sh -case "$1" in - start) - if [ -x %PREFIX%/sbin/racoon ]; then - %PREFIX%/sbin/racoon -f %PREFIX%/etc/racoon/racoon.conf && echo -n ' racoon' - fi - ;; - - stop) - /usr/bin/killall racoon && echo -n ' racoon' - ;; - - *) - echo "Usage: `basename $0` { start | stop }" - exit 64 - ;; -esac +# Start or stop racoon +# $FreeBSD$ + +# PROVIDE: racoon +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown +# +# NOTE for FreeBSD 5.0+: +# If you want this script to start with the base rc scripts +# move racoon.sh to /etc/rc.d/racoon + +prefix=%%PREFIX%% + +# 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 +# +[ -z "$racoon_enable" ] && racoon_enable="YES" # Enable racoon +#racoon_program="${prefix}/sbin/racoon" # Location of racoon +#racoon_flags="" # Flags to racoon program + +. %%RC_SUBR%% + +name="racoon" +rcvar=`set_rcvar` +command="${prefix}/sbin/racoon" +pidfile="/var/run/racoon.pid" +required_files="${prefix}/etc/racoon/racoon.conf" +stop_postcmd="racoon_poststop" + +racoon_poststop() { + /bin/rm -f ${pidfile} +} + +load_rc_config $name +run_rc_command "$1" |