#!/bin/sh
#
# /etc/init.d/isoundd  --  start/stop the isoundd daemon.
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
trap "" 1 15
test -x /usr/local/bin/isoundd || exit 0
case "$1" in
  start)
        echo -n "Starting Sound Daemon: isoundd"
        start-stop-daemon --start --quiet --pidfile /var/run/isoundd.pid \
            --exec /usr/local/bin/isoundd && echo "."
    ;;
  stop)
        echo -n "Stopping Sound Daemon: isoundd"
        killall -3 isoundd >/dev/null 2>&1 && echo "."
    ;;
  restart|force-reload)
        echo -n "Restarting Sound Daemon: isoundd"
        $0 stop >/dev/null && echo -n "."
        sleep 2 && echo -n "."
        $0 start >/dev/null && echo ".done."
    ;;
  *)
    echo "Usage: /etc/init.d/isoundd {start|stop|restart|force-reload}"
    exit 1
    ;;
esac
exit 0

