7 # ------------------------------------------------------------------------------------------ 
    9 #                             Utility script to run JLigier. 
   11 # ------------------------------------------------------------------------------------------ 
   13 if [ -z $JPP_DIR ]; 
then 
   14     echo "Variable JPP_DIR undefined." 
   18 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/
null 
   27 if ( do_usage $* ); 
then 
   28     print -u2 
"$script [host name] <option>" 
   29     print -u2 
"Possible options: start, stop, continue, restart." 
   42     fatal 
"Invalid option $OPTION."     
   45 if   [[ 
$OPTION == 
"stop" || $OPTION == 
"restart" ]]; 
then 
   47     PID=`get_pid $HOST $COMMAND`
 
   49     if [[ -
n $PID ]]; 
then  
   50         notice 
"Stop $COMMAND on $HOST with PID $PID." 
   51         ssh $HOST eval kill -9 $PID
 
   54     OPTION=${OPTION/restart/start}
 
   56 elif [[ $OPTION == 
"continue" ]]; 
then 
   58     PID=`get_pid $HOST $COMMAND`
 
   60     if [[ -
n $PID ]]; 
then  
   61         notice 
"JLigier is running on $HOST with PID $PID." 
   68 if [[ $OPTION = 
"start" ]]; 
then 
   70     notice 
"Start $COMMAND on $HOST." 
   71     ssh $HOST 
"nohup $COMMAND -P $PORT -T $TIMEOUT -d $DEBUG --! >& $WORKDIR/ligier.log &" 
void set_variable(const std::string &name, const std::string &value)
Set environment variable. 
 
alias put_queue eval echo n
 
then usage $script< detector >< run >< outputfile > fi case set_variable OPTION
 
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 source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
 
*fatal Wrong option $OPTION
 
then usage $script< detector file >< inputfile > fi case set_variable WORKDIR
 
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
 
#define DEBUG(A)
Message macros.