summaryrefslogtreecommitdiff
path: root/community-testing/cdemu-daemon/cdemud.rc
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-21 00:01:36 +0000
committerroot <root@rshg054.dnsready.net>2012-06-21 00:01:36 +0000
commit6d22541bcebb7236bedfb98a96d5a1292072e86c (patch)
tree1656959d3d65b061d69d74cef6b740dbc3476683 /community-testing/cdemu-daemon/cdemud.rc
parent530e6e88786befa5d1bcd569e480f1b9fec5b102 (diff)
Thu Jun 21 00:01:36 UTC 2012
Diffstat (limited to 'community-testing/cdemu-daemon/cdemud.rc')
-rw-r--r--community-testing/cdemu-daemon/cdemud.rc34
1 files changed, 34 insertions, 0 deletions
diff --git a/community-testing/cdemu-daemon/cdemud.rc b/community-testing/cdemu-daemon/cdemud.rc
new file mode 100644
index 000000000..09b9ec345
--- /dev/null
+++ b/community-testing/cdemu-daemon/cdemud.rc
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting cdemud"
+ /usr/lib/cdemu-daemon/cdemu-daemon-system.sh &
+ if [ $? -ne 0 ]; then
+ stat_fail
+ else
+ add_daemon cdemud
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping cdemud"
+ kill `pidof cdemud` &>/dev/null
+ if [ $? -ne 0 ]; then
+ stat_fail
+ else
+ rm_daemon cdemud
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac