-
-
Save preveen-stack/da91727c868d4c0b81e600bda3a1bd5a to your computer and use it in GitHub Desktop.
A script to make connecting with wpa_cli easier (Work in progress)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Wraps aursync command to mount an amazon s3 bucket which contains a repository | |
set -uo pipefail | |
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR | |
INTERFACE=wlp58s0 | |
wpa() { | |
wpa_cli -i "${INTERFACE}" "$@" | |
} | |
case "$1" in | |
list) | |
wpa scan_results | cut -f 5- | grep -v '^$' | |
;; | |
add) | |
network=$(add_network) | |
wpa set_network "${network}" ssid '"GBK WIFI"' | |
wpa set_network "${network}" key_mgmt NONE | |
wpa enable_network "${network}" | |
wpa save_config | |
;; | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment