diff --git a/set_wifi.sh b/set_wifi.sh new file mode 100755 index 00000000..fe9bab8f --- /dev/null +++ b/set_wifi.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [ -z "$1" ] ; then + echo "include the WiFi ssid and password" + exit +elif [ -z "$2" ] ; then + echo "include password" + exit +fi + +echo "If this works, this web page won't work again until you connect to the new WiFi network!" + +echo + +sudo nmcli device wifi rescan + +sleep 1 + +sudo nmcli device wifi connect "$1" password "$2" + +sudo reboot now +