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

24 lines
395 B
Plaintext
Raw Normal View History

2020-07-03 16:47:12 +02:00
#!/usr/bin/env bash
2020-07-03 17:55:45 +02:00
function start() {
adb start-server
nohup gnirehtet autorun &> /dev/null &
2020-09-11 20:20:04 +02:00
printf "Started reverse tethering \n"
2020-07-03 17:55:45 +02:00
}
function stop() {
adb kill-server
gnirehtet stop
pkill gnirehtet
2020-09-11 20:20:04 +02:00
printf "Stopped reverse tethering \n"
2020-07-03 17:55:45 +02:00
}
case "$1" in
start) start ;;
stop) stop ;;
restart) stop; start ;;
2020-09-11 20:20:04 +02:00
*) printf "start | stop | restart \n" >&2
2020-07-03 17:55:45 +02:00
exit 1
;;
esac