Changeset 868 for trunk/dev/bin/script/Frameshare-SSH-Tunnel-Client.sh
- Timestamp:
- 02/08/14 20:32:50 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dev/bin/script/Frameshare-SSH-Tunnel-Client.sh
r867 r868 1 1 #!/bin/bash 2 2 3 # IMPORTANT: 3 trap ctrl_c INT 4 4 5 # This script does NOT close cleanly, 6 # the SSH tunnels will be left active after the script exits! 5 function ctrl_c() { 6 echo -e "\nExiting" 7 # clean up the SSH tunnels 8 jobs -p | xargs kill 9 exit 0 10 } 7 11 8 # If you don't have public-key authentication set up for your SSH login, 9 # You won't be able to use this script, because the SSH connections won't be able to login automatically 10 # So either set up public-key authentication, or you can manually start every SSH tunnel and login 11 12 # You should change the username and hostname to your own username and the hostname of your server 13 username=jts21 14 hostname=toro.cms.waikato.ac.nz 15 # You should change the port to the port of your server (leave it at 3000 if not sure) 16 port=3000 17 18 # --------------------------------------------------- 19 # NOTHING BELOW THIS POINT SHOULD NEED TO BE MODIFIED 20 # --------------------------------------------------- 21 22 # get the offseted port values 23 frameserverPort=$port 24 framesaverPort=$((port+1)) 25 messagePort=$((port+2)) 26 infserverPort=$((port+3)) 27 infupdatePort=$((port+4)) 28 imageserverPort=$((port+5)) 29 imagesaverPort=$((port+6)) 30 12 # load config 13 . $(dirname $0)/Frameshare-SSH-Tunnel-CONFIG.sh 31 14 32 15 # setup ssh tunnels … … 41 24 sleep 1 42 25 # tunnel udp connections through their equivalent tcp ports 43 java UDPTunnelclient $frameserverPort $framesaverPort $messagePort $infserverPort $infupdatePort26 java -jar $jarFile client $frameserverPort $framesaverPort $messagePort $infserverPort $infupdatePort
Note:
See TracChangeset
for help on using the changeset viewer.