rc.mt-daapd 571 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. #
  3. # mt-daapd iTunes music server daemon.
  4. #
  5. start() {
  6. if [ -x /usr/sbin/mt-daapd ]; then
  7. echo "Starting mt-daapd iTunes server: /usr/sbin/mt-daapd"
  8. /usr/sbin/mt-daapd -c /etc/mt-daapd.conf 2> /dev/null
  9. sleep 1
  10. fi
  11. }
  12. stop() {
  13. echo "Killing mt-daapd iTunes server... "
  14. killall /usr/sbin/mt-daapd 2> /dev/null
  15. }
  16. # How to call it.
  17. case "$1" in
  18. start)
  19. start
  20. ;;
  21. stop)
  22. stop
  23. ;;
  24. restart)
  25. stop
  26. sleep 1
  27. start
  28. ;;
  29. *)
  30. echo $"Usage: $0 {start|stop|restart}"
  31. ;;
  32. esac