24 lines
395 B
Bash
Executable File
24 lines
395 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
function start() {
|
|
adb start-server
|
|
nohup gnirehtet autorun &> /dev/null &
|
|
printf "Started reverse tethering \n"
|
|
}
|
|
|
|
function stop() {
|
|
adb kill-server
|
|
gnirehtet stop
|
|
pkill gnirehtet
|
|
printf "Stopped reverse tethering \n"
|
|
}
|
|
|
|
case "$1" in
|
|
start) start ;;
|
|
stop) stop ;;
|
|
restart) stop; start ;;
|
|
*) printf "start | stop | restart \n" >&2
|
|
exit 1
|
|
;;
|
|
esac
|