From 59da3d457c06ae4b0bbbb0707b01cf63f6f38714 Mon Sep 17 00:00:00 2001 From: Seji64 Date: Thu, 11 Jan 2024 23:24:23 +0100 Subject: [PATCH] Hotfix --- entrypoint.sh | 2 +- generateACL.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index b62454f..3427e8a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -31,7 +31,7 @@ set -e echo "[INFO] Generating DNSDist Configs..." /bin/bash /etc/dnsdist/dnsdist.conf.template > /etc/dnsdist/dnsdist.conf -if [[ "$DYNDNS_CRON_ENABLED" -eq $true ]]; +if [ "$DYNDNS_CRON_ENABLED" = true ]; then echo "[INFO] DynDNS Address in ALLOWED_CLIENTS detected => Enable cron job" echo "$DNYDNS_CRON_SCHEDULE /bin/bash /dynDNSCron.sh" > /etc/crontabs/root diff --git a/generateACL.sh b/generateACL.sh index beb58e1..5091d73 100644 --- a/generateACL.sh +++ b/generateACL.sh @@ -1,6 +1,6 @@ #!/bin/bash CLIENTS=() -export DYNDNS_CRON_ENABLED=$false +export DYNDNS_CRON_ENABLED=false if [ -n "${ALLOWED_CLIENTS_FILE}" ]; then @@ -21,14 +21,14 @@ else RESOLVE_RESULT=$(/usr/bin/dog --short --type A ${i}) retVal=$? if [ $retVal -eq 0 ]; then - export DYNDNS_CRON_ENABLED=$true + export DYNDNS_CRON_ENABLED=true CLIENTS+=( ${RESOLVE_RESULT} ) else echo "[ERROR] Could not resolve '${i}' => Skipping" fi fi done - if [[ ! "${array[@]}" =~ '127.0.0.1' ]] && [[ "$DYNDNS_CRON_ENABLED" -eq $true ]]; then + if [[ ! "${array[@]}" =~ '127.0.0.1' ]] && [[ "$DYNDNS_CRON_ENABLED" = true ]]; then echo "[INFO] Adding '127.0.0.1' to allowed clients cause else cron reload will not work" CLIENTS+=( "127.0.0.1" ) fi