- Timestamp:
- 2009-11-04T18:28:06+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/gsicontrol.bat
r20639 r20906 5 5 set target=%1 6 6 set 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 9 if not [%2] == [] set configfile=%configfile:"=% 7 10 8 11 :: 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) 13 set signal=%GSDLHOME: =_% 14 for /F "delims=*" %%T in ('"echo %signal%| bin\windows\sed.exe s@[\\:]@_@g"') do set signal=%%T 11 15 set GS2_APACHE_HTTPD_SIGNAL=GS2_APACHE_HTTPD_%signal% 16 set signal= 12 17 rem echo Signal is: %GS2_APACHE_HTTPD_SIGNAL% 13 18 … … 183 188 184 189 if exist "%GSDLHOME%\llssite.cfg" ( 185 set configfile= "%GSDLHOME%\llssite.cfg"190 set configfile=%GSDLHOME%\llssite.cfg 186 191 goto cfgport 187 192 ) … … 191 196 ) 192 197 copy "%GSDLHOME%\llssite.cfg.in" "%GSDLHOME%\llssite.cfg" 193 set configfile= "%GSDLHOME%\llssite.cfg"198 set configfile=%GSDLHOME%\llssite.cfg 194 199 195 200 :cfgport 196 201 echo Configuring the apache webserver... 197 202 :: 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=%%G199 FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^hostIP %configfile%') do set hostIP=%%G200 FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^externalaccess %configfile%') do set allowfromall=%%G203 FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^portnumber "%configfile%"') do set port=%%G 204 FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^hostIP "%configfile%"') do set hostIP=%%G 205 FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^externalaccess "%configfile%"') do set allowfromall=%%G 201 206 202 207 if "%allowfromall%" == "1" set allowfromall="Allow"& goto portcon
Note:
See TracChangeset
for help on using the changeset viewer.