bugfix
This commit is contained in:
@@ -148,7 +148,8 @@ export -f isipv6
|
||||
# ------------------------------------------------------------------------------
|
||||
# Encode a string so it can be used as a URL parameter
|
||||
# Usage: urlencode <string>
|
||||
urlencode() {
|
||||
urlencode()
|
||||
{
|
||||
local LANG=C
|
||||
local str="$*"
|
||||
local length="${#str}"
|
||||
@@ -177,7 +178,8 @@ export -f urlencode
|
||||
# -c, --coord Display only the coordinates (latitude, longitude)
|
||||
# -a, --as Display only the Autonomous System (AS) information
|
||||
# -R, --raw Display raw JSON response
|
||||
myextip() {
|
||||
myextip()
|
||||
{
|
||||
local show_ip=false show_isp=false show_loc=false
|
||||
local show_coord=false show_as=false show_raw=false
|
||||
local all=true
|
||||
@@ -236,7 +238,7 @@ myextip() {
|
||||
|
||||
# Fetch data. Allow overriding endpoint via env var MYEXTIP_URL
|
||||
local MYEXTIP_URL
|
||||
MYEXTIP_URL=${MYEXTIP_URL:-http://ip-api.com/json/}
|
||||
MYEXTIP_URL=${MYEXTIP_URL:-https://ip-api.com/json/}
|
||||
|
||||
local response
|
||||
if ! response=$(dwl "$MYEXTIP_URL"); then
|
||||
|
||||
Reference in New Issue
Block a user