2020-05-13 15:07:01 +02:00

14 lines
241 B
Bash
Executable File

#!/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"