cloudflare: don't send bad ip from curl message to telegram

This commit is contained in:
tylen 2024-10-21 16:05:26 +00:00
parent dc44a4fc4b
commit 2460a92d83

View File

@ -37,10 +37,10 @@ function check_new_ip() {
then then
for (( i=1; i<${#BASH_REMATCH[@]}; ++i )) for (( i=1; i<${#BASH_REMATCH[@]}; ++i ))
do do
(( ${BASH_REMATCH[$i]} <= 255 )) || { "${SEND_TELEGRAM}" "Bad IP from curl. ${new_ip}" >&2; exit 1; } (( ${BASH_REMATCH[$i]} <= 255 )) || { info "Bad IP from curl. ${new_ip}"; exit 1; }
done done
else else
"${SEND_TELEGRAM}" "Bad IP from curl. ${new_ip}" >&2 info "Bad IP from curl. ${new_ip}";
exit 1; exit 1;
fi fi
if [[ "${new_ip}" == "${CACHED_PUBLIC_IP}" ]]; then if [[ "${new_ip}" == "${CACHED_PUBLIC_IP}" ]]; then