From 4a6bfa584bc211a389ee07979317871ea7cec0b3 Mon Sep 17 00:00:00 2001 From: x86dev Date: Fri, 28 Jul 2017 23:13:29 +0200 Subject: [PATCH] setup-ttrss.sh: Don't force setting a website port by default (can be specified by environment variable TTRSS_PORT). --- root/srv/setup-ttrss.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/root/srv/setup-ttrss.sh b/root/srv/setup-ttrss.sh index 64db99f..c01c6e9 100755 --- a/root/srv/setup-ttrss.sh +++ b/root/srv/setup-ttrss.sh @@ -86,22 +86,16 @@ setup_ttrss() # Make sure the TTRSS protocol is https now. TTRSS_PROTO=https - - # Set the default https port if not specified otherwise. - if [ -z ${TTRSS_PORT} ]; then - TTRSS_PORT=:4443 - fi fi # If no protocol is specified, use http as default. Not secure, I know. if [ -z ${TTRSS_PROTO} ]; then - TTRSS_PROTO=http + fi - # Set the default port if not specified otherwise. - if [ -z ${TTRSS_PORT} ]; then - TTRSS_PORT=:8080 - fi + # Add a leading colon (for the final URL) if a custom port is set. + if [ -n "$TTRSS_PORT" ]; then + TTRSS_PORT=:${TTRSS_PORT} fi # If we've been passed $TTRSS_SELF_URL as an env variable, then use that,