diff --git a/install.sh b/install.sh index de0e8de..6b56a9e 100644 --- a/install.sh +++ b/install.sh @@ -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