Modifications to bar.sh and localip

This commit is contained in:
Archie Hilton (thytom) 2019-11-06 16:26:36 +00:00
parent d5a6b65c28
commit 3587e006fa
2 changed files with 4 additions and 2 deletions

2
bar.sh
View file

@ -47,7 +47,7 @@ run_module()
fi fi
if [[ "$out" = " " ]]; then if [[ "$out" = " " ]]; then
echo " " > "$OUTPUT_CACHE$module" echo "" > "$OUTPUT_CACHE$module"
elif [[ ! "$out" = "" ]]; then elif [[ ! "$out" = "" ]]; then
out="$out$SEPARATOR." out="$out$SEPARATOR."
echo "$out" > "$OUTPUT_CACHE$module" echo "$out" > "$OUTPUT_CACHE$module"

View file

@ -6,7 +6,9 @@ PREFIX='ﯱ '
get_local_ip() 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 get_local_ip