diff --git a/ifpublic/ifpublic b/ifpublic/ifpublic index d92efd1..26afa15 100755 --- a/ifpublic/ifpublic +++ b/ifpublic/ifpublic @@ -13,7 +13,8 @@ PUBLIC_IP6_FETCH_URL="$PUBLIC_IP_FETCH_URL" printf "%s / %s\n" \ "$(curl -4 --connect-timeout 5 --silent "$PUBLIC_IP_FETCH_URL")" \ "$(curl -6 --connect-timeout 5 --silent "$PUBLIC_IP6_FETCH_URL")" \ - | sed -e 's/ \/ $//g' \ - -e 's/^ \/ //g' + | sed -e 's/ \/ $//' \ + -e 's/^ \/ //' \ + -e 's/^$/[error fetching address]/' exit 0