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
|
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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user