Ignore:
Timestamp:
2011-05-04T16:59:30+12:00 (13 years ago)
Author:
ak19
Message:

In gs2-server.sh, no longer redirecting stderr of call call to gsicontrol.sh reset-gsdlhome into the void, only the stdout. This means that the invalid port value found in httpd.conf when web-stop-tested is called by configure-apache (the value is the placeholder string PORT at this stage), is handled differently.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/gsicontrol.sh

    r23982 r23988  
    3939    echo "# **** This file is automatically generated, do not edit ****" > "$cgibin/gsdlsite.cfg" ;
    4040    echo "# For local customization of Greenstone, edit gsdlsite.cfg.in" >> "$cgibin/gsdlsite.cfg" ;
     41    echo "" >> "$cgibin/gsdlsite.cfg" ;
    4142    sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "$cgibin/gsdlsite.cfg.in" >> "$cgibin/gsdlsite.cfg" ;
    4243    else
     
    9495    if test ! -z $port ; then
    9596    echo "Port: $port" ;
    96     echo "Stopping web server (if running)" ;
    97     web-stop-tested ;
     97# if called by reset-gsdlhome, then httpd.conf file was regenerated by install-bindist.sh script and
     98# contains placeholder strings, including for Listen port. So can't stop web-server in such a case.
     99    if test -e "$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/conf/httpd.conf" ; then
     100        confport=`egrep "^Listen" $GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/conf/httpd.conf | awk '{print $2}'` ;
     101        if [ "$confport" != "**PORT**" ] ; then
     102        echo "Stopping web server (if running)" ;
     103        web-stop-tested ;
     104        fi
     105    fi
    98106    echo "Setting config file to use port $port";
    99107    cat "$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/conf/httpd.conf.in" \
     
    215223   
    216224    /bin/cp "$apache_home_os/build/config_vars.mk.in" "$apache_home_os/build/config_vars.mk"
    217    
     225
     226# replace template files with active versions. The following will generate a httpd.conf
     227# file with placeholder strings, all of which we'll replace shortly hereafter.
    218228    bash "$apache_home_os/install-bindist.sh" "$apache_home_os"
    219229   
Note: See TracChangeset for help on using the changeset viewer.