summaryrefslogtreecommitdiff
path: root/community-staging/miredo/miredo-server.rc.d
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-11 00:02:18 +0000
committerroot <root@rshg054.dnsready.net>2012-06-11 00:02:18 +0000
commit4714cec7e8367a7618b168d0db4bc085dbfaac8a (patch)
treeb1f3049ee78988b0db6ec69637a1ee37c8b63b3f /community-staging/miredo/miredo-server.rc.d
parent7b2739f21a7ed0d52497fa381c9a2383e71ab7a8 (diff)
Mon Jun 11 00:02:18 UTC 2012
Diffstat (limited to 'community-staging/miredo/miredo-server.rc.d')
-rw-r--r--community-staging/miredo/miredo-server.rc.d37
1 files changed, 37 insertions, 0 deletions
diff --git a/community-staging/miredo/miredo-server.rc.d b/community-staging/miredo/miredo-server.rc.d
new file mode 100644
index 000000000..d05513b23
--- /dev/null
+++ b/community-staging/miredo/miredo-server.rc.d
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/miredo-server`
+case "$1" in
+ start)
+ stat_busy "Starting teredo protocol server"
+ if [ -z "$PID" ]; then
+ /usr/sbin/miredo-server
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon miredo-server
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping teredo protocol server"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon miredo-server
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac