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