Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
614a2d1b
Unverified
Commit
614a2d1b
authored
May 14, 2019
by
black
Committed by
GitHub
May 14, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1254 from vaygr/public-ip-drill
Retrieve public IP info via drill
parents
99f6ccd3
85c6a5dd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
neofetch
neofetch
+5
-0
No files found.
neofetch
View file @
614a2d1b
...
@@ -3371,6 +3371,11 @@ get_public_ip() {
...
@@ -3371,6 +3371,11 @@ get_public_ip() {
[[ "$public_ip" =~ ^\; ]] && unset public_ip
[[ "$public_ip" =~ ^\; ]] && unset public_ip
fi
fi
if [[ -z "$public_ip" ]] && type -p drill >/dev/null; then
public_ip="$(drill myip.opendns.com @resolver1.opendns.com | \
awk '/^myip\./ && $3 == "IN" {print $5}')"
fi
if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then
if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then
public_ip="$(curl --max-time "$public_ip_timeout" -w '\n' "$public_ip_host")"
public_ip="$(curl --max-time "$public_ip_timeout" -w '\n' "$public_ip_host")"
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment