#!/bin/sh
# Begin /etc/init.d/nas

### BEGIN INIT INFO
# Provides:            nas
# Required-Start:      $network
# Should-Start:        $remote_fs
# Required-Stop:       $network
# Should-Stop:         $remote_fs
# Default-Start:       3 4 5 
# Default-Stop:        0 1 2 6
# Short-Description:   Starts/Stops the Network Audio System Server.
# Description:         Starts and stops the Network Audio System Server daemon.
# X-LFS-Provided-By:   BLFS
### END INIT INFO

. /lib/lsb/init-functions

MESSAGE="the Network Audio System Server..."

case "$1" in
        start)
		start_daemon /opt/X11/bin/nasd -aa -b 2>&1 >> /dev/null
                evaluate_retval start
		;;

        stop)
                killproc /opt/X11/bin/nasd
                evaluate_retval stop
                ;;

        reload)
                reloadproc /opt/X11/bin/nasd
                evaluate_retval reload
                ;;

        restart)
                $0 stop
                sleep 1
                $0 start
                ;;

        status)
                statusproc /opt/X11/bin/nasd
                ;;

        *)
                echo "Usage: $0 {start|stop|reload|restart|status}"
                exit 1
                ;;
esac

# End /etc/init.d/nasd
