4
unit_name=${JUJU_UNIT_NAME//\//-}
6
if [ -e /etc/gunicorn.d/${unit_name}.conf ]; then
8
bind_line=$(grep "bind=0.0.0.0:" /etc/gunicorn.d/${unit_name}.conf)
9
PORT=$(echo ${bind_line} | grep -o ":[0-9]*" | sed -e "s/://")
11
juju-log "PORT=${PORT}"
13
relation-set port="${PORT}" hostname=`unit-get private-address`