Comments (6)
Alternatively, how about using:
ip=$(dig +short myip.opendns.com @resolver1.opendns.com)
in place of:
ip=$(curl -sS eth0.me)
I think opendns.com has been around for a while and, now being a part of Cisco, can be expected to be around for the foreseeable future..
from archey-osx.
same. output β
% curl: (7) Failed to connect to eth0.me port 80: Operation timed out
% ifconfig: interface eth0(.me) does not exist
from archey-osx.
Suggestion for an alternative site:
IPv4: curl 4.ifcfg.me/ip
or curl 4.ipcfg.me/ip
IPv6: curl 6.ifcfg.me/ip
or curl 6.ipcfg.me/ip
from archey-osx.
I switched mine to ifconfig.co
from archey-osx.
Same problem here, I am using "archey -o" now but I would like to have a working option with IP address shown
from archey-osx.
Also, if the ipfile length is less than 8, maybe just delete it, since the minimum valid ip is 1.1.1.1, which has at least 8 characters in it..
Here are some changes I made to my local copy, to delete an invalid ip cache file and to use dig and myip.opendns.com over curl. Feel free to use it verbatim, if you wish..
diff --git a/scripts/archey b/scripts/archey
index 3bb1902..6019d40 100755
--- a/scripts/archey
+++ b/scripts/archey
@@ -64,12 +64,18 @@ hostname=$(hostname | sed 's/.local//g')
if [[ "${opt_offline}" = f ]]; then
ipfile="${HOME}/.archey-ip"
- if [ -a "$ipfile" ] && test `find "$ipfile" -mmin -360`; then
+
+ [[ -f $ipfile ]] && iplen=$(wc -c < $ipfile)
+ # remove ipfile if it could not possibly be valid:
+ (( iplen < 8 )) && rm -f $ipfile
+
+ if [ -a "$ipfile" ] && test $(find "$ipfile" -mmin -360); then
while read -r line; do
ip="$line"
done < "$ipfile"
else
- ip=$(curl -sS eth0.me)
+ # ip=$(curl -sS eth0.me)
+ ip=$(dig +short myip.opendns.com @resolver1.opendns.com)
echo $ip > "$ipfile"
fi
fi
from archey-osx.
Related Issues (20)
- archey help misalignment HOT 2
- i can't remaster automatically manually HOT 4
- π%%
- add local machine ip addressοΌ HOT 2
- Calculating disk usage - hangs for ~10 seconds
- eth0.me is unreachable HOT 9
- New release? HOT 1
- binary operator expected Error when run "archey"
- Archey wont launch on startup of my terminal HOT 1
- It seems that archey expects system awk but system sed
- archer doesn't show IP HOT 3
- There isn't a --localip option, but the README says there is HOT 6
- Stuck, cannot get IP address HOT 1
- Turn off the Apple HOT 1
- Archey Hangs HOT 3
- "random" logofile
- Previous site to get IP info has moved HOT 2
- IP address weird message HOT 2
- machdep: class is not implemented
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archey-osx.