diff --git a/pandora.sh b/pandora.sh index ddce635..845df6f 100755 --- a/pandora.sh +++ b/pandora.sh @@ -37,6 +37,7 @@ else fi cp ${SOURCE_DIR}/srv/pandora/conf/gunicorn_config.py /srv/pandora/conf/gunicorn_config.py envsubst <${SOURCE_DIR}/srv/pandora/conf/local_settings.py >/srv/pandora/conf/local_settings.py +cp ${SOURCE_DIR}/srv/pandora/update-url.sh /srv/pandora/update-url.sh # Set "production values" (increases performance) only if the DEBUG environment variable is not set if [ ${DEBUG:-0} -eq 0 ]; then diff --git a/pandora/srv/pandora/conf/config.jsonc b/pandora/srv/pandora/conf/config.jsonc index 953c4b7..89fe7de 100644 --- a/pandora/srv/pandora/conf/config.jsonc +++ b/pandora/srv/pandora/conf/config.jsonc @@ -1033,7 +1033,7 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. "id": "pandora", "name": "pan.do/ra", "sendReferrer": true, - "url": "pandora.local" + "url": "pandora.spotter.vm" }, /* "sitePages" defines the sections of the main site dialog. If "news" is diff --git a/pandora/srv/pandora/update-url.sh b/pandora/srv/pandora/update-url.sh new file mode 100755 index 0000000..061597f --- /dev/null +++ b/pandora/srv/pandora/update-url.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +HOST="${1}" +[ "${2}" != "443" ] && HOST="${1}:${2}" + +sed -i "s|^ \"url\":.*| \"url\": \"pandora.${HOST}\"|" /srv/pandora/conf/config.jsonc