From 749862d6767c03413effc1505e44188bed5b9f7b Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 21 Jul 2017 23:35:05 +1200 Subject: [PATCH] Permit passing of TTRSS_SELF_URL to override auto-generation --- root/srv/setup-ttrss.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/root/srv/setup-ttrss.sh b/root/srv/setup-ttrss.sh index e5b03bc..0b931d9 100755 --- a/root/srv/setup-ttrss.sh +++ b/root/srv/setup-ttrss.sh @@ -104,9 +104,12 @@ setup_ttrss() fi fi - # Construct the final URL TTRSS will use. - TTRSS_SELF_URL=${TTRSS_PROTO}://${TTRSS_URL}${TTRSS_PORT}/ - + # If we've been passed $TTRSS_SELF_URL as an env variable, then use that, + # But if not, use the URL we constructed above + if [ -z "$TTRSS_SELF_URL ]; then + # Construct the final URL TTRSS will use. + TTRSS_SELF_URL=${TTRSS_PROTO}://${TTRSS_URL}${TTRSS_PORT}/ + fi echo "Setup: URL is: $TTRSS_SELF_URL" # Patch URL path.