From 5f844aeeb13b77e11660dcc2d217fbaa451207f3 Mon Sep 17 00:00:00 2001 From: Jehu Marcos Herrera Puentes <58377032+JMarcosHP@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:26:03 -0600 Subject: [PATCH] Fix shell check variable quotation. Signed-off-by: Jehu Marcos Herrera Puentes <58377032+JMarcosHP@users.noreply.github.com> --- Containers/nextcloud/run-exec-commands.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Containers/nextcloud/run-exec-commands.sh b/Containers/nextcloud/run-exec-commands.sh index de674b9b..d98527f9 100644 --- a/Containers/nextcloud/run-exec-commands.sh +++ b/Containers/nextcloud/run-exec-commands.sh @@ -6,8 +6,8 @@ COUNT=1 # Wait until the domain is reachable sleep 15 -while [ $COUNT -le $MAX_RETRY ]; do - if nc -z $NC_DOMAIN 443; then +while [ "$COUNT" -le "$MAX_RETRY" ]; do + if nc -z "$NC_DOMAIN" 443; then echo "Domain reached." break else @@ -16,7 +16,7 @@ while [ $COUNT -le $MAX_RETRY ]; do ((COUNT++)) fi done -if [ $COUNT -gt $MAX_RETRY ]; then +if [ "$COUNT" -gt "$MAX_RETRY" ]; then echo "The domain could not be reached after $MAX_RETRY attempts. Proceeding anyway..." fi