c=1

stopfile=/data/seestats/stop_lt
runfile=/data/seestats/run_st

# while [ 1 ]
# do

	if [ -f "$runfile" ]
	then
		echo "$runfile found."
		echo "short term session active ..."
#		sleep 60

	else 	
	
		echo "---------------"
		echo "Long term $c times" $(date +%s) $(date)  

		# Idea is to club things together, spreading utilities may not be a good idea.
		# That is why we call scripts sets one after another. 	
	
		echo "Snapshot before"	
		/data/seestats/scripts_set4.sh
		/data/seestats/scripts_set1.sh		
		/data/seestats/scripts_set2.sh
		/data/seestats/systemcheck.sh
		echo "Snapshot after"	
		/data/seestats/scripts_set4.sh

		# 15 mins
		# Trying to be on the conservative side.
		# <Needs Testing>: Hoping that the utility gets a chance to be called amidst suspend events. 
		# sleep 900  


		# if [ -f "$stopfile" ]
		# then
		#	echo "$stopfile found."
		#	break
		# fi

		# (( c++ ))
	fi

# done
