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

13 lines
343 B
Bash
Executable File

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