Skip to content

Commit

Permalink
fixed error in ttl parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikkel-Coder committed Aug 18, 2024
1 parent 650ee4a commit e965084
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloudflare-dns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ settings_domains_validation() {
# Check validity of "ttl" parameter
if [ "${domains__ttl[i]}" == "auto" ]; then
def_ttl_enabled[i]=false
elif [ "${domains__ttl[i]}" -gt 120 ] 2>/dev/null ||
[ "${domains_ttl[i]}" -lt 7200 ] 2>/dev/null; then
elif [ "${domains__ttl[i]}" -ge 120 ] 2>/dev/null &&
[ "${domains__ttl[i]}" -le 7200 ] 2>/dev/null; then
def_ttl_enabled[i]=false
else
warn_msg "Error! 'ttl' out of range (120-7200) or not set to 'auto'. Force set to '$def_ttl'"
Expand Down

0 comments on commit e965084

Please sign in to comment.