Skip to content

Only fetch first IP coming from ipinfo#14

Open
leon486 wants to merge 1 commit intomarkafox:masterfrom
leon486:filter_ip
Open

Only fetch first IP coming from ipinfo#14
leon486 wants to merge 1 commit intomarkafox:masterfrom
leon486:filter_ip

Conversation

@leon486
Copy link
Copy Markdown

@leon486 leon486 commented Feb 3, 2022

ipinfo.io can return ips in the host name section such as this:

ip "152.0.121.242"
hostname "242.125.0.151.d.dyn.claro.net.do"
... ...

This causes the $currentIp variable to be set with invalid data.

This PR makes it so that the grep command only returns the the first IP returned ipinfo and uses it to set $currentIp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant