scan whole logfile

This commit is contained in:
Love Hornquist Astrand
2012-10-07 11:06:29 -07:00
parent 029de6cfa4
commit c707016669

View File

@@ -40,18 +40,17 @@ waitsec=35
echo "Waiting for ${name} to start, looking logfile ${log}"
#echo "wait string: $waitfor"
while true ; do
t=`expr ${t} + 2`
sleep 2
echo "Have waited $t seconds"
if tail -30 ${log} | grep "${waitfor}" > /dev/null; then
if grep "${waitfor}" ${log} > /dev/null; then
break
fi
if tail -30 ${log} | grep "No sockets" ; then
if grep "No sockets" ${log} ; then
echo "The ${name} failed to bind to any sockets, another ${name} running ?"
exit 1
fi
if tail -30 ${log} | grep "bind" | grep "Operation not permitted" ; then
if grep "bind" ${log} | grep "Operation not permitted" ; then
echo "The ${name} failed to bind to any sockets, another ${name} running ?"
exit 1
fi
@@ -59,6 +58,10 @@ while true ; do
echo "Waited for $waitsec for the ${name} to start, and it didnt happen"
exit 2
fi
t=`expr ${t} + 2`
sleep 2
echo "Have waited $t seconds"
done
exit 0