Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only fetch first IP coming from ipinfo #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leon486
Copy link

@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