summaryrefslogtreecommitdiff
path: root/pcr/openswan/openswan.rc.d
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-22 10:52:18 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-22 10:52:18 -0400
commit908d987dd1dcd4899f8f7f0878514c22ca8048b7 (patch)
tree29bf5986774207c3453044e1f370fb98d2431265 /pcr/openswan/openswan.rc.d
parent308bfb446305a96dffce945b6c4fb82b10d1b91b (diff)
parent8351d69e64a40d68fa32cfeea227b6fcf7afe974 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'pcr/openswan/openswan.rc.d')
-rwxr-xr-xpcr/openswan/openswan.rc.d43
1 files changed, 43 insertions, 0 deletions
diff --git a/pcr/openswan/openswan.rc.d b/pcr/openswan/openswan.rc.d
new file mode 100755
index 000000000..30bd0d56e
--- /dev/null
+++ b/pcr/openswan/openswan.rc.d
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting Openswan IPsec"
+ /etc/rc.d/ipsec --start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ add_daemon openswan
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Openswan IPsec"
+ /etc/rc.d/ipsec --stop
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ rm_daemon openswan
+ fi
+ ;;
+ restart)
+ stat_busy "Restarting Openswan IPsec"
+ /etc/rc.d/ipsec --restart
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ add_daemon openswan
+ fi
+ ;;
+ status)
+ /etc/rc.d/ipsec --status
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+esac
+