updated install.sh
This commit is contained in:
parent
b4cf6054a5
commit
70bf1c0ffc
11
install.sh
11
install.sh
@ -67,7 +67,7 @@ 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}"' >> /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
|
||||
@ -109,7 +109,7 @@ systemctl enable hostapd
|
||||
bridgeConfig() {
|
||||
echo "allow-hotplug ${usbNIC}" >> /etc/network/interfaces
|
||||
echo "auto ${usbNIC}" >> /etc/network/interfaces
|
||||
echo "iface ${usbNIC}" inet dhcp' >> /etc/network/interfaces
|
||||
echo "iface ${usbNIC} inet dhcp" >> /etc/network/interfaces
|
||||
echo '' >> /etc/network/interfaces
|
||||
echo 'auto eth0' >> /etc/network/interfaces
|
||||
echo 'allow-hotplug eth0' >> /etc/network/interfaces
|
||||
@ -129,11 +129,12 @@ echo 'iface br0 inet static' >> /etc/network/interfaces
|
||||
echo ' address 192.168.5.1' >> /etc/network/interfaces
|
||||
echo ' netmask 255.255.255.0' >> /etc/network/interfaces
|
||||
|
||||
if [[ "${hotspot}" == "y"
|
||||
if [[ "${hotspot}" == "y" ]]
|
||||
then
|
||||
echo ' bridge_ports eth0 wlan0' >> /etc/network/interfaces
|
||||
else
|
||||
echo ' bridge_ports eth0' >> /etc/network/interfaces
|
||||
fi
|
||||
|
||||
echo ' bridge_fd 0' >> /etc/network/interfaces
|
||||
echo ' bridge_stp off' >> /etc/network/interfaces
|
||||
@ -142,7 +143,7 @@ echo ' bridge_stp off' >> /etc/network/interfaces
|
||||
|
||||
dnsConfig() {
|
||||
sed -i 's/#interface=/interface=br0/g' /etc/dnsmasq.conf
|
||||
sed -i 's/#dhcp-range=192.168.0.50,192.168.0.150,12h/dhcp-range=192.168.5.50,192.168.5.150,4h/g'
|
||||
sed -i 's/#dhcp-range=192.168.0.50,192.168.0.150,12h/dhcp-range=192.168.5.50,192.168.5.150,4h/g' /etc/dnsmasq.conf
|
||||
systemctl enable dnsmasq
|
||||
}
|
||||
|
||||
@ -151,7 +152,7 @@ getVars
|
||||
installPreReqs
|
||||
firewallConfig
|
||||
|
||||
if [[ "${bridge}" == "y" ]]
|
||||
if [[ "${hotspot}" == "y" ]]
|
||||
then
|
||||
bridgeConfig
|
||||
apConfig
|
||||
|
Loading…
x
Reference in New Issue
Block a user