Update Installer.sh
Fixed Wifi IP check
This commit is contained in:
parent
236901361a
commit
c4619cf7d8
18
Installer.sh
18
Installer.sh
@ -113,19 +113,19 @@ hostnamectl set-hostname $HOST
|
|||||||
sed -i '/raspberrypi/d' /etc/hosts
|
sed -i '/raspberrypi/d' /etc/hosts
|
||||||
echo "127.0.1.1 $HOST" >> /etc/hosts
|
echo "127.0.1.1 $HOST" >> /etc/hosts
|
||||||
|
|
||||||
if grep -q "country=NL" /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' ' -f2,3)
|
||||||
rfkill unblock wifi
|
rfkill unblock wifi
|
||||||
else
|
else
|
||||||
IP=`hostname -I` && IP=$(echo $IP | cut -d ' ' -f 1)
|
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
|
||||||
|
|
||||||
if grep -q "Amsterdam" <<< "$TZDATA"; then
|
if grep -q "Amsterdam" <<< "$TZDATA"; then
|
||||||
echo "Timezone properly configured"
|
echo "Timezone properly configured"
|
||||||
else
|
else
|
||||||
timedatectl set-timezone Europe/Amsterdam
|
timedatectl set-timezone Europe/Amsterdam
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user