summaryrefslogtreecommitdiff
path: root/packages/musicpd
diff options
context:
space:
mode:
authorMatthias Goebl <oe@m.goebl.net>2006-02-07 02:17:42 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-02-07 02:17:42 +0000
commit897a3bb7e899755c16a5172724f72a17113e0a65 (patch)
treea325f2b7479a3a2b16ab80001ae97163d5e521dc /packages/musicpd
parentc0137f047ce68ef14c7cca0b88500146c438eb9e (diff)
musicpd: Add init script
- Add init script for mpd It's used only in mpd-alsa so far
Diffstat (limited to 'packages/musicpd')
-rw-r--r--packages/musicpd/mpd/mpd.init32
1 files changed, 32 insertions, 0 deletions
diff --git a/packages/musicpd/mpd/mpd.init b/packages/musicpd/mpd/mpd.init
new file mode 100644
index 0000000000..98a75d0af7
--- /dev/null
+++ b/packages/musicpd/mpd/mpd.init
@@ -0,0 +1,32 @@
+#! /bin/sh
+#
+# > update-rc.d mpd defaults 20
+#
+
+test -f /usr/bin/mpd || exit 0
+test -f /etc/mpd.conf || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting music player daemon: mpd"
+ start-stop-daemon --start --quiet --exec /usr/bin/mpd
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping music player daemon: mpd"
+ start-stop-daemon --stop --quiet --exec /usr/bin/mpd
+ echo "."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting music player daemon: mpd"
+ start-stop-daemon --start --quiet --exec /usr/bin/mpd
+ sleep 2
+ start-stop-daemon --stop --quiet --exec /usr/bin/mpd
+ echo "."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/mpd {start|stop|restart|force-reload}"
+ exit 1
+esac
+
+exit 0