dots/.bin/reverse-tether-linux-android

24 lines
380 B
Bash
Executable File

#!/usr/bin/env bash
function start() {
adb start-server
nohup gnirehtet autorun &> /dev/null &
echo "Started reverse tethering"
}
function stop() {
adb kill-server
gnirehtet stop
pkill gnirehtet
echo "Stopped reverse tethering"
}
case "$1" in
start) start ;;
stop) stop ;;
restart) stop; start ;;
*) echo "start | stop | restart" >&2
exit 1
;;
esac