From 6d22541bcebb7236bedfb98a96d5a1292072e86c Mon Sep 17 00:00:00 2001 From: root Date: Thu, 21 Jun 2012 00:01:36 +0000 Subject: Thu Jun 21 00:01:36 UTC 2012 --- community-testing/cdemu-daemon/cdemud.rc | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 community-testing/cdemu-daemon/cdemud.rc (limited to 'community-testing/cdemu-daemon/cdemud.rc') 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 -- cgit v1.2.3-54-g00ecf