#!/bin/sh
#
# Start/stop bluealsa
#

SERVICE=bluealsa
DAEMON="/usr/bin/$SERVICE"

case "$1" in
start)
  echo "Starting $SERVICE..."
  start-stop-daemon -S -b -x "$DAEMON" -n "$SERVICE" -- -p a2dp-sink -p a2dp-source -p hfp-ag --sbc-quality=high
  ;;
stop)
  echo "Stopping $SERVICE..."
  start-stop-daemon -K -x "$DAEMON" -n "$SERVICE" -o
  ;;
restart)
  "$0" stop
  "$0" start
  ;;
*)
  echo "Usage: $0 {start|stop|restart}"
  exit 1
esac
