Configurable wifi interface

This commit is contained in:
Bob Mottram 2016-10-21 09:52:09 +01:00
parent 0b8fc22d70
commit 904d8d60af
2 changed files with 13 additions and 13 deletions

View File

@ -558,7 +558,7 @@ function install_dokuwiki {
echo '' >> /home/$MY_USERNAME/README
echo '' >> /home/$MY_USERNAME/README
echo $'Dokuwiki' >> /home/$MY_USERNAME/README
echo '====' >> /home/$MY_USERNAME/README
echo '========' >> /home/$MY_USERNAME/README
echo $"Dokuwiki onion domain: ${DOKUWIKI_ONION_HOSTNAME}" >> /home/$MY_USERNAME/README
echo $"Dokuwiki username: $MY_USERNAME" >> /home/$MY_USERNAME/README
echo $"Dokuwiki password: $DOKUWIKI_ADMIN_PASSWORD" >> /home/$MY_USERNAME/README

View File

@ -71,7 +71,7 @@ function hotspot_off {
fi
systemctl restart network-manager
ifdown wlan0
ifdown $WIFI_INTERFACE
}
function hotspot_on {
@ -138,7 +138,7 @@ function hotspot_on {
echo " bridge_ports $WIFI_INTERFACE eth0" >> /etc/network/interfaces
systemctl restart network-manager
ifup wlan0
ifup $WIFI_INTERFACE
systemctl restart hostapd
}
@ -159,8 +159,8 @@ function wifi_wpa2_psk {
echo 'allow-hotplug eth0' >> /etc/network/interfaces
echo 'iface eth0 inet dhcp' >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'allow-hotplug wlan0' >> /etc/network/interfaces
echo 'iface wlan0 inet manual' >> /etc/network/interfaces
echo "allow-hotplug ${WIFI_INTERFACE}" >> /etc/network/interfaces
echo "iface ${WIFI_INTERFACE} inet manual" >> /etc/network/interfaces
echo " wpa-roam $WIFI_CONFIG" >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'iface default inet dhcp' >> /etc/network/interfaces
@ -168,7 +168,7 @@ function wifi_wpa2_psk {
wpa_passphrase "$ssid" "$passphrase" > $WIFI_CONFIG
systemctl restart network-manager
ifup wlan0
ifup ${WIFI_INTERFACE}
}
function wifi_none {
@ -187,8 +187,8 @@ function wifi_none {
echo 'allow-hotplug eth0' >> /etc/network/interfaces
echo 'iface eth0 inet dhcp' >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'allow-hotplug wlan0' >> /etc/network/interfaces
echo 'iface wlan0 inet manual' >> /etc/network/interfaces
echo "allow-hotplug ${WIFI_INTERFACE}" >> /etc/network/interfaces
echo "iface ${WIFI_INTERFACE} inet manual" >> /etc/network/interfaces
echo " wpa-roam $WIFI_CONFIG" >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'iface default inet dhcp' >> /etc/network/interfaces
@ -199,7 +199,7 @@ function wifi_none {
echo '}' >> $WIFI_CONFIG
systemctl restart network-manager
ifup wlan0
ifup ${WIFI_INTERFACE}
}
function networks_from_file {
@ -220,8 +220,8 @@ function networks_from_file {
echo 'allow-hotplug eth0' >> /etc/network/interfaces
echo 'iface eth0 inet dhcp' >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'allow-hotplug wlan0' >> /etc/network/interfaces
echo 'iface wlan0 inet manual' >> /etc/network/interfaces
echo "allow-hotplug ${WIFI_INTERFACE}" >> /etc/network/interfaces
echo "iface ${WIFI_INTERFACE} inet manual" >> /etc/network/interfaces
echo " wpa-roam $WIFI_CONFIG" >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'iface default inet dhcp' >> /etc/network/interfaces
@ -263,7 +263,7 @@ function networks_from_file {
done < $WIFI_NETWORKS_FILE
systemctl restart network-manager
ifup wlan0
ifup ${WIFI_INTERFACE}
}
function create_networks_interactive {
@ -348,7 +348,7 @@ function disable_wifi {
echo '# Include files from /etc/network/interfaces.d:' >> /etc/network/interfaces
echo 'source-directory /etc/network/interfaces.d' >> /etc/network/interfaces
systemctl restart network-manager
ifdown wlan0
ifdown ${WIFI_INTERFACE}
else
networks_from_file
fi