Skip if it's an IPv6 address; at some point, maybe we'll support that too.

This commit is contained in:
Timothy Allen 2018-03-09 20:30:01 +02:00
parent 1214a6532e
commit 848d673257
1 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,11 @@ if [ -f "${HOME}/${cache}" ]; then
old_ip=$(cat "${HOME}/${cache}")
fi
# Exit if we're at an IPv6 address
if [ -z "${ip##*:*}" ]; then
exit;
fi
if [ "${set_ip}" = "${ip}" ] && [ "${ip}" = "${old_ip}" ]; then
exit;
else