diff --git a/stackato.yml b/stackato.yml index a0c7651..6f121c3 100644 --- a/stackato.yml +++ b/stackato.yml @@ -13,6 +13,6 @@ hooks: - sh stackato-setup.sh pre-running: # Workaround to pass $VCAP_SERVICES to cron - - echo $VCAP_SERVICES | tee $STACKATO_APP_ROOT/VCAP_SERVICES.json + - python vcap-workaround.py 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" diff --git a/vcap-workaround.py b/vcap-workaround.py new file mode 100644 index 0000000..23dc9d7 --- /dev/null +++ b/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'])