aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorArchie Hilton (thytom) <archie.hilton1@gmail.com>2019-11-06 16:26:36 +0000
committerArchie Hilton (thytom) <archie.hilton1@gmail.com>2019-11-06 16:26:36 +0000
commit3587e006fab760fa4add986718abd71f9077de01 (patch)
treeb62bf759ede5d57525397d513bdce5a624593413 /modules
parentd5a6b65c28795f363f9df6b12a0a1f226d846493 (diff)
Modifications to bar.sh and localip
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/localip4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/localip b/modules/localip
index 39629db..91a74c0 100755
--- a/modules/localip
+++ b/modules/localip
@@ -6,7 +6,9 @@ PREFIX='ﯱ '
get_local_ip()
{
- echo "$PREFIX$(hostname -i)"
+ IP=$(ip addr | grep -e "inet " | awk 'NR==2' | sed 's/^.*inet.//g; s/\/.*//g')
+
+ echo "$PREFIX$IP"
}
get_local_ip