#!/bin/sh

# Volumes
MOTECH_CONF="${VOLUMES_DIR}/motech/motech_conf"

# Variables
HTTP_HOST="${HOST}"
[ "${PORT}" != "443" ] && HTTP_HOST="${HTTP_HOST}:${PORT}"

# Replacements
sed -i "s|\(^server\.url=\).*|\1https://${HTTP_HOST}|" ${MOTECH_CONF}/config/motech-settings.properties