#!/bin/sh
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides:          nyq-appliance
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     5
# Default-Stop:      0 1 6
# Short-Description: Initialization script for Nyquist Appliances
# Description:       This script is used to kick off the Nyquist
#		     appliance application at startup.
### END INIT INFO

# Author: Matt Murphy mmurphy@bogen.com
#


DESC="Nyquist Appliance Service"
D_NAME=nyq-appliance
DAEMON=/usr/sbin/$D_NAME

# The following part carries out specific functions depending on arguments.
case "$1" in
  start)
    echo "Starting $D_NAME"
    /root/gpio.sh
    #$DAEMON
    echo "$D_NAME is alive"
    ;;
  stop)
    echo "Stopping $D_NAME"
    #$DAEMON
    echo "$D_NAME is dead"
    ;;
  *)
    echo "Usage: /etc/init.d/$D_NAME {start|stop}"
    exit 1
    ;;
esac

exit 0
