~george-edison55/charms/precise/python-django/fix-readme

« back to all changes in this revision

Viewing changes to hooks/website-relation-changed

  • Committer: Patrick Hetu
  • Date: 2012-07-06 16:02:20 UTC
  • Revision ID: patrick.hetu@gmail.com-20120706160220-wsrgu3l69dk4a6k5
Stop on error in hooks and minor changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
UNIT_NAME=`echo $JUJU_UNIT_NAME | cut -d/ -f1`
4
 
PORT=`grep "bind" /etc/gunicorn.d/${UNIT_NAME}.conf | sed -e "s/.*:\(.*\)',/\1/"`
5
 
DOMAIN=`cat /srv/${UNIT_NAME}/initial_data.json | grep domain | python -c "import re,sys;print re.match('\"domain\": \"(.*)\"', sys.stdin.read().strip()).group(1)"`
6
 
 
7
 
relation-set port=${PORT} hostname=`hostname -f` domain=${DOMAIN}