home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wsgatsam.zip / status.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2003-02-24  |  2KB  |  48 lines

  1. #!/bin/sh
  2. # status.sh
  3. # lists status of HTTPR large file transfers
  4. # Usage: ./status.sh <wsgw_dir> <stateFile_dir> <optional_param>, where
  5. #  <wsgw_dir> is the WebServices Gateway Directory (no trailing slash),
  6. #  <stateFile_dir> is the directory containing the httpr state file, stateFile (no trailing slash),
  7. #  <optional_param> is cancel, or no parameter is typed.
  8.  
  9. echo
  10. echo "This utility lists the status of large file transfers over HTTPR."
  11. echo "It can be run for the sending or the receiving end, as determined by the stateFile_dir parameter."
  12. echo
  13.  
  14. if [ $# -eq 2 -o $# -eq 3 ]; then # tests there are 1 or 2 args
  15.  
  16.   if [ -d $1 ]; then
  17.  
  18.     if [ -d $2 ]; then
  19.  
  20.       java -DSTATE_FILE=$2/stateFile -Djava.protocol.handler.pkgs=com.ibm.axis.transport -Dlft-directory=$1/serverTemp -Dlft-piFactory=com.ibm.httpr.file.FileStateManagerFactory -classpath $1/lib/wsgw-samples.jar:$1/lib/httpr.jar services.lftfileservice.status $3
  21.  
  22.     else
  23.  
  24.       echo "The directory specified for the HTTPR stateFile ($2) doesn't exist."
  25.  
  26.     fi
  27.  
  28.   else
  29.  
  30.     echo "The directory specified for the WebServices Gateway ($1) doesn't exist."
  31.  
  32.   fi  
  33.  
  34. else
  35.  
  36.   echo "Usage: ./status.sh <wsgw_dir> <stateFile_dir> <optional_param>,"
  37.   echo " where <wsgw_dir> is the WebServices Gateway Directory (no trailing slash),"
  38.   echo " <stateFile_dir> is the directory containing the httpr state file, stateFile (no trailing slash),"
  39.   echo " <optional_param> is cancel, or no parameter is typed."
  40.   echo "Examples:"
  41.   echo "(client side, no cancel option):"
  42.   echo "./status.sh /data/W110.L020820/wsgw_was4 /data/W110.L020820/wsgw_was4/samples/services/lftfileservice"
  43.   echo "(server side, cancel option):"
  44.   echo "./status.sh /data/W110.L020820/wsgw_was4 /opt/WebSphere/AppServer/bin cancel"
  45.   echo
  46.  
  47. fi
  48.