Problem

How to start Services, Manager, Container silently and synchronizedly?

Solution

How to achieve a synchronized and silent startup of

  1. Services
  2. Manager
  3. Container (Java / Python)

This is, for instance, desirable in a test prologue

A: Use the following script

Note that you may as well run a python container by specifying something like -py myPieContainer (see italic part below)


#! /bin/bash
 
TEMPLOG=./templog
EXPECT="components activated"
 
#echo acsStart...
acsStart >$TEMPLOG 2>&1
 
# Now find out which instance of ACS we are running:
EXPORTACSINSTANCE=`grep 'export ACS_INSTANCE' $TEMPLOG | cut -d\\' -f 2`
echo $EXPORTACSINSTANCE > $ACSINSTANCE          # for stopACS.sh
eval $EXPORTACSINSTANCE                         # for acsStartContainer
 

#echo acsStartContainer...
exec >>$TEMPLOG 2>&1 acsStartContainer -java hugoActivator &

maxSecs=300
i=0
while [ `grep -c "$EXPECT" $TEMPLOG` == 0 ] && [ ! $i == $maxSecs ] ; do 
   sleep 1
   let i=i+1
done

#echo clean up
rm $TEMPLOG
 
#echo done


-- DavidFugate - 17 Sep 2004

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.



Related issues