source: trunk/dev/bin/script/Frameshare-SSH-Tunnel-Client.sh@ 868

Last change on this file since 868 was 868, checked in by jts21, 10 years ago

Tidy up scripts and add UDPTunnel jar, so tunnelling frameserver shouldn't require any more setup than modifying the config file (see the readme)

  • Property svn:executable set to *
File size: 952 bytes
Line 
1#!/bin/bash
2
3trap ctrl_c INT
4
5function ctrl_c() {
6 echo -e "\nExiting"
7 # clean up the SSH tunnels
8 jobs -p | xargs kill
9 exit 0
10}
11
12# load config
13. $(dirname $0)/Frameshare-SSH-Tunnel-CONFIG.sh
14
15# setup ssh tunnels
16ssh -NL $frameserverPort:localhost:$frameserverPort ${username}@${hostname} &
17ssh -NL $framesaverPort:localhost:$framesaverPort ${username}@${hostname} &
18ssh -NL $messagePort:localhost:$messagePort ${username}@${hostname} &
19ssh -NL $infserverPort:localhost:$infserverPort ${username}@${hostname} &
20ssh -NL $infupdatePort:localhost:$infupdatePort ${username}@${hostname} &
21ssh -NL $imageserverPort:localhost:$imageserverPort ${username}@${hostname} &
22ssh -NL $imagesaverPort:localhost:$imagesaverPort ${username}@${hostname} &
23# give the ssh instances time to connect
24sleep 1
25# tunnel udp connections through their equivalent tcp ports
26java -jar $jarFile client $frameserverPort $framesaverPort $messagePort $infserverPort $infupdatePort
Note: See TracBrowser for help on using the repository browser.