#wall stopping testdaq on `head /usr/local/etc/.domhub_name`...
cd $HOME
echo STOPPING TESTDAQ CLEANLY pausetestdaq at `date` >> testdaq.log
#echo STOPPING TESTDAQ at `date` >> domhubapp.log
echo STOPPING TESTDAQ CLEANLY pausetestdaq at `date` >> $HOME/nohup.out
echo
echo
echo "killing automate..."
killall automate

echo
echo
echo "note that the current run will continue until it finishes"
echo "domhub-app will continue to run on the hubs, and will be ready to take data later"
echo "please use 'ps -ef' to see if it is safe to start up data-taking again"
echo "It can take a while for a run to end..."


#sleep 1
#echo "turning off pulser..."
#turnpulser2off.py
#echo "turning off DOMs..."
#off all
#wall "(stoptestdaq) DOMs now off for `head /usr/local/etc/.domhub_name`"
echo
echo
