#!/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 : xwhep.probe # # Purpose : This calls with the right parameters # # Params : [start | stop | restart] # # Description : this manages the XWHEP probe part # # return : 0 on success # 1 on usage error # 2 on file error (files not found) # 3 on user error (user not found) # 4 if not in the expected state : # ** stop asked but not running # ** start asked but already running # # chkconfig: 345 99 99 # processname: /opt/XWHEP-probe-5.9.0/bin/xwhep.probe # config: /opt/XWHEP-probe-5.9.0/conf/xwhep.probe.conf # description: XWHEP DesktopGrid computing element # # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # ** 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 ###################################################### # force it otherwise $progname may contain S99xwhep.probe (e.g. if linked from /etc/rc3.d/S99xwhep.probe") PROG="xwhep.probe" #PROG=$progname #ROOTDIR="$progdir/.." currentDir=`pwd` cd $progdir ROOTDIR=`pwd`/.. cd $currentDir PARAM=$1 [ "X$PARAM" = "X" ] && PARAM="HELP" $ROOTDIR/bin/xwprobe $PARAM $PROG $ROOTDIR $* # # End of file #