mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
added feature where a different ip page can be added by whoever.
That would need to be set in the inxi override config file. The page must show only one line of output, and that last item on that line must be the ip address. Ok, that's it, not a big deal, but some people may prefer a non smxi ip address page for whatever reason, so have at it. Or not.
This commit is contained in:
parent
7dc1634887
commit
de5ccd8a1c
15
inxi
15
inxi
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 1.7.31
|
||||
#### Date: March 26 2012
|
||||
#### version: 1.7.32
|
||||
#### Date: April 16 2012
|
||||
#### Patch Number: 00
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -412,6 +412,9 @@ SCRIPT_DOWNLOAD_BRANCH_2='http://inxi.googlecode.com/svn/branches/two/'
|
|||
SCRIPT_DOWNLOAD_BRANCH_3='http://inxi.googlecode.com/svn/branches/three/'
|
||||
SCRIPT_DOWNLOAD_BRANCH_4='http://inxi.googlecode.com/svn/branches/four/'
|
||||
SCRIPT_DOWNLOAD_DEV='http://smxi.org/test/'
|
||||
# note, you can use any ip url here as long as it's the only line on the output page.
|
||||
# Also the ip address must be the last thing on that line.
|
||||
WAN_IP_URL='http://smxi.org/opt/ip.php'
|
||||
KONVI_CFG="konversation/scripts/$SCRIPT_NAME.conf" # relative path to $(kde-config --path data)
|
||||
|
||||
### Script Localization
|
||||
|
@ -4693,10 +4696,12 @@ get_networking_wan_ip_data()
|
|||
eval $LOGFS
|
||||
local ip=''
|
||||
|
||||
# get ip using wget redirect to stdout. This is a clean, text only IP output url.
|
||||
ip=$( wget -q -O - http://smxi.org/opt/ip.php | gawk -F 'is: ' '{
|
||||
# get ip using wget redirect to stdout. This is a clean, text only IP output url,
|
||||
# single line only, ending in the ip address. May have to modify this in the future
|
||||
# to handle ipv4 and ipv6 addresses but should not be necessary.
|
||||
ip=$( wget -q -O - $WAN_IP_URL | gawk '{
|
||||
#gsub("\n","",$2")
|
||||
print $2
|
||||
print $NF
|
||||
}' )
|
||||
|
||||
if [[ -z $ip ]];then
|
||||
|
|
Loading…
Reference in a new issue