Changeset 20622 for gsdl/trunk/gsicontrol.sh
- Timestamp:
- 2009-09-17T19:26:01+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/gsicontrol.sh
r20619 r20622 51 51 function configure-port-and-connection { 52 52 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" ]; then56 if test ! -e "$GSDLHOME/llssite.cfg" && test -e "$GSDLHOME/llssite.cfg.in" ; then57 cp "$GSDLHOME/llssite.cfg.in" "$GSDLHOME/llssite.cfg" ;58 fi59 configfile="$GSDLHOME/llssite.cfg";60 fi ;61 62 if test -e "$configfile" ; then63 hostIP=`egrep "^hostIP" $configfile | awk -F= '{print $2}'` ;64 if [ "$hostIP" != "127.0.0.1" ] ; then65 hostIP="127.0.0.1 $hostIP"66 fi67 else68 hostIP="127.0.0.1"69 fi70 53 71 54 echo "Enter port number to use:" 72 55 read port ; 73 echo "Enter allowed hosts to use ($hostIP localhost <hostname>) separated by spaces:"74 read host s;56 echo "Enter host IP to allow (127.0.0.1 is included by default):" 57 read hostIP ; 75 58 echo "Allow external connections [yes/no]:" 76 59 read connection ; … … 89 72 | sed "s@\*\*PORT\*\*@$port@g" \ 90 73 | sed "s@\*\*CONNECTPERMISSION\*\*@$allowfromall@g" \ 91 | sed "s@\*\*HOST S\*\*@$hosts@g" \74 | sed "s@\*\*HOST_IP\*\*@$hostIP@g" \ 92 75 | sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" \ 93 76 | sed "s@\*\*APACHE_HOME_OS\*\*@$GSDLHOME/apache-httpd/$GSDLOS@g" \ … … 115 98 echo "Configuring the apache webserver..." ; 116 99 port=`egrep "^portnumber" $configfile | awk -F= '{print $2}'` ; 117 host s=`egrep "^hosts" $configfile | awk -F= '{print $2}'` ;100 hostIP=`egrep "^hostIP" $configfile | awk -F= '{print $2}'` ; 118 101 119 102 externalaccess=`egrep "^externalaccess" $configfile | awk -F= '{print $2}'` ; … … 124 107 fi 125 108 126 echo -e "$port\n$host s\n$externalaccess" | configure-port-and-connection ;109 echo -e "$port\n$hostIP\n$externalaccess" | configure-port-and-connection ; 127 110 if test -e "$GSDLHOME/apache-httpd/$GSDLOS/conf/httpd.conf" ; then 128 111 echo $MONITOR_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.