Skip to content

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Seji64 committed Jan 11, 2024
1 parent 12e01e7 commit 59da3d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions generateACL.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
CLIENTS=()
export DYNDNS_CRON_ENABLED=$false
export DYNDNS_CRON_ENABLED=false

if [ -n "${ALLOWED_CLIENTS_FILE}" ];
then
Expand All @@ -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
Expand Down

0 comments on commit 59da3d4

Please sign in to comment.