My script that I have gotten much help with on here is almost complete..
I need to add a loop, to try a script 4 times, after the 4th time, just stop..
do
auth=$(ps -ef | grep [a]uth | awk '{ print $2}')
if [ -n "$auth" ]
then
echo "Process is running"
ps=$(ps -ef | grep ps | awk '{ print $2}')
if [ -n "$ps" ]
then
echo "Start All Processes"
###START process script
else
echo "Starting Authentication".
cd /home/dir/app
sleep 10
###START process script
fi
else
echo "Something....then try again 4 times then quit."
sleep 30
done
fi
thanks in advance