Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Adapt the Phantom readypgm to the replica feature in the epu recipe
Browse files Browse the repository at this point in the history
Program names are now suffixed by a unique number generated inside the
epu recipe. Make a partial match with grep instead of asking for an
exact match from supervisorctl.

Since there is generally only one program per supervisord, it shouldn't
change anything.
  • Loading branch information
priteau committed Oct 17, 2012
1 parent 8d98e7a commit 90d8426
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plan/common/ready.sh
Expand Up @@ -7,8 +7,8 @@ PROCESS_NAME=`cat bootconf.json | python -c "import sys; import json; j = json.l
VENV_PATH=`cat bootconf.json | python -c "import sys; import json; j = json.loads(sys.stdin.read()); print j['epu']['virtualenv']['path']"`

set +e
STATUS=`sudo -u epu sh -c ". $VENV_PATH/bin/activate; supervisorctl -c $APP_DIR/supervisor.conf status $PROCESS_NAME"`
echo $STATUS | grep RUNNING > /dev/null
STATUS=`sudo -u epu sh -c ". $VENV_PATH/bin/activate; supervisorctl -c $APP_DIR/supervisor.conf status"`
echo $STATUS | grep $PROCESS_NAME | grep RUNNING > /dev/null
if [ $? != 0 ]; then
echo $STATUS
exit 1
Expand Down

0 comments on commit 90d8426

Please sign in to comment.