#!/bin/sh
#

# Source the common setup functions for startup scripts
test -r /etc/rc.common || exit 1
. /etc/rc.common

PATH=/usr/local/bin:$PATH
export PATH

RETVAL=0

start() {
	# Start daemons.

	echo "Starting argus: \c"
	/usr/local/sbin/argus
}

stop() {
	# Stop daemons.
	echo "Shutting down argus: \c"
	killall -TERM argus
	RETVAL=$?
	echo
}


StartService ()
{
	ConsoleMessage "Starting Argus server"
	start
}

StopService ()
{
        ConsoleMessage "Stopping Argus server"
	stop
}

RestartService ()
{
        ConsoleMessage "Restarting Argus server"
	stop
	sleep 1
	start
}

RunService "$1"
