scan whole logfile
This commit is contained in:
@@ -40,18 +40,17 @@ waitsec=35
|
|||||||
|
|
||||||
echo "Waiting for ${name} to start, looking logfile ${log}"
|
echo "Waiting for ${name} to start, looking logfile ${log}"
|
||||||
|
|
||||||
|
#echo "wait string: $waitfor"
|
||||||
|
|
||||||
while true ; do
|
while true ; do
|
||||||
t=`expr ${t} + 2`
|
if grep "${waitfor}" ${log} > /dev/null; then
|
||||||
sleep 2
|
|
||||||
echo "Have waited $t seconds"
|
|
||||||
if tail -30 ${log} | grep "${waitfor}" > /dev/null; then
|
|
||||||
break
|
break
|
||||||
fi
|
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 ?"
|
echo "The ${name} failed to bind to any sockets, another ${name} running ?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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 ?"
|
echo "The ${name} failed to bind to any sockets, another ${name} running ?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -59,6 +58,10 @@ while true ; do
|
|||||||
echo "Waited for $waitsec for the ${name} to start, and it didnt happen"
|
echo "Waited for $waitsec for the ${name} to start, and it didnt happen"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
t=`expr ${t} + 2`
|
||||||
|
sleep 2
|
||||||
|
echo "Have waited $t seconds"
|
||||||
done
|
done
|
||||||
|
|
||||||
exit 0
|
exit 0
|
Reference in New Issue
Block a user