cloudflare: don't send bad ip from curl message to telegram
This commit is contained in:
parent
dc44a4fc4b
commit
2460a92d83
@ -37,10 +37,10 @@ function check_new_ip() {
|
||||
then
|
||||
for (( i=1; i<${#BASH_REMATCH[@]}; ++i ))
|
||||
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
|
||||
else
|
||||
"${SEND_TELEGRAM}" "Bad IP from curl. ${new_ip}" >&2
|
||||
info "Bad IP from curl. ${new_ip}";
|
||||
exit 1;
|
||||
fi
|
||||
if [[ "${new_ip}" == "${CACHED_PUBLIC_IP}" ]]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user