Add new network script

This commit is contained in:
Marco Thomas
2021-03-26 13:24:26 +01:00
parent 163716cb0c
commit 59f4dd0517

View File

@@ -0,0 +1,9 @@
#!/bin/sh
if [ -f "/sys/class/net/enp24s0/carrier" ]; then
echo "LAN connected"
elif [ -f "/sys/class/net/wlo1/carrier" ]; then
echo "$(nmcli -t -f active,ssid, dev wifi | egrep '^yes' | cut -d\' -f2 | cut -d ':' -f2)"
else
echo "No network"
fi