Fixing potential globbing matching in condition

https://github.com/koalaman/shellcheck/wiki/SC2053
pull/5/head
Paul FREAKN Baker 4 years ago
parent 18164abc73
commit 77613a34a4
  1. 2
      cloudflare-template.sh

@ -48,7 +48,7 @@ fi
########################################### ###########################################
old_ip=$(echo "$record" | grep -Po '(?<="content":")[^"]*' | head -1) old_ip=$(echo "$record" | grep -Po '(?<="content":")[^"]*' | head -1)
# Compare if they're the same # Compare if they're the same
if [[ $ip == $old_ip ]]; then if [[ $ip == "${old_ip}" ]]; then
logger "DDNS Updater: IP ($ip) for ${record_name} has not changed." logger "DDNS Updater: IP ($ip) for ${record_name} has not changed."
exit 0 exit 0
fi fi

Loading…
Cancel
Save