mirror of
https://github.com/koreader/koreader
synced 2024-11-10 01:10:34 +00:00
15 lines
407 B
Bash
15 lines
407 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -x
|
||
|
if [ "$1" = "on" ]; then
|
||
|
wmiconfig -i wlan0 --wlan enable
|
||
|
wmiconfig -i wlan0 --setreassocmode 0
|
||
|
wmiconfig -i wlan0 --power maxperf
|
||
|
/sbin/wpa_supplicant -B -i wlan0 -D wext -C /var/run/wpa_supplicant -f /var/log/wpa_supplicant.log
|
||
|
else
|
||
|
if [ "$(pidof wpa_supplicant)" != "" ]; then
|
||
|
kill "$(pidof wpa_supplicant)"
|
||
|
fi
|
||
|
wmiconfig -i wlan0 --wlan disable
|
||
|
fi
|