escapes bash variable
This commit is contained in:
parent
f695c43311
commit
427774a7d1
@ -18,7 +18,7 @@ getPublicIP() {
|
|||||||
|
|
||||||
# curl lookups
|
# curl lookups
|
||||||
for i in "https://icanhazip.com" "https://ifconfig.me" "https://api.ipify.org" "https://bot.whatismyipaddress.com" "https://ipinfo.io/ip" "https://ipecho.net/plain"; do
|
for i in "https://icanhazip.com" "https://ifconfig.me" "https://api.ipify.org" "https://bot.whatismyipaddress.com" "https://ipinfo.io/ip" "https://ipecho.net/plain"; do
|
||||||
ip=\$(curl -s "${i}")
|
ip=\$(curl -s "\${i}")
|
||||||
if [ "\${ip}" != "" ]; then
|
if [ "\${ip}" != "" ]; then
|
||||||
printf '%s' "\${ip}"
|
printf '%s' "\${ip}"
|
||||||
return 0
|
return 0
|
||||||
|
Reference in New Issue
Block a user