summaryrefslogtreecommitdiff
path: root/openwrt/package/mt-daapd/files
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-08-24 19:11:35 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-08-24 19:11:35 +0000
commitda8828bfec2bc961874f88cf3cb71d29f27b7f0c (patch)
tree2f85282ba12a45bc37687d612efee60c72f9ca82 /openwrt/package/mt-daapd/files
parentbe3dc1bb5a1a3b33d42f0d0d5d6d617ccd69dec5 (diff)
add mt-daapd package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1746 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/mt-daapd/files')
-rw-r--r--openwrt/package/mt-daapd/files/mt-daapd.init22
1 files changed, 22 insertions, 0 deletions
diff --git a/openwrt/package/mt-daapd/files/mt-daapd.init b/openwrt/package/mt-daapd/files/mt-daapd.init
new file mode 100644
index 0000000000..2968769c78
--- /dev/null
+++ b/openwrt/package/mt-daapd/files/mt-daapd.init
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+BIN=mt-daapd
+DEFAULT=/etc/default/$BIN
+RUN_D=/var/run
+PID_F=$RUN_D/$BIN.pid
+[ -f $DEFAULT ] && . $DEFAULT
+
+case $1 in
+ start)
+ [ -d $RUN_D ] || mkdir -p $RUN_D
+ $BIN $OPTIONS
+ ;;
+ stop)
+ [ -f $PID_F ] && kill -INT $(cat $PID_F)
+ ;;
+ *)
+ echo "usage: $0 (start|stop)"
+ exit 1
+esac
+
+exit $?