Update Installer.sh

Fixed Wifi IP check
This commit is contained in:
Beeranco 2023-08-15 17:38:27 +02:00 committed by GitHub
parent 236901361a
commit c4619cf7d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,11 +113,11 @@ hostnamectl set-hostname $HOST
sed -i '/raspberrypi/d' /etc/hosts
echo "127.0.1.1 $HOST" >> /etc/hosts
if grep -q "country=NL" /etc/wpa_supplicant/wpa_supplicant.conf
then
if grep -q "ssid=" /etc/wpa_supplicant/wpa_supplicant.conf
then
IP=`hostname -I` && IP=$(echo $IP | cut -d' ' -f2,3)
rfkill unblock wifi
else
else
IP=`hostname -I` && IP=$(echo $IP | cut -d ' ' -f 1)
echo "country=NL" >> /etc/wpa_supplicant/wpa_supplicant.conf
rfkill unblock wifi
@ -125,7 +125,7 @@ fi
if grep -q "Amsterdam" <<< "$TZDATA"; then
echo "Timezone properly configured"
else
else
timedatectl set-timezone Europe/Amsterdam
fi