#! /bin/csh

set user=`/usr/ucb/whoami`

echo "user = $user"

if $user != "isti"  then
	echo " You must su to the isti user to run this! "
	exit -1
endif

echo "Starting dlog agent"

cd /home/isti/CA_cpp/dlogagent

# run it in an infinite loop as it will exit if the NSI host dies
# and the event channels disappear.


while (1)
	./dlogagent -ORBconfig orb.config collection.ini 
	# the agent will only exit  if there is a serious problem or
	# if the Event Channels go down (indicating the NSI server crashed)
	sleep 60
end
