more and fixes
This commit is contained in:
1 parent
ab9fea20da
commit
9936f538e1
8 files changed
+242
-29
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
is_active() {
|
||||
rfkill list wifi 2>/dev/null | grep -q "Soft blocked: yes"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
status)
|
||||
is_active && echo true || echo false
|
||||
;;
|
||||
*)
|
||||
if is_active; then
|
||||
rfkill unblock all
|
||||
echo false
|
||||
else
|
||||
rfkill block all
|
||||
echo true
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
Reference in new issue
Block a user