Update Installer.sh
Made changes to Wifi config to display the correct IP address
This commit is contained in:
parent
8b06deaa7a
commit
b3484ab3a9
@ -13,8 +13,6 @@ PKGI="${PKGM} install -y"
|
|||||||
PKRM="$PKGM remove --purge -y"
|
PKRM="$PKGM remove --purge -y"
|
||||||
PKARM="$PKGM autoremove -y"
|
PKARM="$PKGM autoremove -y"
|
||||||
DATE=$(date "+%d-%m-%Y")
|
DATE=$(date "+%d-%m-%Y")
|
||||||
IP=`hostname -I`
|
|
||||||
IP=$(echo $IP | tr -d ' ')
|
|
||||||
REPO=PiAutomation
|
REPO=PiAutomation
|
||||||
GIT=https://raw.githubusercontent.com/Beeranco
|
GIT=https://raw.githubusercontent.com/Beeranco
|
||||||
BRANCH=main
|
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
|
if grep -q "country=NL" /etc/wpa_supplicant/wpa_supplicant.conf
|
||||||
then
|
then
|
||||||
|
IP=`hostname -I` && IP=$(echo $IP | cut -d' ' -f2,3)
|
||||||
rfkill unblock wifi
|
rfkill unblock wifi
|
||||||
else
|
else
|
||||||
|
IP=`hostname -I` && IP=$(echo $IP | cut -d ' ' -f 1)
|
||||||
echo "country=NL" >> /etc/wpa_supplicant/wpa_supplicant.conf
|
echo "country=NL" >> /etc/wpa_supplicant/wpa_supplicant.conf
|
||||||
rfkill unblock wifi
|
rfkill unblock wifi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user