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

  1. #!/bin/sh
  2. #
  3. # Data Source Setup - IBM WebServices Gateway
  4. #
  5. # The arguments are:
  6. # "1: WebServices Gateway dir"
  7. # "2: WebSphere nodename"
  8. # "3: WebSphere AppServer dir"
  9. # "4: DB2 user id"
  10. # "5: DB2 password"
  11.  
  12. echo
  13.  
  14. if [ $# -eq 5 ]; then # test there are 5 arguments
  15.  
  16.   if [ -d $1 ]; then # test 1st argument is a directory
  17.  
  18.     if [ -d $3 ]; then # test 3d  argument is a directory
  19.  
  20.       ./installDS.sh $1 $2 $3 $4 $5 > $3/logs/WSGWinstallDS.log 2>&1
  21.  
  22.       if [ $? -eq 0 ]; then # installDS.sh worked.
  23.  
  24.         echo "The WebServices Gateway DataSource has been installed."
  25.  
  26.       else
  27.  
  28.         echo "The WebServices Gateway DataSource has NOT been created."
  29.         echo "Try looking at the WSGWinstallDS.log file in the /logs subdirectory"
  30.         echo "of the WebSphere AppServer dir to diagnose the problem."
  31.  
  32.       fi
  33.  
  34.     else # 3d  argument isn't a dir
  35.  
  36.       echo "The directory ($3) specified for WebSphere AppServer doesn't exist."
  37.       echo "The WebServices Gateway JDBC has NOT been installed."
  38.  
  39.     fi
  40.  
  41.   else # 1st argument isn't a dir
  42.  
  43.     echo "The directory ($1) specified for WebServices Gateway doesn't exist."
  44.     echo "The WebServices Gateway JDBC has NOT been installed."
  45.  
  46.   fi
  47.  
  48. else # user didn't pass 5 arguments
  49.  
  50.   echo "WSGWinstallDS.sh requires 5 arguments:"
  51.   echo "1: WebServices Gateway Directory (no trailing /)"
  52.   echo "2: WebSphere nodename"
  53.   echo "3: WebSphere AppServer Directory (no trailing /)"
  54.   echo "4: DB2 USERID"
  55.   echo "5: DB2 PASSWORD"
  56.   echo "Example: ./WSGWinstallDS.sh /opt/WebSphere/AppServer/WSGW bportier /opt/WebSphere/AppServer db2inst1 db2pwd"
  57.  
  58.  
  59. fi
  60.  
  61. echo
  62.