summaryrefslogtreecommitdiff
path: root/audio/mt-daapd/rc.mt-daapd
blob: c2d88322b7a14276feabf0371da390aa61d20fde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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