Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

eth0.me is down #65

Open
btywoniuk opened this issue Dec 28, 2016 · 6 comments
Open

eth0.me is down #65

btywoniuk opened this issue Dec 28, 2016 · 6 comments

Comments

@btywoniuk
Copy link

eth0.me is down which makes archey to load with big delay

@mnlwsn
Copy link

mnlwsn commented Dec 30, 2016

same. output ⇒
% curl: (7) Failed to connect to eth0.me port 80: Operation timed out
% ifconfig: interface eth0(.me) does not exist

@anthony-wang
Copy link

anthony-wang commented Jan 2, 2017

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

@thejeffreystone
Copy link

I switched mine to ifconfig.co

@lead0r
Copy link

lead0r commented Jan 4, 2017

Same problem here, I am using "archey -o" now but I would like to have a working option with IP address shown

@ginobean
Copy link

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..

@ginobean
Copy link

ginobean commented Mar 21, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants