You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
739 B
38 lines
739 B
4 years ago
|
#!/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")"
|