#!/bin/sh
#
# Initialize HW volume daemon
#

NAME="ALSA hardvolume daemon"
DAEMON=/usr/bin/hardvold
SERVICE=hardvold

case "$1" in
start)
  echo "Starting $NAME..."
  start-stop-daemon -S -b -x "$DAEMON" -n "$SERVICE"
  ;;
stop)
  echo "Stopping $NAME..."
  start-stop-daemon -K -x "$DAEMON" -n "$SERVICE" -o
  ;;
restart|reload)
  $0 stop
  $0 start
  ;;
*)
  echo "Usage: $0 {start|stop|restart}"
  exit 1
esac

exit $?
