summaryrefslogtreecommitdiff
path: root/multimedia/mt-daapd/rc.mt-daapd
diff options
context:
space:
mode:
authorAndrew Brouwers <abrouwers@gmail.com>2010-05-11 15:00:29 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 15:00:29 +0200
commitf0e6e7a7f55818e13dfed57c43643e8e5592b7ca (patch)
tree798b3d02c0d310055162a8d9170eaead5dfe263b /multimedia/mt-daapd/rc.mt-daapd
parent380ee39960e847bc64d36e775eca06c78659d963 (diff)
downloadslackbuilds-f0e6e7a7f55818e13dfed57c43643e8e5592b7ca.tar.gz
multimedia/mt-daapd: Initial import
Diffstat (limited to 'multimedia/mt-daapd/rc.mt-daapd')
-rw-r--r--multimedia/mt-daapd/rc.mt-daapd35
1 files changed, 35 insertions, 0 deletions
diff --git a/multimedia/mt-daapd/rc.mt-daapd b/multimedia/mt-daapd/rc.mt-daapd
new file mode 100644
index 0000000000..c2d88322b7
--- /dev/null
+++ b/multimedia/mt-daapd/rc.mt-daapd
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# mt-daapd iTunes music server daemon.
+#
+
+start() {
+ if [ -x /usr/sbin/mt-daapd ]; then
+ echo "Starting mt-daapd iTunes server: /usr/sbin/mt-daapd"
+ /usr/sbin/mt-daapd -c /etc/mt-daapd.conf 2> /dev/null
+ sleep 1
+ fi
+}
+
+stop() {
+ echo "Killing mt-daapd iTunes server... "
+ killall /usr/sbin/mt-daapd 2> /dev/null
+}
+
+# How to call it.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ sleep 1
+ start
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ ;;
+esac