Problem
How to start Services, Manager, Container silently and synchronizedly?
Solution
How to achieve a synchronized and silent startup of
- Services
- Manager
- 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