From b3484ab3a969955ec7f4bcf94bc36d584871bfd8 Mon Sep 17 00:00:00 2001 From: Beeranco <49772805+Beeranco@users.noreply.github.com> Date: Mon, 14 Aug 2023 23:41:37 +0200 Subject: [PATCH] Update Installer.sh Made changes to Wifi config to display the correct IP address --- Installer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Installer.sh b/Installer.sh index 9193e1b..9b4cae0 100644 --- a/Installer.sh +++ b/Installer.sh @@ -13,8 +13,6 @@ PKGI="${PKGM} install -y" PKRM="$PKGM remove --purge -y" PKARM="$PKGM autoremove -y" DATE=$(date "+%d-%m-%Y") -IP=`hostname -I` -IP=$(echo $IP | tr -d ' ') REPO=PiAutomation GIT=https://raw.githubusercontent.com/Beeranco BRANCH=main @@ -110,8 +108,10 @@ echo "127.0.1.1 $HOST" >> /etc/hosts if grep -q "country=NL" /etc/wpa_supplicant/wpa_supplicant.conf then + IP=`hostname -I` && IP=$(echo $IP | cut -d' ' -f2,3) rfkill unblock wifi else + IP=`hostname -I` && IP=$(echo $IP | cut -d ' ' -f 1) echo "country=NL" >> /etc/wpa_supplicant/wpa_supplicant.conf rfkill unblock wifi fi