From f65de5b33ec4e46e1d565a628c33f3bf98f113fe Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 20 Sep 2026 16:03:39 -0400 Subject: [PATCH] add set_wifi --- set_wifi.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 set_wifi.sh 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 +