Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JLigier.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5script=${0##*/}
6
7# ------------------------------------------------------------------------------------------
8#
9# Utility script to remotely run JLigier.
10#
11# ------------------------------------------------------------------------------------------
12
13if [ -z $JPP_DIR ]; then
14 echo "Variable JPP_DIR undefined."
15 exit
16fi
17
18source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
19
20set_variable PORT 5553
21set_variable HOST `get_ip_address`
22
23if do_usage $*; then
24 usage "$script [<host name> [port]] <option>"\
25 "\nPossible options: start, stop, continue, restart."
26fi
27
28case $# in
29 3) set_variable OPTION $3
30 set_variable PORT $2
31 set_variable HOST $1;;
32 2) set_variable OPTION $2
33 set_variable HOST $1;;
34 1) set_variable OPTION $1;;
35 *) fatal "Wrong number of arguments."
36esac
37
38ssh $HOST "zsh -c '(source $JPP_DIR/setenv.sh $JPP_DIR && JLigier-local.sh $PORT $OPTION)'"