Skip to content

Commit

Permalink
added echo to script file to prevent $VCAP_SERVICES piping to STDOUT.
Browse files Browse the repository at this point in the history
  • Loading branch information
bacongobbler committed Jun 21, 2013
1 parent edd2fbc commit 6bb2485
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stackato.yml
Expand Up @@ -13,6 +13,6 @@ hooks:
- sh stackato-setup.sh - sh stackato-setup.sh
pre-running: pre-running:
# Workaround to pass $VCAP_SERVICES to cron # Workaround to pass $VCAP_SERVICES to cron
- echo $VCAP_SERVICES | tee $STACKATO_APP_ROOT/VCAP_SERVICES.json - python vcap-workaround.py
cron: cron:
- "*/15 * * * * VCAP_SERVICES=$(cat $STACKATO_APP_ROOT/VCAP_SERVICES.json) $STACKATO_APP_ROOT/drush/drush cron >>$STACKATO_APP_ROOT/logs/cron.log 2>&1" - "*/15 * * * * VCAP_SERVICES=$(cat $STACKATO_APP_ROOT/VCAP_SERVICES.json) $STACKATO_APP_ROOT/drush/drush cron >>$STACKATO_APP_ROOT/logs/cron.log 2>&1"
5 changes: 5 additions & 0 deletions vcap-workaround.py
@@ -0,0 +1,5 @@
#!/usr/bin/env python
import os

f = open(os.path.join(os.environ['STACKATO_APP_ROOT'], 'VCAP_SERVICES.json'), 'w')
f.write(os.environ['VCAP_SERVICES'])

0 comments on commit 6bb2485

Please sign in to comment.