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
while [ $STATUSTEST -eq 0 ] ; do
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 "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]

View File

@ -2,13 +2,13 @@
#
### BEGIN INIT INFO
# Provides: idempiere
# Provides: idempiere
# Required-Start: postgresql
# Required-Stop: postgresql
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: iDempiere 1.0.0 server
# Description: Provides iDempiere ERP-CRM Server startup and shutdown script. Requires PostgreSQL server.
# Description: Provides iDempiere ERP-CRM Server startup and shutdown script. Requires PostgreSQL server.
# FileTarget: /etc/init.d/idempiere
# FileOwner: root.root
# FilePerms: 0755
@ -57,7 +57,7 @@ start () {
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
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 "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]

View File

@ -53,7 +53,7 @@ start () {
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
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 "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]

View File

@ -83,7 +83,7 @@ start () {
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
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 "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]