various fixes
[distro-setup] / rew
1 #!/bin/bash
2 p="$(lsof -i tcp:31416 -Fp -a -c java | sed -rn 's/^p//p')"
3 if [[ $p ]]; then
4 kill $p
5 fi
6 cd /a/opt/gnirehtet
7 ./gnirehtet rt &>/tmp/rt &
8 # note, to kill it, you need to also kill
9 # lsof -i tcp:31416
10 # and maybe unplug adb cable
11 # note, ping results in log message: dropping invalid packet
12
13 tail -F /tmp/rt ||: