Display IP / Gateway

This commit is contained in:
Kroese 2023-04-19 22:19:08 +02:00 committed by GitHub
parent 1ac687fec7
commit ec1f13cc33

View File

@ -128,8 +128,14 @@ fi
[ ! -c /dev/net/tun ] && echo "Error: TUN network interface not available..." && exit 85 [ ! -c /dev/net/tun ] && echo "Error: TUN network interface not available..." && exit 85
if [ "$DEBUG" = "Y" ]; then if [ "$DEBUG" = "Y" ]; then
GATEWAY=$(ip r | grep default | awk '{print $3}')
IP=$(ip address show dev eth0 | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/)
echo && ifconfig echo && ifconfig
echo && ip route && echo echo && ip route && echo
echo "IP: ${IP} GATEWAY: ${GATEWAY}" && echo
fi fi
update-alternatives --set iptables /usr/sbin/iptables-legacy > /dev/null update-alternatives --set iptables /usr/sbin/iptables-legacy > /dev/null