aboutsummaryrefslogtreecommitdiff
path: root/libraries/bluez-alsa/rc.bluez-alsa
blob: 94d83656a876cb623b31cf18469da9fb3f809736 (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
#!/bin/sh
#
# /etc/rc.d/rc.bluez-alsa
#

case "$1" in
  'start')
    nohup /usr/bin/bluealsa > /dev/null 2>&1 &
    echo $! > /var/run/bluealsa.pid 
  ;;
  'stop')
    kill $(cat /var/run/bluealsa.pid)
    rm -f /var/run/bluealsa.pid
  ;;
  'restart')
    kill $(cat /var/run/bluealsa.pid)
    nohup /usr/bin/bluealsa > /dev/null 2>&1 &
    echo $! > /var/run/bluealsa.pid
  ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
  ;;
esac