mirror of
https://github.com/danog/termux-api-package.git
synced 2024-11-26 20:34:48 +01:00
16 lines
325 B
Plaintext
16 lines
325 B
Plaintext
|
#!/data/data/com.termux/files/usr/bin/sh
|
||
|
set -e -u
|
||
|
|
||
|
SCRIPTNAME=termux-wifi-enable
|
||
|
|
||
|
show_usage () {
|
||
|
echo "Usage: $SCRIPTNAME [true | false]"
|
||
|
echo "Toggle Wi-Fi On/Off"
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
if [ "$#" -ne 1 ]; then
|
||
|
show_usage
|
||
|
fi
|
||
|
|
||
|
/data/data/com.termux/files/usr/libexec/termux-api WifiEnable --ez enabled $1
|