Jpp  17.2.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JControlHostSSHTunnel.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 #
4 # \author mdejong
5 #
6 version=1.0
7 script=${0##*/}
8 
9 # ------------------------------------------------------------------------------------------
10 #
11 # Utility script to test JControlHost/JLigier through ssh tunnel.
12 #
13 # ------------------------------------------------------------------------------------------
14 
15 
16 if [ -z $JPP_DIR ]; then
17  echo "Variable JPP_DIR undefined."
18  exit
19 fi
20 
21 
22 source $JPP_DIR/setenv.sh $JPP_DIR
23 
24 
26 
27 if do_usage $*; then
28  usage "$script <host name>"
29 fi
30 
31 case $# in
32  1) set_variable SERVER $1;;
33  *) usage "$script <host name>"
34 esac
35 
36 
37 if (( 1 )); then
38 
39  set_variable PORT 5553
40  set_variable SOCKET my-ctrl-socket
41 
42  JLigier.sh ${SERVER} continue
43 
44  echo "Create ssh tunnel."
45 
46  ssh -S ${SOCKET} -fN -M 0 -L ${PORT}:${SERVER}:${PORT}
47 
48  ./JControlHost -H :${PORT} -d3
49 
50  echo "Delete ssh tunnel."
51 
52  ssh -S ${SOCKET} -O exit ${SERVER}
53 
54 fi
then usage $script[port]< option > nPossible restart fi case set_variable OPTION set_variable PORT
version
Definition: JEditTuneHV.sh:5
static const double H
Planck constant [eV s].
exit
Definition: JPizza.sh:36
then echo
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
* usage
&set_variable SERVER
Definition: JStopDAQ.sh:29
then echo Launching message logger in new window xterm geometry e JGetMessage H $HOST T $TAG d3
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62