forked from 0k/0k-charms
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
379 B
22 lines
379 B
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
. lib/common
|
|
|
|
DOMAIN=$(relation-get domain) || exit 1
|
|
PROTO=$(relation-get protocol) || true
|
|
PROTO=${PROTO:-https}
|
|
|
|
## These are mainly to setup the correct web-hook
|
|
if [ "$MASTER_BASE_SERVICE_NAME" == "$DOMAIN" ]; then
|
|
## This is because the IP will be the docker container version
|
|
PROTO=http
|
|
fi
|
|
|
|
ini_merge <<EOF
|
|
|
|
http:
|
|
host: $PROTO://$DOMAIN
|
|
|
|
EOF
|