External IP address for use in CONKY
Posted: Sun 29 Apr 2012, 18:17
I have been battling the issue of showing the external IP address in Conky on and off.
It seems that the problem was solved here
http://www.murga-linux.com/puppy/viewtopic.php?p=483184
But since that post none of the codes mentioned there seem to work anymore.
So I did a little research and experimenting and found this code to work alright in establishing a file with just the external IP in it.
I found part of it on the forum here, but can't seem to locate the post anymore, where it was mentioned. So credit goes to the unknown author.
More details on the issue can be found in my German thread here
http://murga-linux.com/puppy/viewtopic.php?t=63720
second and third post down the page.
It seems that the problem was solved here
http://www.murga-linux.com/puppy/viewtopic.php?p=483184
But since that post none of the codes mentioned there seem to work anymore.
So I did a little research and experimenting and found this code to work alright in establishing a file with just the external IP in it.
Code: Select all
my_ipno=$(wget http://cmyip.com -qO - | grep -Ewo '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b' | uniq)
echo $my_ipno >/tmp/iptest
More details on the issue can be found in my German thread here
http://murga-linux.com/puppy/viewtopic.php?t=63720
second and third post down the page.