bash: tcp-tunnel.sh: clean up the socket files before sleep
In this way, when the user SIGINTs during the sleep, we have already cleaned up.
This commit is contained in:
parent
91d033a013
commit
d1369149b2
@ -32,7 +32,7 @@ while [ "$1" ] && [ "$2" ]; do
|
||||
done
|
||||
>&2 echo "> ssh$tun $server"
|
||||
while :; do
|
||||
sleep 1
|
||||
[ "$del" ] && ssh -o ConnectTimeout=10 $server mkdir -m 700 -p .tcp-tunnel $del
|
||||
sleep 1
|
||||
ssh -o ConnectTimeout=10 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=1 -o ServerAliveInterval=30 $tun $server
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user