summaryrefslogtreecommitdiff
path: root/network/ike/rc.iked
diff options
context:
space:
mode:
authorFerenc Deak <ferenc.deak@gmail.com>2010-12-22 19:35:59 -0200
committerNiels Horn <niels.horn@slackbuilds.org>2010-12-22 19:35:59 -0200
commit5d20d6632040e3c74ff336361057b1d43bdb417d (patch)
tree95725a770173a4e432aa99f53d1933553276ac5c /network/ike/rc.iked
parenta5f8093b34d2a1a2edd60584cc77f2588758ea8a (diff)
downloadslackbuilds-5d20d6632040e3c74ff336361057b1d43bdb417d.tar.gz
network/ike: Added (Internet Key exchange daemon / IPsec VPN client)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/ike/rc.iked')
-rw-r--r--network/ike/rc.iked45
1 files changed, 45 insertions, 0 deletions
diff --git a/network/ike/rc.iked b/network/ike/rc.iked
new file mode 100644
index 0000000000..c80894fee6
--- /dev/null
+++ b/network/ike/rc.iked
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.iked
+#
+# Start/stop/restart the Shrew Soft IKE daemon.
+#
+
+# Start iked:
+iked_start() {
+ if [ -x /usr/sbin/iked ]; then
+ echo "Starting the Shrew Soft IKE daemon: /usr/sbin/iked"
+
+ if [ -z "$(/sbin/lsmod | grep "^tun ")" ]; then
+ /sbin/modprobe tun
+ fi
+
+ /usr/sbin/iked
+ fi
+}
+
+# Stop iked:
+iked_stop() {
+ killall iked
+}
+
+# Restart iked:
+iked_restart() {
+ iked_stop
+ sleep 1
+ iked_start
+}
+
+case "$1" in
+'start')
+ iked_start
+ ;;
+'stop')
+ iked_stop
+ ;;
+'restart')
+ iked_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac