updated install.sh

This commit is contained in:
Nick Leffler 2021-04-06 11:19:39 -04:00
parent 127e8704f7
commit b4cf6054a5

View File

@ -8,22 +8,28 @@ printInfo() {
}
getVars() {
read -p "Do you want the rPi to be a wifi hotspot? [y/n]: " hotspot
read -p "Do you want the rPi to be a wifi hotspot? [y/n]: " hotspot
hotspot="${hotspot,,}"
hotspot="${hotspot,,}"
if [[ "${hotspot}" == "y" ]];
then
echo "Hotspot will be installed and configured"
elif [[ "${hotspot}" == "n" ]];
then
echo "Hotspot will not be configured"
else
echo "Please choose y/n"
fi
if [[ "${hotspot}" == "y" ]];
then
echo "Hotspot will be installed and configured"
elif [[ "${hotspot}" == "n" ]];
then
echo "Hotspot will not be configured"
else
echo "Please choose y/n"
fi
read -p "What is the NIC for the USB hotspot" usbNIC
usbNIC="${usbNIC,,}"
read -p "What is the NIC for the USB hotspot" usbNIC
usbNIC="${usbNIC,,}"
if [[ "${hotspot}" == "y" ]]
then
read -p "What would you like your SSID to be?: " ssid
read -p " What woudl you like your passphrase to be?: " passphrase
fi
}
installPreReqs() {
@ -61,8 +67,8 @@ echo 'DAEMON_CONF="/etc/hostapd/hostapd.conf"' >> etc/default/hostapd
echo 'bridge=br0' > /etc/hostapd/hostapd.conf
echo '' >> /etc/hostapd/hostapd.conf
echo'ssid=SSID_HERE' >> /etc/hostapd/hostapd.conf
echo 'wpa_passphrase=PASSPHRASE_HERE' >> /etc/hostapd/hostapd.conf
echo "ssid=${ssid}"' >> /etc/hostapd/hostapd.conf
echo "wpa_passphrase=${passphrase}" >> /etc/hostapd/hostapd.conf
echo '' >> /etc/hostapd/hostapd.conf
echo 'country_code=US' >> /etc/hostapd/hostapd.conf
echo '' >> /etc/hostapd/hostapd.conf