Ignore:
Timestamp:
2009-09-17T19:26:01+12:00 (15 years ago)
Author:
ak19
Message:

No more properties hosts in llssite.cfg and glisite.cfg config files. Now the host IP is always written into these and then written into httpd.conf by gsicontrol.sh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/gsicontrol.sh

    r20619 r20622  
    5151function configure-port-and-connection {
    5252    test-gsdlhome
    53     configfile=$1 ;
    54 # if no configfile given, launch it with llssite.cfg. Create it from the template if needed.
    55     if [ "x$configfile" = "x" ]; then
    56     if test ! -e "$GSDLHOME/llssite.cfg" && test -e "$GSDLHOME/llssite.cfg.in" ; then
    57         cp "$GSDLHOME/llssite.cfg.in" "$GSDLHOME/llssite.cfg" ;
    58     fi
    59     configfile="$GSDLHOME/llssite.cfg";
    60     fi ;
    61 
    62     if test -e "$configfile" ; then
    63     hostIP=`egrep "^hostIP" $configfile | awk -F= '{print $2}'` ;
    64     if [ "$hostIP" != "127.0.0.1" ] ; then
    65         hostIP="127.0.0.1 $hostIP"
    66     fi
    67     else
    68     hostIP="127.0.0.1"
    69     fi
    7053
    7154    echo "Enter port number to use:"
    7255    read port ;
    73     echo "Enter allowed hosts to use ($hostIP localhost <hostname>) separated by spaces:"
    74     read hosts ;
     56    echo "Enter host IP to allow (127.0.0.1 is included by default):"
     57    read hostIP ;
    7558    echo "Allow external connections [yes/no]:"
    7659    read connection ;   
     
    8972    | sed "s@\*\*PORT\*\*@$port@g" \
    9073    | sed "s@\*\*CONNECTPERMISSION\*\*@$allowfromall@g" \
    91     | sed "s@\*\*HOSTS\*\*@$hosts@g" \
     74    | sed "s@\*\*HOST_IP\*\*@$hostIP@g" \
    9275    | sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" \
    9376    | sed "s@\*\*APACHE_HOME_OS\*\*@$GSDLHOME/apache-httpd/$GSDLOS@g" \
     
    11598    echo "Configuring the apache webserver..." ;
    11699    port=`egrep "^portnumber" $configfile | awk -F= '{print $2}'` ;
    117     hosts=`egrep "^hosts" $configfile | awk -F= '{print $2}'` ;
     100    hostIP=`egrep "^hostIP" $configfile | awk -F= '{print $2}'` ;
    118101   
    119102    externalaccess=`egrep "^externalaccess" $configfile | awk -F= '{print $2}'` ;
     
    124107    fi
    125108
    126     echo -e "$port\n$hosts\n$externalaccess" | configure-port-and-connection ;
     109    echo -e "$port\n$hostIP\n$externalaccess" | configure-port-and-connection ;
    127110    if test -e "$GSDLHOME/apache-httpd/$GSDLOS/conf/httpd.conf" ; then
    128111    echo $MONITOR_SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.