Skip to content

Commit

Permalink
Merge pull request #3 from ryancox/space_fix
Browse files Browse the repository at this point in the history
Strip spaces from supervisorctl output.

Some platforms/versions right-align these values and the extra spaces cause
problems further in the script.
  • Loading branch information
niemeyer committed Jul 30, 2014
2 parents da1f96f + 0b0a799 commit d6023fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testdb/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ start() {
chmod 600 keyfile
echo "Running supervisord..."
supervisord || ( echo "Supervisord failed executing ($?)" && exit 1 )
COUNT=$(grep '^\[program' supervisord.conf | wc -l)
COUNT=$(grep '^\[program' supervisord.conf | wc -l | tr -d ' ')
echo "Supervisord is up, starting $COUNT processes..."
for i in $(seq 10); do
RUNNING=$(supervisorctl status | grep RUNNING | wc -l)
RUNNING=$(supervisorctl status | grep RUNNING | wc -l | tr -d ' ')
echo "$RUNNING processes running..."
if [ x$COUNT = x$RUNNING ]; then
echo "Running setup.js with mongo..."
Expand Down

0 comments on commit d6023fc

Please sign in to comment.