From fbef0c79e784397756a9da8f7bd80e5ad8a20d8b Mon Sep 17 00:00:00 2001 From: David Young Date: Wed, 19 Jul 2017 13:49:52 +1200 Subject: [PATCH 01/11] Upated for changed git URL for tt-rss HEAD --- root/srv/setup-ttrss.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/srv/setup-ttrss.sh b/root/srv/setup-ttrss.sh index a328e06..414e3e0 100755 --- a/root/srv/setup-ttrss.sh +++ b/root/srv/setup-ttrss.sh @@ -51,11 +51,11 @@ setup_ttrss() echo "Setup: Setting up Tiny Tiny RSS '$TTRSS_GIT_TAG' ..." cd ${TTRSS_PATH} git init . - git fetch --depth=1 https://tt-rss.org/gitlab/fox/tt-rss.git refs/tags/${TTRSS_GIT_TAG}:refs/tags/${TTRSS_GIT_TAG} + git fetch --depth=1 https://git.tt-rss.org/git/tt-rss.git refs/tags/${TTRSS_GIT_TAG}:refs/tags/${TTRSS_GIT_TAG} git checkout tags/${TTRSS_GIT_TAG} else echo "Setup: Setting up Tiny Tiny RSS (latest revision) ..." - git clone --depth=1 https://tt-rss.org/gitlab/fox/tt-rss.git ${TTRSS_PATH} + git clone --depth=1 https://git.tt-rss.org/git/tt-rss.git ${TTRSS_PATH} fi git clone --depth=1 https://github.com/sepich/tt-rss-mobilize.git ${TTRSS_PATH}/plugins/mobilize git clone --depth=1 https://github.com/hrk/tt-rss-newsplus-plugin.git ${TTRSS_PATH}/plugins/api_newsplus From 314161df6c6bc22e60de3a3cf631a611f3626f26 Mon Sep 17 00:00:00 2001 From: David Young Date: Wed, 19 Jul 2017 18:28:52 +1200 Subject: [PATCH 02/11] Moved tt-rss repo URL into variable --- root/srv/setup-ttrss.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/root/srv/setup-ttrss.sh b/root/srv/setup-ttrss.sh index 414e3e0..e1f531b 100755 --- a/root/srv/setup-ttrss.sh +++ b/root/srv/setup-ttrss.sh @@ -44,18 +44,18 @@ setup_nginx() setup_ttrss() { TTRSS_PATH=/var/www/ttrss - + TTRSS_REPO=https://git.tt-rss.org/git/tt-rss.git if [ ! -d ${TTRSS_PATH} ]; then mkdir -p ${TTRSS_PATH} if [ -n "$TTRSS_GIT_TAG" ]; then echo "Setup: Setting up Tiny Tiny RSS '$TTRSS_GIT_TAG' ..." cd ${TTRSS_PATH} git init . - git fetch --depth=1 https://git.tt-rss.org/git/tt-rss.git refs/tags/${TTRSS_GIT_TAG}:refs/tags/${TTRSS_GIT_TAG} + git fetch --depth=1 $TTRSS_REPO refs/tags/${TTRSS_GIT_TAG}:refs/tags/${TTRSS_GIT_TAG} git checkout tags/${TTRSS_GIT_TAG} else echo "Setup: Setting up Tiny Tiny RSS (latest revision) ..." - git clone --depth=1 https://git.tt-rss.org/git/tt-rss.git ${TTRSS_PATH} + git clone --depth=1 $TTRSS_REPO ${TTRSS_PATH} fi git clone --depth=1 https://github.com/sepich/tt-rss-mobilize.git ${TTRSS_PATH}/plugins/mobilize git clone --depth=1 https://github.com/hrk/tt-rss-newsplus-plugin.git ${TTRSS_PATH}/plugins/api_newsplus From 2e3669cc18f4021526a2adc40b496227779b7d26 Mon Sep 17 00:00:00 2001 From: David Young Date: Wed, 19 Jul 2017 18:52:19 +1200 Subject: [PATCH 03/11] Add passing TTRSS_GITURL as env variable --- root/srv/setup-ttrss.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/root/srv/setup-ttrss.sh b/root/srv/setup-ttrss.sh index e1f531b..e5b03bc 100755 --- a/root/srv/setup-ttrss.sh +++ b/root/srv/setup-ttrss.sh @@ -43,8 +43,14 @@ setup_nginx() setup_ttrss() { - TTRSS_PATH=/var/www/ttrss - TTRSS_REPO=https://git.tt-rss.org/git/tt-rss.git + if [ -z "$TTRSS_REPO" ]; then + TTRSS_HOST=https://git.tt-rss.org/git/tt-rss.git + fi + + if [ -z "$TTRSS_PATH" ]; then + TTRSS_PATH=/var/www/ttrss + fi + if [ ! -d ${TTRSS_PATH} ]; then mkdir -p ${TTRSS_PATH} if [ -n "$TTRSS_GIT_TAG" ]; then From 34fb586912f5a7020d62c19c00b88058f70f3aeb Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 21 Jul 2017 21:47:51 +1200 Subject: [PATCH 04/11] Added wait-for-it.sh for startup control --- root/srv/wait-for-it.sh | 177 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100755 root/srv/wait-for-it.sh diff --git a/root/srv/wait-for-it.sh b/root/srv/wait-for-it.sh new file mode 100755 index 0000000..401a6f1 --- /dev/null +++ b/root/srv/wait-for-it.sh @@ -0,0 +1,177 @@ +#!/usr/bin/env bash +# Use this script to test if a given TCP host/port are available + +cmdname=$(basename $0) + +echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } + +usage() +{ + cat << USAGE >&2 +Usage: + $cmdname host:port [-s] [-t timeout] [-- command args] + -h HOST | --host=HOST Host or IP under test + -p PORT | --port=PORT TCP port under test + Alternatively, you specify the host and port as host:port + -s | --strict Only execute subcommand if the test succeeds + -q | --quiet Don't output any status messages + -t TIMEOUT | --timeout=TIMEOUT + Timeout in seconds, zero for no timeout + -- COMMAND ARGS Execute command with args after the test finishes +USAGE + exit 1 +} + +wait_for() +{ + if [[ $TIMEOUT -gt 0 ]]; then + echoerr "$cmdname: waiting $TIMEOUT seconds for $HOST:$PORT" + else + echoerr "$cmdname: waiting for $HOST:$PORT without a timeout" + fi + start_ts=$(date +%s) + while : + do + if [[ $ISBUSY -eq 1 ]]; then + nc -z $HOST $PORT + result=$? + else + (echo > /dev/tcp/$HOST/$PORT) >/dev/null 2>&1 + result=$? + fi + if [[ $result -eq 0 ]]; then + end_ts=$(date +%s) + echoerr "$cmdname: $HOST:$PORT is available after $((end_ts - start_ts)) seconds" + break + fi + sleep 1 + done + return $result +} + +wait_for_wrapper() +{ + # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692 + if [[ $QUIET -eq 1 ]]; then + timeout $BUSYTIMEFLAG $TIMEOUT $0 --quiet --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & + else + timeout $BUSYTIMEFLAG $TIMEOUT $0 --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & + fi + PID=$! + trap "kill -INT -$PID" INT + wait $PID + RESULT=$? + if [[ $RESULT -ne 0 ]]; then + echoerr "$cmdname: timeout occurred after waiting $TIMEOUT seconds for $HOST:$PORT" + fi + return $RESULT +} + +# process arguments +while [[ $# -gt 0 ]] +do + case "$1" in + *:* ) + hostport=(${1//:/ }) + HOST=${hostport[0]} + PORT=${hostport[1]} + shift 1 + ;; + --child) + CHILD=1 + shift 1 + ;; + -q | --quiet) + QUIET=1 + shift 1 + ;; + -s | --strict) + STRICT=1 + shift 1 + ;; + -h) + HOST="$2" + if [[ $HOST == "" ]]; then break; fi + shift 2 + ;; + --host=*) + HOST="${1#*=}" + shift 1 + ;; + -p) + PORT="$2" + if [[ $PORT == "" ]]; then break; fi + shift 2 + ;; + --port=*) + PORT="${1#*=}" + shift 1 + ;; + -t) + TIMEOUT="$2" + if [[ $TIMEOUT == "" ]]; then break; fi + shift 2 + ;; + --timeout=*) + TIMEOUT="${1#*=}" + shift 1 + ;; + --) + shift + CLI="$@" + break + ;; + --help) + usage + ;; + *) + echoerr "Unknown argument: $1" + usage + ;; + esac +done + +if [[ "$HOST" == "" || "$PORT" == "" ]]; then + echoerr "Error: you need to provide a host and port to test." + usage +fi + +TIMEOUT=${TIMEOUT:-15} +STRICT=${STRICT:-0} +CHILD=${CHILD:-0} +QUIET=${QUIET:-0} + +# check to see if timeout is from busybox? +# check to see if timeout is from busybox? +TIMEOUT_PATH=$(realpath $(which timeout)) +if [[ $TIMEOUT_PATH =~ "busybox" ]]; then + ISBUSY=1 + BUSYTIMEFLAG="-t" +else + ISBUSY=0 + BUSYTIMEFLAG="" +fi + +if [[ $CHILD -gt 0 ]]; then + wait_for + RESULT=$? + exit $RESULT +else + if [[ $TIMEOUT -gt 0 ]]; then + wait_for_wrapper + RESULT=$? + else + wait_for + RESULT=$? + fi +fi + +if [[ $CLI != "" ]]; then + if [[ $RESULT -ne 0 && $STRICT -eq 1 ]]; then + echoerr "$cmdname: strict mode, refusing to execute subprocess" + exit $RESULT + fi + exec $CLI +else + exit $RESULT +fi From 79c5cd91f3767aa942168bd77f79ecf316b09877 Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 21 Jul 2017 22:22:01 +1200 Subject: [PATCH 05/11] Moved waitforit into Dockerfile, added to cont-init.d --- Dockerfile | 3 + root/etc/cont-init.d/98-wait-for-db | 22 ++++ root/srv/wait-for-it.sh | 177 ---------------------------- 3 files changed, 25 insertions(+), 177 deletions(-) create mode 100644 root/etc/cont-init.d/98-wait-for-db delete mode 100755 root/srv/wait-for-it.sh diff --git a/Dockerfile b/Dockerfile index 53985fa..6de0671 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,9 @@ COPY root / # Note: Tweak this line if you're running anything other than x86 AMD64 (64-bit). RUN curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v1.19.1.1/s6-overlay-amd64.tar.gz | tar xvzf - -C / +# Add wait-for-it.sh +ADD https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh /srv + # Expose Nginx ports. EXPOSE 8080 EXPOSE 4443 diff --git a/root/etc/cont-init.d/98-wait-for-db b/root/etc/cont-init.d/98-wait-for-db new file mode 100644 index 0000000..47458f5 --- /dev/null +++ b/root/etc/cont-init.d/98-wait-for-db @@ -0,0 +1,22 @@ +#!/usr/bin/with-contenv sh + +# Wait for the DB to be reachable before proceeding. This avoids race condition +# whereby database is not ready (yet), and so TTRSS config isn't correctly created + +############# +# This simply duplicates the logic from ttrss-configure-db.php +ename = 'DB'; +eport = 5432; + +if [ $DB_TYPE = 'pgsql ]; +then + eport = 5432; + dbhost = DB_PORT_5432_TCP_ADDR +else + eport = 3306; + dbhost = DB_PORT_3306_TCP_ADDR +fi +############# + +# Run wait-for-it.sh to confirm DB comes up before we proceed +/srv/wait-for-it.sh $dbhost:$eport diff --git a/root/srv/wait-for-it.sh b/root/srv/wait-for-it.sh deleted file mode 100755 index 401a6f1..0000000 --- a/root/srv/wait-for-it.sh +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/env bash -# Use this script to test if a given TCP host/port are available - -cmdname=$(basename $0) - -echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } - -usage() -{ - cat << USAGE >&2 -Usage: - $cmdname host:port [-s] [-t timeout] [-- command args] - -h HOST | --host=HOST Host or IP under test - -p PORT | --port=PORT TCP port under test - Alternatively, you specify the host and port as host:port - -s | --strict Only execute subcommand if the test succeeds - -q | --quiet Don't output any status messages - -t TIMEOUT | --timeout=TIMEOUT - Timeout in seconds, zero for no timeout - -- COMMAND ARGS Execute command with args after the test finishes -USAGE - exit 1 -} - -wait_for() -{ - if [[ $TIMEOUT -gt 0 ]]; then - echoerr "$cmdname: waiting $TIMEOUT seconds for $HOST:$PORT" - else - echoerr "$cmdname: waiting for $HOST:$PORT without a timeout" - fi - start_ts=$(date +%s) - while : - do - if [[ $ISBUSY -eq 1 ]]; then - nc -z $HOST $PORT - result=$? - else - (echo > /dev/tcp/$HOST/$PORT) >/dev/null 2>&1 - result=$? - fi - if [[ $result -eq 0 ]]; then - end_ts=$(date +%s) - echoerr "$cmdname: $HOST:$PORT is available after $((end_ts - start_ts)) seconds" - break - fi - sleep 1 - done - return $result -} - -wait_for_wrapper() -{ - # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692 - if [[ $QUIET -eq 1 ]]; then - timeout $BUSYTIMEFLAG $TIMEOUT $0 --quiet --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & - else - timeout $BUSYTIMEFLAG $TIMEOUT $0 --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & - fi - PID=$! - trap "kill -INT -$PID" INT - wait $PID - RESULT=$? - if [[ $RESULT -ne 0 ]]; then - echoerr "$cmdname: timeout occurred after waiting $TIMEOUT seconds for $HOST:$PORT" - fi - return $RESULT -} - -# process arguments -while [[ $# -gt 0 ]] -do - case "$1" in - *:* ) - hostport=(${1//:/ }) - HOST=${hostport[0]} - PORT=${hostport[1]} - shift 1 - ;; - --child) - CHILD=1 - shift 1 - ;; - -q | --quiet) - QUIET=1 - shift 1 - ;; - -s | --strict) - STRICT=1 - shift 1 - ;; - -h) - HOST="$2" - if [[ $HOST == "" ]]; then break; fi - shift 2 - ;; - --host=*) - HOST="${1#*=}" - shift 1 - ;; - -p) - PORT="$2" - if [[ $PORT == "" ]]; then break; fi - shift 2 - ;; - --port=*) - PORT="${1#*=}" - shift 1 - ;; - -t) - TIMEOUT="$2" - if [[ $TIMEOUT == "" ]]; then break; fi - shift 2 - ;; - --timeout=*) - TIMEOUT="${1#*=}" - shift 1 - ;; - --) - shift - CLI="$@" - break - ;; - --help) - usage - ;; - *) - echoerr "Unknown argument: $1" - usage - ;; - esac -done - -if [[ "$HOST" == "" || "$PORT" == "" ]]; then - echoerr "Error: you need to provide a host and port to test." - usage -fi - -TIMEOUT=${TIMEOUT:-15} -STRICT=${STRICT:-0} -CHILD=${CHILD:-0} -QUIET=${QUIET:-0} - -# check to see if timeout is from busybox? -# check to see if timeout is from busybox? -TIMEOUT_PATH=$(realpath $(which timeout)) -if [[ $TIMEOUT_PATH =~ "busybox" ]]; then - ISBUSY=1 - BUSYTIMEFLAG="-t" -else - ISBUSY=0 - BUSYTIMEFLAG="" -fi - -if [[ $CHILD -gt 0 ]]; then - wait_for - RESULT=$? - exit $RESULT -else - if [[ $TIMEOUT -gt 0 ]]; then - wait_for_wrapper - RESULT=$? - else - wait_for - RESULT=$? - fi -fi - -if [[ $CLI != "" ]]; then - if [[ $RESULT -ne 0 && $STRICT -eq 1 ]]; then - echoerr "$cmdname: strict mode, refusing to execute subprocess" - exit $RESULT - fi - exec $CLI -else - exit $RESULT -fi From bdf3aed5c346e9e623f94cb2048dc39495540e78 Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 21 Jul 2017 22:41:52 +1200 Subject: [PATCH 06/11] Updated to wait-for and fixed cond-init.d script --- Dockerfile | 3 ++- root/etc/cont-init.d/98-wait-for-db | 17 +++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6de0671..da871e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,8 @@ COPY root / RUN curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v1.19.1.1/s6-overlay-amd64.tar.gz | tar xvzf - -C / # Add wait-for-it.sh -ADD https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh /srv +ADD https://raw.githubusercontent.com/Eficode/wait-for/master/wait-for /srv +RUN chmod 755 /srv/wait-for # Expose Nginx ports. EXPOSE 8080 diff --git a/root/etc/cont-init.d/98-wait-for-db b/root/etc/cont-init.d/98-wait-for-db index 47458f5..c7b5ece 100644 --- a/root/etc/cont-init.d/98-wait-for-db +++ b/root/etc/cont-init.d/98-wait-for-db @@ -5,18 +5,19 @@ ############# # This simply duplicates the logic from ttrss-configure-db.php -ename = 'DB'; -eport = 5432; +ename='DB'; +eport=5432; -if [ $DB_TYPE = 'pgsql ]; +if [ '$DB_TYPE' = 'mysql' ]; then - eport = 5432; - dbhost = DB_PORT_5432_TCP_ADDR + eport=3306; + dbhost=$DB_PORT_3306_TCP_ADDR else - eport = 3306; - dbhost = DB_PORT_3306_TCP_ADDR + eport=5432; + dbhost=$DB_PORT_5432_TCP_ADDR fi ############# # Run wait-for-it.sh to confirm DB comes up before we proceed -/srv/wait-for-it.sh $dbhost:$eport +echo "Waiting for $dbhost:$eport..." +/srv/wait-for $dbhost:$eport -- echo "Done" From 11bfd4203799b7215300c6e3cc5d041707f9d19a Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 21 Jul 2017 22:56:08 +1200 Subject: [PATCH 07/11] Updated default db wait timeout to 60s --- root/etc/cont-init.d/98-wait-for-db | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/98-wait-for-db b/root/etc/cont-init.d/98-wait-for-db index c7b5ece..3e4160d 100644 --- a/root/etc/cont-init.d/98-wait-for-db +++ b/root/etc/cont-init.d/98-wait-for-db @@ -19,5 +19,5 @@ fi ############# # Run wait-for-it.sh to confirm DB comes up before we proceed -echo "Waiting for $dbhost:$eport..." -/srv/wait-for $dbhost:$eport -- echo "Done" +echo "Waiting up to 60s for $dbhost:$eport..." +/srv/wait-for $dbhost:$eport --timeout=60 -- echo "Done" From 709459b6aeb302038689f7f634575fb1d67d5bd5 Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 21 Jul 2017 23:14:22 +1200 Subject: [PATCH 08/11] Reduced timeout to 1s and forced S6_BEHAVIOUR_IF_STAGE2_FAILS=2 --- root/etc/cont-init.d/98-wait-for-db | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/root/etc/cont-init.d/98-wait-for-db b/root/etc/cont-init.d/98-wait-for-db index 3e4160d..eff8288 100644 --- a/root/etc/cont-init.d/98-wait-for-db +++ b/root/etc/cont-init.d/98-wait-for-db @@ -18,6 +18,12 @@ else fi ############# -# Run wait-for-it.sh to confirm DB comes up before we proceed -echo "Waiting up to 60s for $dbhost:$eport..." -/srv/wait-for $dbhost:$eport --timeout=60 -- echo "Done" +# Run wait-for to confirm DB comes up before we proceed +# Reduce default timeout to 1s because if the DB is not instantly available, +# Then it's even if it _happens_ to become available while we're testing, +# it won't be ready for us yet. Better to exit and restart the container altogether, +# So set "S6_BEHAVIOUR_IF_STAGE2_FAILS=2" below + +S6_BEHAVIOUR_IF_STAGE2_FAILS=2 +echo "Checking database responds within 1s on $dbhost:$eport..." +/srv/wait-for $dbhost:$eport --timeout=1 From c4d0bffcd8021d52d40268b7ec6eaf3936baa54a Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 21 Jul 2017 23:22:43 +1200 Subject: [PATCH 09/11] Remove setting S6_BEHAVIOUR_IF_STAGE2_FAILS=2 within cont-init.d script --- root/etc/cont-init.d/98-wait-for-db | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/98-wait-for-db b/root/etc/cont-init.d/98-wait-for-db index eff8288..ee6774a 100644 --- a/root/etc/cont-init.d/98-wait-for-db +++ b/root/etc/cont-init.d/98-wait-for-db @@ -22,8 +22,7 @@ fi # Reduce default timeout to 1s because if the DB is not instantly available, # Then it's even if it _happens_ to become available while we're testing, # it won't be ready for us yet. Better to exit and restart the container altogether, -# So set "S6_BEHAVIOUR_IF_STAGE2_FAILS=2" below +# So set "S6_BEHAVIOUR_IF_STAGE2_FAILS=2" in docker-compose.yml if you need this (i.e., in swarm mode, where dependencies don't work) -S6_BEHAVIOUR_IF_STAGE2_FAILS=2 echo "Checking database responds within 1s on $dbhost:$eport..." /srv/wait-for $dbhost:$eport --timeout=1 From 749862d6767c03413effc1505e44188bed5b9f7b Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 21 Jul 2017 23:35:05 +1200 Subject: [PATCH 10/11] 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. From cbce93970819c6cf4313b8672acc610c74ced892 Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 21 Jul 2017 23:44:37 +1200 Subject: [PATCH 11/11] Fix typo --- root/srv/setup-ttrss.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/srv/setup-ttrss.sh b/root/srv/setup-ttrss.sh index 0b931d9..7097130 100755 --- a/root/srv/setup-ttrss.sh +++ b/root/srv/setup-ttrss.sh @@ -106,7 +106,7 @@ setup_ttrss() # 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 + if [ -z "$TTRSS_SELF_URL" ]; then # Construct the final URL TTRSS will use. TTRSS_SELF_URL=${TTRSS_PROTO}://${TTRSS_URL}${TTRSS_PORT}/ fi