Add an automated way to configure a hostspot network

Signed-off-by: Stacy Harper <contact@stacyharper.net>
master
noneofyourbusiness 4 years ago committed by Stacy Harper
parent f361cf7139
commit 500a227d05
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 37
      scripts/core/sxmo_hotspot.sh
  2. 4
      scripts/core/sxmo_networks.sh

@ -0,0 +1,37 @@
#!/usr/bin/env sh
while [ -z "$SSID" ]; do
SSID="$(
echo "$ENTRIES" | sxmo_dmenu_with_kb.sh -c -p "SSID"
)"
done
while [ -z "$key" ]; do
key="$(
echo "$ENTRIES" | sxmo_dmenu_with_kb.sh -c -p "pass"
)"
done
while [ -z "$key1" ]; do
key1="$(
echo "$ENTRIES" | sxmo_dmenu_with_kb.sh -c -p "confirm"
)"
done
if [ "$key" != "$key1" ]; then
notify-send key mismatch
exit 2
fi
while [ -z "$channel" ]; do
channel="$(
echo "11" | sxmo_dmenu_with_kb.sh -l 1 -c -p "channels"
)"
done
if [ -z "$SSID" ] || [ -z "$key" ]; then
notify-send either SSID: "$SSID" or key are empty
exit 3
fi
notify-send "$(nmcli device wifi hotspot ifname wlan0 con-name "Hotspot $SSID" ssid "$SSID" channel "$channel" band bg password "$key")"

@ -94,6 +94,7 @@ networksmenu() {
$(connections)
Add a GSM Network
Add a WPA Network
Add a Hotspot
Delete a Network
Launch Nmtui
Launch Ifconfig
@ -116,6 +117,9 @@ networksmenu() {
"Add a WPA Network" )
addnetworkwpamenu
;;
"Add a Hotspot" )
sxmo_hotspot.sh
;;
"Delete a Network" )
deletenetworkmenu
;;

Loading…
Cancel
Save