setup-ttrss.sh: Better defaults for self URL.

This commit is contained in:
x86dev 2017-10-05 12:42:09 +02:00
parent 79a41e67d5
commit 8fd0fb4612

View File

@ -77,9 +77,9 @@ setup_ttrss()
TTRSS_URL=localhost TTRSS_URL=localhost
fi fi
# Tweak TTRSS_PORT, if defined. # Check if TTRSS_PORT is undefined, and if so, use 8888 as default.
if [ -n "$TTRSS_PORT" ]; then if [ -z ${TTRSS_PORT} ]; then
TTRSS_PORT=:${TTRSS_PORT} TTRSS_PORT=8888
fi fi
if [ "$TTRSS_WITH_SELFSIGNED_CERT" = "1" ]; then if [ "$TTRSS_WITH_SELFSIGNED_CERT" = "1" ]; then
@ -93,7 +93,7 @@ setup_ttrss()
TTRSS_PROTO=http TTRSS_PROTO=http
fi fi
# Add a leading colon (for the final URL) if a custom port is set. # Add a leading colon (for the final URL) to the port.
if [ -n "$TTRSS_PORT" ]; then if [ -n "$TTRSS_PORT" ]; then
TTRSS_PORT=:${TTRSS_PORT} TTRSS_PORT=:${TTRSS_PORT}
fi fi