diff --git a/.bin/icb-tunnel b/.bin/icb-tunnel index 0a22c6b..65615aa 100755 --- a/.bin/icb-tunnel +++ b/.bin/icb-tunnel @@ -1,6 +1,8 @@ #!/bin/ksh #pkill -f "7326:localhost:7326 anonicb@slackers.openbsd.org" #sleep 1 -ssh -fN -o ServerAliveInterval=15 -L 7326:localhost:7326 anonicb@slackers.openbsd.org +#ssh -fN -o ServerAliveInterval=15 -L 7326:localhost:7326 anonicb@slackers.openbsd.org #autossh -M 0 -f -T -N -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -L 7326:localhost:7326 anonicb@slackers.openbsd.org - +/usr/bin/netstat -n \ + | /usr/bin/grep -q '127\.0\.0\.1\.7326' \ + || ssh -fN -o ServerAliveInterval=15 -L 7326:localhost:7326 anonicb@slackers.openbsd.org \