Xfce: panel vpn script show also ip for tap interfaces
This commit is contained in:
parent
93baaaf677
commit
aa8c07a068
@ -1,8 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
ip="$(ip a s tun0 2>/dev/null | grep -o -P '(?<=inet )[0-9]{1,3}(\.[0-9]{1,3}){3}')"
|
||||
interface="$(ip tuntap show | cut -d : -f1 | head -n 1)"
|
||||
ip="$(ip a s "${interface}" 2>/dev/null \
|
||||
| grep -o -P '(?<=inet )[0-9]{1,3}(\.[0-9]{1,3}){3}')"
|
||||
|
||||
if [ "$ip" != "" ]; then
|
||||
if [ "${ip}" != "" ]; then
|
||||
printf "<icon>network-vpn-symbolic</icon>"
|
||||
printf "<txt>${ip}</txt>"
|
||||
printf "<tool>VPN IP</tool>"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user