Changeset 23988 for main


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.

Location:
main/trunk/greenstone2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/gs2-server.sh

    r23983 r23988  
    153153    fi
    154154
    155     # whenever the server is started up, make sure gsdlhome is correct (in case the install was moved).
    156     # Need to redirect both stderr and stdout (with &>) into the void, since reset-gsdlhome makes
    157     # web-stop-tested output an "error" as there's no httpd.conf.in at the stage when web-stop is called.
     155    # whenever the server is started up, make sure gsdlhome is correct (in case the gs install was moved).
     156    # If both stderr and stdout need to be redirected into the void (with &>/dev/null), see
    158157    # http://linuxwave.blogspot.com/2008/03/redirecting-stdout-and-stderr.html
    159     ./gsicontrol.sh reset-gsdlhome &>/dev/null
     158    ./gsicontrol.sh reset-gsdlhome >/dev/null
    160159
    161160    if [ "x$silent" == "x" -o "x$silent" != "xtrue" ]; then
  • 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.