From 67db4cf68dbdb364c4dee1599294d7701f3c3b0a Mon Sep 17 00:00:00 2001 From: root Date: Tue, 5 Jun 2012 00:01:46 +0000 Subject: Tue Jun 5 00:01:46 UTC 2012 --- staging/mpd/rc.d | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 staging/mpd/rc.d (limited to 'staging/mpd/rc.d') diff --git a/staging/mpd/rc.d b/staging/mpd/rc.d new file mode 100755 index 000000000..f00e16067 --- /dev/null +++ b/staging/mpd/rc.d @@ -0,0 +1,25 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy 'Starting Music Player Daemon' + /usr/bin/mpd /etc/mpd.conf &> /dev/null && + { add_daemon mpd; stat_done; } || stat_fail + ;; + stop) + stat_busy 'Stopping Music Player Daemon' + /usr/bin/mpd --kill /etc/mpd.conf &> /dev/null && + { rm_daemon mpd; stat_done; } || stat_fail + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 -- cgit v1.2.3-54-g00ecf