3 # chkconfig: 2345 08 92
4 # description: Starts and stops racoon and loads IPSec SPD's
6 # config: /etc/sysconfig/ipsec.spd
7 # config: /etc/racoon/racoon.conf
9 # Contributed by Kimmo Koivisto <kimmo.koivisto@surfeu.fi>
10 # Tested with Fedora C1
12 # Source function library.
13 .
/etc
/init.d
/functions
15 RACOON
=/usr
/sbin
/racoon
17 IPSEC_SPD
=/etc
/sysconfig
/ipsec.spd
18 VAR_SUBSYS_IPSEC
=/var
/lock
/subsys
/ipsec
20 if [ ! -x /usr
/sbin
/$RACOON ]; then
21 echo -n $
"/usr/sbin/$RACOON does not exist."; warning
; echo
28 # Check that SPD-file exists and load it.
29 if [ -f "$IPSEC_SPD" ]; then
33 touch $VAR_SUBSYS_IPSEC
38 killall
$RACOON 2> /dev
/null
41 rm -f $VAR_SUBSYS_IPSEC
45 # Do not print status if lockfile is missing
47 if [ ! -f "$VAR_SUBSYS_IPSEC" ]; then
48 echo $
"IPSec is stopped."
52 if [ -f "$VAR_SUBSYS_IPSEC" ]; then
53 echo $
"IPSec is started."
76 [ -e "$VAR_SUBSYS_IPSEC" ] && restart
82 echo $
"Usage: $0 {start|stop|restart|condrestart|status}"