diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-03-02 01:30:04 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-03-02 01:30:04 -0500 |
commit | b03b66696895ac311cc631c4e3732c1f1ffda6b4 (patch) | |
tree | e498854fe7b07061a5a3aaa7404d8e00f57e0535 /bin | |
parent | 70add7a4321c0fbee741dad76caec9cddbfdd4e9 (diff) | |
download | conf-b03b66696895ac311cc631c4e3732c1f1ffda6b4.tar.gz conf-b03b66696895ac311cc631c4e3732c1f1ffda6b4.zip |
switch to iwd
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/hornet/wifi | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/bin/hornet/wifi b/bin/hornet/wifi deleted file mode 100755 index 14eba23..0000000 --- a/bin/hornet/wifi +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -set -eu -set -o pipefail - -DEV=wlp0s20f3 -OPEN=open - -if [ -z "${1:-}" ]; then - if sudo netctl status $OPEN > /dev/null 2>&1; then - sudo netctl restart $OPEN - else - sudo systemctl restart netctl-auto@$DEV - fi -else - case "$1" in - open) - if [ -n "${2:-}" ]; then - sudo sed -i "s/^ESSID=.*/ESSID='${2}'/" "/etc/netctl/${OPEN}" - fi - - if sudo netctl status $OPEN > /dev/null 2>&1; then - sudo netctl restart $OPEN - else - sudo systemctl stop netctl-auto@$DEV - sudo netctl start $OPEN - fi - ;; - wpa) - if ! sudo systemctl status netctl-auto@$DEV > /dev/null 2>&1; then - sudo netctl stop $OPEN - sudo systemctl start netctl-auto@$DEV - fi - ;; - scan) - sudo iw dev $DEV scan | grep SSID | perl -nle 's/^.*SSID: //; print unless $seen{$_}++' - ;; - esac -fi |