Improvement for the service scripts - when the log grows too quickly, reading just last 9 lines is not enough

This commit is contained in:
Carlos Ruiz 2019-04-19 19:20:05 +02:00
parent 191ee4a74d
commit bd00fdc42c
4 changed files with 6 additions and 6 deletions

View File

@ -580,7 +580,7 @@ start () {
ITERATIONS=0 ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do while [ $STATUSTEST -eq 0 ] ; do
sleep $SLEEPSECONDS sleep $SLEEPSECONDS
tail -n 9 $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1 cat $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
echo -n "." echo -n "."
ITERATIONS=`expr $ITERATIONS + 1` ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ] if [ $ITERATIONS -gt $MAXITERATIONS ]

View File

@ -57,7 +57,7 @@ start () {
ITERATIONS=0 ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do while [ $STATUSTEST -eq 0 ] ; do
sleep 2 sleep 2
tail -n 9 $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1 cat $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
echo -n "." echo -n "."
ITERATIONS=`expr $ITERATIONS + 1` ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ] if [ $ITERATIONS -gt $MAXITERATIONS ]

View File

@ -53,7 +53,7 @@ start () {
ITERATIONS=0 ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do while [ $STATUSTEST -eq 0 ] ; do
sleep 2 sleep 2
tail -n 9 $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1 cat $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
echo -n "." echo -n "."
ITERATIONS=`expr $ITERATIONS + 1` ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ] if [ $ITERATIONS -gt $MAXITERATIONS ]

View File

@ -83,7 +83,7 @@ start () {
ITERATIONS=0 ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do while [ $STATUSTEST -eq 0 ] ; do
sleep 2 sleep 2
tail -n 9 $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1 cat $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
echo -n "." echo -n "."
ITERATIONS=`expr $ITERATIONS + 1` ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ] if [ $ITERATIONS -gt $MAXITERATIONS ]