#!/bin/bash

# Init file for Stargazer Internet authorization system
#
# chkconfig: 2345 55 25
# description: Stargazer Internet authorization system
#
# processname: sgauth.bin

# source function library
. /etc/rc.d/init.d/functions

RETVAL=0
# Some functions to make the below more readable


case "$1" in
	start)
		
		echo -n "Starting Stargazer Internet authorization system: "
			/usr/bin/sgauth && success
		echo
		;;
	stop)
		echo -n "Shutting down Stargazer Internet authorization system: "
			killall -9 sgauth.bin && success
		echo
		;;
	restart)
		$0 stop
		$0 start
		;;
	*)
		echo "Usage: sgauth {start|stop|restart}"
		exit 1
		;;
esac

exit $RETVAL
