#!/bin/bash
#
# Hemisphere GPS script for notifying CAN peers of system shutdown.
#
### BEGIN INIT INFO
# Provides:          CAN_shutdown_notify
# Required-Start:    $remote_fs $syslog can_server
# Required-Stop:     $remote_fs $syslog can_server
# Default-Start:     
# Default-Stop:      0
# Short-Description: Send CAN notification on system shutdown.
# Description:       .
### END INIT INFO

#set -x

. /etc/ags-celestia/can_messaging_functions
. /etc/ags-celestia/can_messaging_ids

case $1 in
    start)
        init_serial_messaging_commands
        send_status_message $STATUS_MSG_ID_STARTING;
	;;

    stop)
        send_status_message $STATUS_MSG_ID_SHUTDOWN;
        ;;

    *)
        exit 1
	;;
esac

exit 0
