Changeset 20906


Ignore:
Timestamp:
11/04/09 18:28:06 (12 years ago)
Author:
kjdon
Message:

First commit of fixes to make gsicontrol work with spaces in the GSDLHOME filepath (and in that of configfile). However, it still doesn't work when gsdlsite.cfg is missing and there are spaces in GSDLHOME. That still needs to be fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/gsicontrol.bat

    r20639 r20906  
    55set target=%1
    66set configfile=%2
     7:: remove any quotes around configfile, if we were given parameter configfile
     8:: To test for the existence of a cmdline parameter: http://ss64.com/nt/if.html
     9if not [%2] == [] set configfile=%configfile:"=%
    710
    811:: Construct the signal using the unique GS2 installation
    9 :: directory (after replacing colons and backslashes)
    10 for /F "delims=*" %%T in ('"echo %GSDLHOME%| bin\windows\sed.exe s@[\\:]@_@g"') do set signal=%%T
     12:: directory (after replacing spaces, colons and backslashes)
     13set signal=%GSDLHOME: =_%
     14for /F "delims=*" %%T in ('"echo %signal%| bin\windows\sed.exe s@[\\:]@_@g"') do set signal=%%T
    1115set GS2_APACHE_HTTPD_SIGNAL=GS2_APACHE_HTTPD_%signal%
     16set signal=
    1217rem echo Signal is: %GS2_APACHE_HTTPD_SIGNAL%
    1318
     
    183188
    184189if exist "%GSDLHOME%\llssite.cfg" (
    185   set configfile="%GSDLHOME%\llssite.cfg"
     190  set configfile=%GSDLHOME%\llssite.cfg
    186191  goto cfgport
    187192)
     
    191196)
    192197copy "%GSDLHOME%\llssite.cfg.in" "%GSDLHOME%\llssite.cfg"
    193 set configfile="%GSDLHOME%\llssite.cfg"
     198set configfile=%GSDLHOME%\llssite.cfg
    194199
    195200:cfgport
    196201echo Configuring the apache webserver...
    197202:: See http://ss64.com/nt/for_cmd.html, http://ss64.com/nt/findstr.html (and http://ss64.com/nt/find.html)
    198 FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^portnumber %configfile%') do set port=%%G
    199 FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^hostIP %configfile%') do set hostIP=%%G
    200 FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^externalaccess %configfile%') do set allowfromall=%%G
     203FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^portnumber "%configfile%"') do set port=%%G
     204FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^hostIP "%configfile%"') do set hostIP=%%G
     205FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^externalaccess "%configfile%"') do set allowfromall=%%G
    201206
    202207if "%allowfromall%" == "1" set allowfromall="Allow"& goto portcon
Note: See TracChangeset for help on using the changeset viewer.