added MAC custom info

added function that will pull and display MAC address
This commit is contained in:
Thomas 2024-04-06 17:01:21 -04:00 committed by GitHub
parent ccd5d9f526
commit 72799a842c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3923,6 +3923,11 @@ get_public_ip() {
fi
}
get_hwaddr() {
hwaddr="$(ip route get 1 | awk '{print $5}')"
hwaddr="$(ip link show dev "$hwaddr" | awk '/ether/ {print $2}')"
}
get_users() {
users="$(who | awk '!seen[$1]++ {printf $1 ", "}')"
users="${users%\,*}"