2018-09-20 14:03:23 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-04-10 13:03:34 +02:00
|
|
|
# Volumes
|
|
|
|
SAHANA_CONF="${VOLUMES_DIR}/sambro/sahana_conf"
|
2018-09-20 14:03:23 +02:00
|
|
|
|
2020-04-10 13:03:34 +02:00
|
|
|
# Variables
|
2020-04-10 17:57:42 +02:00
|
|
|
HTTP_HOST="${HOST}"
|
|
|
|
[ "${PORT}" != "443" ] && HTTP_HOST="${HTTP_HOST}:${PORT}"
|
2020-04-10 13:03:34 +02:00
|
|
|
|
|
|
|
# Replacements
|
2020-04-10 17:57:42 +02:00
|
|
|
sed -i "s|\(^settings\.base\.public_url = \).*|\1\"https://${HTTP_HOST}\"|" ${SAHANA_CONF}/000_config.py
|
2020-04-10 13:03:34 +02:00
|
|
|
sed -i "s|\(^settings\.mail\.sender = \).*|\1\"${EMAIL}\"|" ${SAHANA_CONF}/000_config.py
|
|
|
|
sed -i "s|\(^settings\.mail\.approver = \).*|\1\"${EMAIL}\"|" ${SAHANA_CONF}/000_config.py
|
|
|
|
sed -i "s|\(^settings\.gis\.api_google = \).*|\1\"${GMAPS_API_KEY}\"|" ${SAHANA_CONF}/000_config.py
|