aboutsummaryrefslogtreecommitdiffstats
path: root/testing/strongswan/strongswan.initd
diff options
context:
space:
mode:
Diffstat (limited to 'testing/strongswan/strongswan.initd')
-rw-r--r--testing/strongswan/strongswan.initd31
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/strongswan/strongswan.initd b/testing/strongswan/strongswan.initd
new file mode 100644
index 0000000000..156883f110
--- /dev/null
+++ b/testing/strongswan/strongswan.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting StrongSwan"
+ ipsec start
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping StrongSwan"
+ ipsec stop
+ eend $?
+}
+restart() {
+ ebegin "Restarting StrongSwan"
+ svc_stop
+ sleep 2
+ svc_start
+ eend $?
+}
+
+status() {
+ ebegin "StrongSwan Status (verbose):"
+ ipsec statusall
+ eend $?
+}