diff options
Diffstat (limited to 'rapid-tunneling')
-rwxr-xr-x | rapid-tunneling | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rapid-tunneling b/rapid-tunneling index 1528e2e..c563b75 100755 --- a/rapid-tunneling +++ b/rapid-tunneling @@ -29,4 +29,10 @@ rm -rf $tmpdir # Remove host key of $host (in case it has changed) ssh-keygen -R $host 2>/dev/null || true # Run in background -busybox start-stop-daemon -S -b -m -p $HOME/pid -x /bin/sh -- -c "exec ssh -o 'StrictHostKeyChecking no' -o 'BatchMode yes' -o 'ServerAliveInterval 60' -T -p $port -i $HOME/key -R $tunnelport:127.0.0.1:22 -l $user $host < $HOME/ra-params.tar.gz" +if [ -x /sbin/start-stop-daemon ]; then + SSD=/sbin/start-stop-daemon +else + SSD="busybox start-stop-daemon" +fi + +$SSD -S -b -m -p $HOME/pid -x /bin/sh -- -c "exec ssh -o 'StrictHostKeyChecking no' -o 'BatchMode yes' -o 'ServerAliveInterval 60' -T -p $port -i $HOME/key -R $tunnelport:127.0.0.1:22 -l $user $host < $HOME/ra-params.tar.gz" |