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)"`
7
relation-set port=${PORT} hostname=`hostname -f` domain=${DOMAIN}