remove stale patches, fixes ticket #1579
[openwrt/svn-archive/archive.git] / sound / mt-daapd / files / mt-daapd.init
index 2968769c782ba9bcc392bf7a61f03da271800f29..460824ef6ca91734e0d080994a507b17f8a3ed6b 100644 (file)
@@ -1,22 +1,18 @@
-#!/bin/sh
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
 
 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
+start() {
+       [ -f $DEFAULT ] && . $DEFAULT
+       [ -d $RUN_D ] || mkdir -p $RUN_D
+       $BIN $OPTIONS
+}
+
+stop() {
+       [ -f $PID_F ] && kill -INT $(cat $PID_F)
+}
 
-exit $?