Changeset 18866

Show
Ignore:
Timestamp:
01.04.2009 19:08:28 (10 years ago)
Author:
ak19
Message:

The configure-web and configure-apache targets now take an extra optional parameter, the configuration file, which defaults to llssite.cfg if none is provided.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/gsicontrol.sh

    r18851 r18866  
    6969function configure-apache { 
    7070    test-gsdlhome 
     71    configfile=$1 ; 
     72    if [ "x$configfile" = "x" ]; then 
     73    configfile="$GSDLHOME/llssite.cfg"; 
     74    fi ; 
    7175    echo "Configuring the apache webserver..." ; 
    72     port=`egrep "^apache.port" $GSDLHOME/lib/java/build.properties | awk -F= '{print $2}'` ; 
     76    port=`egrep "^portnumber" $configfile | awk -F= '{print $2}'` ; 
    7377    echo $port | configure-port ; 
    7478    if test -e "$GSDLHOME/apache-httpd/$GSDLOS/conf/httpd.conf" ; then 
     
    8286function configure-web { 
    8387    configure-cgi 
    84     configure-apache 
     88    configure-apache $1 
    8589} 
    8690 
     
    129133 
    130134 
    131 if [ $# != 1 ] ; then 
     135if [[ $# < 1  || $# > 2 ]] ; then 
    132136    echo "" 
    133137    echo "   Usage: $0 <command>" 
     
    139143    echo "   web-graceful" 
    140144    echo "   configure-admin" 
    141     echo "   configure-web" 
     145    echo "   configure-web [config-filename]" 
     146    echo "   configure-apache [config-filename]" 
    142147    echo "   configure-port" 
    143     echo "   configure-apache" 
    144148    echo "   configure-cgi" 
    145149    echo "   test-gsdlhome" 
     
    150154 
    151155target=$1 
     156configfile=$2 
    152157 
    153158case $target in 
     
    165170    configure-admin;; 
    166171    configure-web) 
    167     configure-web;; 
     172    configure-web $configfile;; 
    168173    configure-port) 
    169174    configure-port;; 
    170175    configure-apache) 
    171     configure-apache;; 
     176    configure-apache $configfile;; 
    172177    configure-cgi) 
    173178    configure-cgi;;