2019-09-18 11:29:58 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-04-10 13:03:34 +02:00
|
|
|
# Volumes
|
|
|
|
DATAPUSHER_CONF="${VOLUMES_DIR}/ckan/datapusher_conf"
|
|
|
|
CKAN_CONF="${VOLUMES_DIR}/ckan/ckan_conf"
|
2019-09-18 11:29:58 +02:00
|
|
|
|
2020-04-10 13:03:34 +02:00
|
|
|
# Variables
|
|
|
|
HOST="${HOST}.${DOMAIN}"
|
|
|
|
[ "${PORT}" != "443" ] && HOST="${HOST}:${PORT}"
|
2019-09-18 11:29:58 +02:00
|
|
|
|
2020-04-10 13:03:34 +02:00
|
|
|
# Replacements
|
|
|
|
sed -i "s|\(^ckan\.site_url = \).*|\1https://${HOST}|" ${CKAN_CONF}/ckan.ini
|
|
|
|
|
|
|
|
sed -i "s|\(^smtp\.mail_from = \).*|\1${EMAIL}|" ${CKAN_CONF}/ckan.ini
|
|
|
|
sed -i "s|\(^ckanext\.geoview\.gapi_key = \).*|\1${GMAPS_API_KEY}|" ${CKAN_CONF}/ckan.ini
|
|
|
|
|
|
|
|
sed -i "s|\(^FROM_EMAIL = \).*|\1'${EMAIL}'|" ${DATAPUSHER_CONF}/datapusher_settings.py
|