Updated variable names and casing
This commit is contained in:
6
wifi.sh
6
wifi.sh
@@ -7,13 +7,13 @@ set -euo pipefail
|
||||
# resolvectl status | grep 'Link' | sed -e 's|^.*(||g; s|).*||g' | while read -r INTERFACE; do resolvectl dns ${INTERFACE} 9.9.9.9; done && sleep 3 && nmcli device status | grep -v 'DEVICE' | grep -v 'lo' | sed -e 's| .*||g' | while read -r INTERFACE; do nmcli device disconnect ${INTERFACE}; sleep 1; nmcli device connect ${INTERFACE}; done
|
||||
|
||||
|
||||
BASEDIR="$(dirname "${0}" | sed "s|^\.|${PWD}|")"
|
||||
baseDir="$(realpath "$(dirname "${0}")")"
|
||||
|
||||
|
||||
cat << EOF
|
||||
#######################################
|
||||
## ##
|
||||
## $(cat "${BASEDIR}/title") Script ##
|
||||
## $(cat "${baseDir}/title") Script ##
|
||||
## ##
|
||||
## Jean <jean@easthighnerd.net> ##
|
||||
## ##
|
||||
@@ -37,7 +37,7 @@ nmcli device wifi list
|
||||
printf "Enter the SSID of the WiFi network you wish to connect to:\n"
|
||||
read -r WIFI_NAME
|
||||
|
||||
nmcli --ask device wifi connect ${WIFI_NAME}
|
||||
nmcli --ask device wifi connect ${wifiName}
|
||||
|
||||
cat << EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user