#!/bin/sh # Copyrights : CNRS # Author : Oleg Lodygensky # Acknowledgment : XtremWeb-HEP is based on XtremWeb 1.8.0 by inria : http://www.xtremweb.net/ # Web : http://www.xtremweb-hep.org # # This file is part of XtremWeb-HEP. # # XtremWeb-HEP is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # XtremWeb-HEP is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with XtremWeb-HEP. If not, see . # # # # # File : xtremweb.client # # Purpose : This runs the xtremweb client # # config file : ../conf/xtremweb.client.conf # # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # ** DO NOT EDIT ** # ** This file is generated by install script ** # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< # PRG=$0 ############################################################ # Let first reach "real" file through symbolic links, if any ############################################################ while [ -h "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` if expr "$link" : '^/' 2> /dev/null >/dev/null; then PRG="$link" else PRG="`dirname $PRG`/$link" fi done progdir=`dirname $PRG` progname=`basename $0` ###################################################### # Main ###################################################### PROG="xtremweb.client" #ROOTDIR="$progdir/.." currentDir=`pwd` cd $progdir/.. ROOTDIR=`pwd` cd $currentDir COMMAND=$1 shift COMMANDS=$1 shift if [ -z "$COMMAND" -o -z "$COMMANDS" ]; then head -18 $0 exit fi . $ROOTDIR/bin/xtremwebconf.sh > /dev/null 2>&1 RETVAL=$? if [ $RETVAL -ne 0 ] ; then echo "`date` [`uname -n` $PROG] ERROR : please check $LOGFILE" exit $RETVAL fi if [ -z "$PARAMS" ]; then JAVA="$JAVA $COMMANDS" else JAVA="$JAVA $COMMAND" fi if [ "$COMMAND" = "--xwworkalive" ] ; then grep -i "role[[:space:]]*=[[:space:]]*worker" $CFGFILE > /dev/null 2>&1 RC=$? if [ $RC -ne 0 ] ; then echo "`date` [`uname -n` $PROG] FATAL : you must use a worker config file for this command" echo "`date` [`uname -n` $PROG] INFO : this command is for debug purpose only" exit 1 fi fi [ "X$LOGGERLEVEL" = "Xdebug" ] && echo "$JAVA" $JAVA # # End of file #