14 lines
237 B
Plaintext
Raw Normal View History

2020-05-09 21:26:23 +02:00
#!/bin/sh
if [ "$(cat /etc/hostname)" = "pc" ]; then
ip="$(eth-ip)"
echo ""
elif [ "$(cat /etc/hostname)" = "laptop" ]; then
ip="$(wifi-ip)"
echo ""
fi
ping -q -c 1 1.1.1.1 >/dev/null || { echo "dis" && exit 1; }
echo "$ip"