summaryrefslogtreecommitdiff
path: root/rapid-tunneling
diff options
context:
space:
mode:
authorAlex Landau <alex.landau@xorcom.com>2008-12-28 11:51:06 +0000
committerAlex Landau <alex.landau@xorcom.com>2008-12-28 11:51:06 +0000
commitecb7b1ddf0445eafea9242c5b5062d5975ac1de7 (patch)
tree49e922df3cc852102ca50c4d38b434ebc0f020cd /rapid-tunneling
parent3600a6d1a64202e013d715d93e2dc24ac1d6d450 (diff)
rapid-tunneling:
- Server: Fix server startup, rename init.d file to sshd_support (to match RPM). - Client: Use busybox start-stop-daemon only if /sbin/start-stop-daemon is unavailable. - Fix warnings during upgrading of debs. git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6503 283159da-0705-0410-b60c-f2062b4bb6ad
Diffstat (limited to 'rapid-tunneling')
-rwxr-xr-xrapid-tunneling8
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"