updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / ipsec-openswan / openswan.rc.d
blob30bd0d56eca79edb87820df5519a8e33433a97af
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 case "$1" in
7 start)
8 stat_busy "Starting Openswan IPsec"
9 /etc/rc.d/ipsec --start
10 if [ $? -gt 0 ]; then
11 stat_fail
12 else
13 stat_done
14 add_daemon openswan
17 stop)
18 stat_busy "Stopping Openswan IPsec"
19 /etc/rc.d/ipsec --stop
20 if [ $? -gt 0 ]; then
21 stat_fail
22 else
23 stat_done
24 rm_daemon openswan
27 restart)
28 stat_busy "Restarting Openswan IPsec"
29 /etc/rc.d/ipsec --restart
30 if [ $? -gt 0 ]; then
31 stat_fail
32 else
33 stat_done
34 add_daemon openswan
37 status)
38 /etc/rc.d/ipsec --status
41 echo "usage: $0 {start|stop|restart|status}"
42 esac