Spotter-VM/lxc-apps/pandora/install/update-conf.sh

13 lines
353 B
Bash
Raw Permalink Normal View History

#!/bin/sh
# Volumes
PANDORA_CONF="${VOLUMES_DIR}/pandora/pandora_conf"
# Variables
HTTP_HOST="${HOST}"
[ "${PORT}" != "443" ] && HTTP_HOST="${HTTP_HOST}:${PORT}"
# Replacements
sed -i "s|\(^\s\+\"url\": \).*|\1\"${HTTP_HOST}\"|" ${PANDORA_CONF}/config.jsonc
sed -i "s|\(^GOOGLE_API_KEY = \).*|\1'${GMAPS_API_KEY}'|" ${PANDORA_CONF}/local_settings.py