Update Installer.sh

Fixed Wifi NOW FOR GOOD I PROMISE
This commit is contained in:
Beeranco 2023-08-15 21:22:13 +02:00 committed by GitHub
parent 0fde14b8ba
commit 6e280be558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,15 +115,16 @@ echo "127.0.1.1 $HOST" >> /etc/hosts
if grep -q "ssid=" /etc/wpa_supplicant/wpa_supplicant.conf if grep -q "ssid=" /etc/wpa_supplicant/wpa_supplicant.conf
then then
IP=`hostname -I` && IP=$(echo $IP | cut -d' ' -f2,3) IP=`hostname -I` && IP=$(echo $IP | cut -d ' ' -f 1)
rfkill unblock wifi rfkill unblock wifi
else else
echo "country=NL" >> /etc/wpa_supplicant/wpa_supplicant.conf echo "country=NL" >> /etc/wpa_supplicant/wpa_supplicant.conf
rfkill unblock wifi rfkill unblock wifi
systemctl restart wpa_supplicant systemctl restart wpa_supplicant
TERM=ansi whiptail --title "Pi Automation" --infobox "Configuring Wireless lan, please wait." 8 78
ip link set wlan0 up ip link set wlan0 up
sleep 30 sleep 30
IP=`hostname -I` && IP=$(echo $IP | cut -d ' ' -f 1) IP=`hostname -I` && IP=$(echo $IP | cut -d' ' -f2,3)
fi fi
if grep -q "Amsterdam" <<< "$TZDATA"; then if grep -q "Amsterdam" <<< "$TZDATA"; then