[19278] | 1 | @echo off
|
---|
| 2 |
|
---|
[19970] | 3 | setlocal
|
---|
[20262] | 4 | ::set testdone=0
|
---|
[23966] | 5 | set startdir=%CD%
|
---|
[23987] | 6 | cd /d "%~dp0"
|
---|
| 7 | ::we're now in the "%GSDLHOME%" folder
|
---|
| 8 | call setup.bat
|
---|
[23949] | 9 |
|
---|
[23966] | 10 | ::set _sed="%GSDLHOME%\bin\windows\sed.exe"
|
---|
| 11 | :: NOTE: no quotes allowed around the following, since it's used inside
|
---|
| 12 | :: a FOR statement executing a command already embedded in quotes
|
---|
| 13 | set _sed=bin\windows\sed.exe
|
---|
| 14 |
|
---|
[23949] | 15 | set cgibin=cgi-bin
|
---|
| 16 | ::set cgibin=cgi-bin\windows
|
---|
| 17 |
|
---|
[19278] | 18 | set target=%1
|
---|
| 19 | set configfile=%2
|
---|
[20906] | 20 | :: remove any quotes around configfile, if we were given parameter configfile
|
---|
| 21 | :: To test for the existence of a cmdline parameter: http://ss64.com/nt/if.html
|
---|
| 22 | if not [%2] == [] set configfile=%configfile:"=%
|
---|
[19278] | 23 |
|
---|
[20262] | 24 | :: Construct the signal using the unique GS2 installation
|
---|
[20906] | 25 | :: directory (after replacing spaces, colons and backslashes)
|
---|
| 26 | set signal=%GSDLHOME: =_%
|
---|
[23966] | 27 | for /F "delims=*" %%T in ('"echo %signal%| %_sed% s@[\\:]@_@g"') do set signal=%%T
|
---|
[20262] | 28 | set GS2_APACHE_HTTPD_SIGNAL=GS2_APACHE_HTTPD_%signal%
|
---|
[20906] | 29 | set signal=
|
---|
[20262] | 30 | rem echo Signal is: %GS2_APACHE_HTTPD_SIGNAL%
|
---|
| 31 |
|
---|
[19970] | 32 | :: Need to get greenstone installation directory
|
---|
| 33 | :: set cwd=%CD%
|
---|
[19278] | 34 |
|
---|
[19970] | 35 | set MONITOR_SUCCESS=MAKE SUCCESSFUL
|
---|
| 36 | set MONITOR_FAILED=MAKE FAILED
|
---|
| 37 | set MONITOR_FINISHED=MAKE DONE
|
---|
| 38 |
|
---|
[19278] | 39 | :: check that we have >=1 and <=2 arguments
|
---|
| 40 | :chkargs
|
---|
[20262] | 41 | if "%target%" == "" goto usage
|
---|
| 42 | if not "%3" == "" goto usage
|
---|
[19278] | 43 | goto begincmd
|
---|
| 44 |
|
---|
| 45 |
|
---|
| 46 | :usage
|
---|
| 47 | echo.
|
---|
| 48 | echo Usage: %0 command
|
---|
| 49 | echo where command is any of the following:
|
---|
[19970] | 50 | echo web-start
|
---|
| 51 | echo web-stop
|
---|
| 52 | echo web-restart
|
---|
[20262] | 53 | ::echo web-status
|
---|
| 54 | ::echo web-graceful
|
---|
[19278] | 55 | echo configure-admin
|
---|
| 56 | echo configure-web [config-filename]
|
---|
| 57 | echo configure-apache [config-filename]
|
---|
| 58 | echo configure-cgi
|
---|
[23945] | 59 | echo reset-gsdlhome [config-filename]
|
---|
[20637] | 60 | echo set-port
|
---|
[20262] | 61 | echo test-gsdlhome
|
---|
| 62 | echo web-stop-tested
|
---|
[19278] | 63 | echo.
|
---|
| 64 | goto exit
|
---|
| 65 |
|
---|
| 66 |
|
---|
| 67 | :begincmd
|
---|
| 68 | :: web-stop-tested command assumes GSDLHOME/greenstone environment is already set
|
---|
| 69 | if "%target%" == "web-stop-tested" goto stoptest
|
---|
| 70 |
|
---|
| 71 | :: For all other commands, the greenstone environment needs to be set first before they can be run
|
---|
| 72 | :testgsdl
|
---|
[20159] | 73 | if NOT "%GSDLHOME%" == "" if NOT "%GSDLOS%" == "" goto commands
|
---|
[20338] | 74 | echo.
|
---|
| 75 | echo Environment variable GSDLHOME (or GSDLOS) not set.
|
---|
| 76 | echo This needs to be set to run the gsicontrol command %target%.
|
---|
| 77 | echo Have you run setup.bat?
|
---|
| 78 | echo.
|
---|
| 79 | goto exit
|
---|
[19278] | 80 |
|
---|
| 81 |
|
---|
| 82 | ::MAIN MENU
|
---|
| 83 | :commands
|
---|
[20262] | 84 | echo.
|
---|
| 85 | echo Using:
|
---|
| 86 | echo GSDLHOME = %GSDLHOME%
|
---|
| 87 | echo GSDLOS = %GSDLOS%
|
---|
| 88 | echo.
|
---|
| 89 |
|
---|
[19278] | 90 | if "%target%" == "web-start" goto start
|
---|
| 91 | if "%target%" == "web-stop" goto stop
|
---|
| 92 | if "%target%" == "web-restart" goto restart
|
---|
| 93 | if "%target%" == "configure-admin" goto cfgadmin
|
---|
| 94 | if "%target%" == "configure-web" goto cfgweb
|
---|
| 95 | if "%target%" == "configure-apache" goto cfgapach
|
---|
| 96 | if "%target%" == "configure-cgi" goto cfgcgi
|
---|
[23945] | 97 | if "%target%" == "reset-gsdlhome" goto resethome
|
---|
[20262] | 98 | :: already tested gsdlhome (and web-stop-tested) above, don't want to keep looping on it
|
---|
| 99 | if "%target%" == "test-gsdlhome" goto exit
|
---|
| 100 | rem if "%target%" == "web-stop-tested" goto exit
|
---|
[20338] | 101 | rem if "%target%" == "web-status" goto status
|
---|
| 102 | rem if "%target%" == "web-graceful" goto graceful
|
---|
| 103 | if "%target%" == "set-port" goto setport
|
---|
| 104 | :: unknown command
|
---|
| 105 | echo Command unrecognised: %target%
|
---|
| 106 | goto usage
|
---|
[19278] | 107 |
|
---|
[20338] | 108 |
|
---|
[19278] | 109 | :start
|
---|
[20159] | 110 | :: START starts the app in a new console named by the string following immediately thereafter
|
---|
| 111 | :: then we start up apache-httpd and pass the signal that the stop command will respond to
|
---|
[20262] | 112 | START "%GSDLHOME%\apachectl" "%GSDLHOME%\bin\windows\starthttpd.exe" %GS2_APACHE_HTTPD_SIGNAL% "%GSDLHOME%\apache-httpd\windows\bin\httpd.exe"
|
---|
[20639] | 113 | :: if the return value is >= 0, it's succeeded:
|
---|
| 114 | if ERRORLEVEL 0 (echo %MONITOR_SUCCESS%) else (echo %MONITOR_FAILED%)
|
---|
[19970] | 115 | echo %MONITOR_FINISHED%
|
---|
| 116 | goto exit
|
---|
| 117 |
|
---|
[19278] | 118 | :stop
|
---|
[20262] | 119 | :stoptest
|
---|
[20435] | 120 | if exist "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf" "%GSDLHOME%\bin\windows\stophttpd.exe" %GS2_APACHE_HTTPD_SIGNAL% SILENT
|
---|
[20262] | 121 | if "%target%" == "web-stop-tested" goto exit
|
---|
[20639] | 122 | :: if the return value is >= 0, it's succeeded:
|
---|
| 123 | if ERRORLEVEL 0 (echo %MONITOR_SUCCESS%) else (echo %MONITOR_FAILED%)
|
---|
[20262] | 124 | echo %MONITOR_FINISHED%
|
---|
[19970] | 125 | goto exit
|
---|
| 126 |
|
---|
[20637] | 127 |
|
---|
[19278] | 128 | :restart
|
---|
[20637] | 129 | :: Need to stop server, wait and start it again.
|
---|
| 130 | :: We're using Ping to implement batch file Wait
|
---|
[20262] | 131 | if exist "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf" "%GSDLHOME%\bin\windows\stophttpd.exe" %GS2_APACHE_HTTPD_SIGNAL%
|
---|
[20637] | 132 |
|
---|
| 133 | :: Wait 5 seconds and then start. See http://ss64.com/nt/sleep.html (and http://malektips.com/dos0017.html)
|
---|
| 134 | :: if loopback IP address (127.0.0.1) does not exist, we ask them to manually start it up again
|
---|
| 135 | ping -n 1 -w 1000 127.0.0.1 |find "TTL=">nul || goto failmsg
|
---|
| 136 | echo Waiting for re-start....
|
---|
| 137 | ping -n 5 -w 1000 127.0.0.1> nul
|
---|
[19970] | 138 | goto start
|
---|
| 139 |
|
---|
[20637] | 140 | :failmsg
|
---|
| 141 | echo Unable to wait for restart. Manually run %0 web-start
|
---|
| 142 | goto exit
|
---|
| 143 |
|
---|
| 144 |
|
---|
[20338] | 145 | ::status
|
---|
| 146 | ::graceful
|
---|
| 147 | ::echo Command %target% is not operational on this operating system
|
---|
| 148 | ::goto exit
|
---|
[19278] | 149 |
|
---|
| 150 |
|
---|
| 151 | ::configure-admin
|
---|
| 152 | :cfgadmin
|
---|
| 153 | echo.
|
---|
[19288] | 154 | echo Configuring admin user password:
|
---|
| 155 | for /F %%T in ('getpw') do set encrypted_password=%%T
|
---|
[19290] | 156 |
|
---|
| 157 | :: Have to create an intermediate file in the following, because echoing
|
---|
| 158 | :: lines straight into a pipe adds spaces before the end of each line.
|
---|
[19970] | 159 | :: When piping, need to double-escape the angle brackets with three hat signs,
|
---|
[19290] | 160 | :: but when redirecting to a file, need to escape only once (one hat sign).
|
---|
[19288] | 161 | if ERRORLEVEL 0 (
|
---|
| 162 | (
|
---|
| 163 | echo [admin]
|
---|
[19290] | 164 | echo ^<enabled^>true
|
---|
| 165 | echo ^<groups^>administrator,colbuilder,all-collections-editor
|
---|
| 166 | echo ^<password^>%encrypted_password%
|
---|
| 167 | echo ^<username^>admin
|
---|
| 168 | ) > "%GSDLHOME%\etc\users.txt"
|
---|
| 169 | type "%GSDLHOME%\etc\users.txt" | txt2db -append "%GSDLHOME%\etc\users.gdb"
|
---|
| 170 | del "%GSDLHOME%\etc\users.txt"
|
---|
[19288] | 171 | ) else (
|
---|
| 172 | echo Did not set password
|
---|
| 173 | )
|
---|
[20262] | 174 | echo.
|
---|
[19288] | 175 | goto exit
|
---|
[19278] | 176 |
|
---|
[20338] | 177 |
|
---|
[23974] | 178 | :: reset-gsdlhome forces configure-cgi by renaming any
|
---|
| 179 | :: existing gsdlsite.cfg and by deleting Mac .app files
|
---|
[24297] | 180 | :: However, we only relocate if there is a gsdlsite.cfg file with its gsdlhome
|
---|
| 181 | :: property the same as the current (greenstone installation) directory
|
---|
[23945] | 182 | :resethome
|
---|
| 183 | echo.
|
---|
[24297] | 184 | if not exist "%GSDLHOME%\%cgibin%\gsdlsite.cfg" goto relocate
|
---|
[23963] | 185 |
|
---|
[24765] | 186 | set gshome=
|
---|
| 187 | FOR /F "tokens=*" %%G IN ('findstr /R ^gsdlhome "%GSDLHOME%\%cgibin%\gsdlsite.cfg"') do (call :concat %%G)
|
---|
| 188 |
|
---|
| 189 | :: The following doesn't work if there are spaces in the gsdlhome filepath
|
---|
| 190 | ::FOR /F "tokens=2" %%G IN ('findstr /R ^gsdlhome "%GSDLHOME%\%cgibin%\gsdlsite.cfg"') do set gshome=%%G
|
---|
[24300] | 191 | :: before string comparison, remove any quotes around gsdlhome value defined in config file
|
---|
[24765] | 192 | :: if not [%gshome%] == [] set gshome=%gshome:"=%
|
---|
| 193 |
|
---|
[24300] | 194 | if "%gshome%" == "%GSDLHOME%" set gshome=& goto exit
|
---|
[24297] | 195 |
|
---|
| 196 | move "%GSDLHOME%\%cgibin%\gsdlsite.cfg" "%GSDLHOME%\%cgibin%\gsdlsite.cfg.bak"
|
---|
| 197 | echo **** Regenerating %GSDLHOME%\%cgibin%\gsdlsite.cfg
|
---|
| 198 | echo **** Previous version of file now %GSDLHOME%\%cgibin%\gsdlsite.cfg.bak
|
---|
[24786] | 199 |
|
---|
| 200 | :relocate
|
---|
| 201 | :: The path to the included perl at the top of gliserver.pl needs to use the new gsdlhome
|
---|
| 202 | :: On windows, the path in gliserver.pl uses backslashes
|
---|
| 203 | for /F "delims=*" %%T in ('"echo %gshome%| %_sed% s@\\@\\\\@g"') do set safeoldhome=%%T
|
---|
| 204 | for /F "delims=*" %%T in ('"echo %gsdlhome%| %_sed% s@\\@\\\\@g"') do set safenewhome=%%T
|
---|
| 205 | type "%cgibin%\gliserver.pl.bak" | %_sed% "s@%safeoldhome%@%safenewhome%@g" > "%cgibin%\gliserver.pl"
|
---|
| 206 | del "%cgibin%\gliserver.pl.bak"
|
---|
| 207 | set safenewhome=
|
---|
| 208 | set safeoldhome=
|
---|
[24297] | 209 | set gshome=
|
---|
| 210 |
|
---|
[23966] | 211 | for /F "delims=*" %%T in ('"echo %GSDLHOME%| %_sed% s@\\@\/@g"') do set safepath=%%T
|
---|
[23963] | 212 |
|
---|
[23974] | 213 | :: Also re-initialise the log4j.properties and force regeneration of
|
---|
| 214 | :: Mac .app files since cfgweb will generate these if they don't exist
|
---|
[23966] | 215 | type "lib\java\log4j.properties.in" | %_sed% "s\@gsdl2home@\%safepath%\g" > "lib\java\log4j.properties"
|
---|
[24006] | 216 | :: No use for Mac .app files on Windows, so they're not there in Windows binaries including caveat
|
---|
| 217 | ::for %%G in (gs2-server.app gli.app client-gli.app gems.app) do if exist "%%G\Contents\document.wflow" del "%%G\Contents\document.wflow"
|
---|
[23945] | 218 | goto cfgweb
|
---|
| 219 |
|
---|
[24765] | 220 | :: Subroutine used to glue parts of a filepath that contains spaces back together again
|
---|
| 221 | :: http://www.computing.net/answers/programming/batch-for-loop-tokens/16727.html
|
---|
| 222 | :concat
|
---|
| 223 | :: first remove any quotes around this part of the filepath
|
---|
| 224 | set suffix=%~1
|
---|
| 225 | if not "%suffix%" == "gsdlhome" set gshome=%gshome%%suffix%
|
---|
| 226 | shift
|
---|
| 227 | if not "%~1"=="" goto concat
|
---|
| 228 | goto :eof
|
---|
[23963] | 229 |
|
---|
[24765] | 230 |
|
---|
[20338] | 231 | ::configure-web
|
---|
| 232 | ::configure-cgi
|
---|
| 233 | :cfgweb
|
---|
[23974] | 234 | :: first set up Mac's .app files if that's not already been done (if this is the first time we're running GS3)
|
---|
[24006] | 235 | :: No use for Mac .app files on Windows, so they're not there in Windows binaries including caveat
|
---|
| 236 | :: for %%G in (gs2-server.app gli.app client-gli.app gems.app) do if not exist "%%G\Contents\document.wflow" type "%%G\Contents\document.wflow.in" | %_sed% "s@\*\*GSDLHOME\*\*@%safepath%@g" > "%%G\Contents\document.wflow"
|
---|
[23974] | 237 |
|
---|
[20338] | 238 | :cfgcgi
|
---|
[24295] | 239 | :: Need to preserve the user-assigned collecthome property, if any
|
---|
[23949] | 240 | if exist "%GSDLHOME%\%cgibin%\gsdlsite.cfg" goto cgimsg
|
---|
| 241 | echo Configuring %cgibin%\gsdlsite.cfg
|
---|
[23987] | 242 | echo # **** This file is automatically generated, do not edit **** > "%cgibin%\gsdlsite.cfg"
|
---|
| 243 | echo # For local customization of Greenstone, edit gsdlsite.cfg.in >> "%cgibin%\gsdlsite.cfg"
|
---|
| 244 | echo. >> "%cgibin%\gsdlsite.cfg"
|
---|
[24295] | 245 |
|
---|
[23966] | 246 | for /F "delims=*" %%T in ('"echo %GSDLHOME%| %_sed% s@\\@\\\\@g"') do set safepath=%%T
|
---|
[23987] | 247 | %_sed% "s@\*\*GSDLHOME\*\*@\"%safepath%\"@g" "%cgibin%\gsdlsite.cfg.in" >> "%cgibin%\gsdlsite.cfg"
|
---|
[20338] | 248 | set safepath=
|
---|
[24295] | 249 |
|
---|
[20338] | 250 | goto cgifin
|
---|
| 251 |
|
---|
| 252 | :cgimsg
|
---|
| 253 | echo WARNING: Nothing done for configure-cgi.
|
---|
| 254 | echo If you wish to regenerate the file
|
---|
[23949] | 255 | echo %GSDLHOME%\%cgibin%\gsdlsite.cfg
|
---|
[20338] | 256 | echo from scratch, delete the existing file first.
|
---|
| 257 | echo.
|
---|
| 258 |
|
---|
| 259 | :cgifin
|
---|
| 260 | if "%target%" == "configure-cgi" goto exit
|
---|
| 261 | if "%target%" == "configure-web" goto cfgapach
|
---|
| 262 |
|
---|
| 263 | ::configure-apache
|
---|
| 264 | :cfgapach
|
---|
| 265 | if not "%configfile%" == "" if exist "%configfile%" (goto cfgport) else (echo Config file %configfile% does not exist. Using default llssite.cfg)
|
---|
| 266 |
|
---|
| 267 | if exist "%GSDLHOME%\llssite.cfg" (
|
---|
[20906] | 268 | set configfile=%GSDLHOME%\llssite.cfg
|
---|
[20338] | 269 | goto cfgport
|
---|
| 270 | )
|
---|
| 271 | if not exist "%GSDLHOME%\llssite.cfg.in" (
|
---|
| 272 | echo Unable to proceed as neither %GSDLHOME%\llssite.cfg nor %GSDLHOME%\llssite.cfg.in could be found
|
---|
| 273 | goto exit
|
---|
| 274 | )
|
---|
| 275 | copy "%GSDLHOME%\llssite.cfg.in" "%GSDLHOME%\llssite.cfg"
|
---|
[20906] | 276 | set configfile=%GSDLHOME%\llssite.cfg
|
---|
[20338] | 277 |
|
---|
| 278 | :cfgport
|
---|
| 279 | echo Configuring the apache webserver...
|
---|
| 280 | :: See http://ss64.com/nt/for_cmd.html, http://ss64.com/nt/findstr.html (and http://ss64.com/nt/find.html)
|
---|
[20906] | 281 | FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^portnumber "%configfile%"') do set port=%%G
|
---|
| 282 | FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^hostIP "%configfile%"') do set hostIP=%%G
|
---|
[23252] | 283 | FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^hosts "%configfile%"') do set hosts=%%G
|
---|
[20906] | 284 | FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^externalaccess "%configfile%"') do set allowfromall=%%G
|
---|
[20338] | 285 |
|
---|
[20637] | 286 | if "%allowfromall%" == "1" set allowfromall="Allow"& goto portcon
|
---|
| 287 | set allowfromall="Deny"
|
---|
[20615] | 288 |
|
---|
[20338] | 289 | :: Using CALL to jump to labels means we can return from them. BUT need to ensure
|
---|
| 290 | :: that command extensions are enabled to call labels. So just use GOTO instead.
|
---|
| 291 | ::http://ss64.com/nt/call.html
|
---|
| 292 | goto portcon
|
---|
| 293 |
|
---|
[20637] | 294 |
|
---|
[19970] | 295 | ::configure-port-and-connection
|
---|
[20338] | 296 | :setport
|
---|
[19970] | 297 | set /p port=Enter port number to use:
|
---|
[20637] | 298 | set /p hostIP=Enter host IP to allow (127.0.0.1 is included by default):
|
---|
[23252] | 299 | set /p hosts=Enter hostname or list of hosts to allow (localhost included by default):
|
---|
[20637] | 300 | set /p allowfromall=Allow external connections [yes/no]:
|
---|
[20338] | 301 |
|
---|
[20637] | 302 | if "%allowfromall%" == "yes" set allowfromall="Allow"& goto portcon
|
---|
| 303 | if "%allowfromall%" == "y" set allowfromall="Allow"& goto portcon
|
---|
| 304 | set allowfromall="Deny"
|
---|
[20615] | 305 | goto portcon
|
---|
| 306 |
|
---|
[20338] | 307 | :portcon
|
---|
| 308 | if "%port%" == "" (
|
---|
[20505] | 309 | echo Done
|
---|
| 310 | goto exit
|
---|
[20338] | 311 | )
|
---|
[23966] | 312 | if "%safepath%" == "" for /F "delims=*" %%T in ('"echo %GSDLHOME%| %_sed% s@\\@\/@g"') do set safepath=%%T
|
---|
[19970] | 313 |
|
---|
[24765] | 314 | :: Doesn't work if there are spaces in the collecthome path in gsdlsite.cfg
|
---|
| 315 | ::if exist "%GSDLHOME%\%cgibin%\gsdlsite.cfg" FOR /F "tokens=2" %%G IN ('findstr /R ^collecthome "%GSDLHOME%\%cgibin%\gsdlsite.cfg"') do set COLLECTHOME=%%G
|
---|
| 316 |
|
---|
| 317 | :: variable in subroutine concat is called gshome,
|
---|
| 318 | :: so forced to use it here for collecthome
|
---|
| 319 | set gshome=
|
---|
[24788] | 320 | if exist "%GSDLHOME%\%cgibin%\gsdlsite.cfg" FOR /F "tokens=*" %%G IN ('findstr /R ^collecthome "%GSDLHOME%\%cgibin%\gsdlsite.cfg"') do (call :concat %%G)
|
---|
[24765] | 321 | set COLLECTHOME=%gshome%
|
---|
| 322 | set gshome=
|
---|
| 323 |
|
---|
[22613] | 324 | if "%COLLECTHOME%" == "" set COLLECTHOME=%GSDLHOME%\collect
|
---|
[23966] | 325 | for /F "delims=*" %%T in ('"echo %COLLECTHOME%| %_sed% s@\\@\/@g"') do set safecollectpath=%%T
|
---|
[22613] | 326 |
|
---|
| 327 |
|
---|
[20338] | 328 | echo Port: %port%
|
---|
| 329 | echo Stopping web server (if running)
|
---|
| 330 | if not exist "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf" echo Missing conf file
|
---|
| 331 | if exist "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf" "%GSDLHOME%\bin\windows\stophttpd.exe" %GS2_APACHE_HTTPD_SIGNAL% SILENT
|
---|
| 332 | echo Setting config file to use port %port%
|
---|
[23252] | 333 | type "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf.in" | %_sed% "s@\*\*PORT\*\*@%port%@g" | %_sed% "s@\*\*CONNECTPERMISSION\*\*@%allowfromall%@g" | %_sed% "s@\*\*HOST_IP\*\*@%hostIP%@g" | %_sed% "s@\*\*HOSTS\*\*@%hosts%@g" | %_sed% "s@\*\*COLLECTHOME\*\*@%safecollectpath%@g" | %_sed% "s@\*\*GSDLHOME\*\*@%safepath%@g" | %_sed% "s@\*\*APACHE_HOME_OS\*\*@%safepath%\/apache-httpd\/%GSDLOS%@g" > "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf"
|
---|
[20338] | 334 | echo Type '%0 web-start' to start the web server running on port %port%
|
---|
| 335 | echo Done
|
---|
[19970] | 336 |
|
---|
[20637] | 337 | set allowfromall=
|
---|
[20338] | 338 | set _sed=
|
---|
| 339 | set safepath=
|
---|
[20637] | 340 | set port=
|
---|
[20338] | 341 |
|
---|
| 342 | :: Extra processing for configure-web and configure-cgi command targets
|
---|
[20637] | 343 | if not "%target%" == "configure-web" if not "%target%" == "configure-cgi" goto exit
|
---|
[20338] | 344 | if exist "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf" (echo %MONITOR_SUCCESS%) else (echo %MONITOR_FAILED%)
|
---|
| 345 | echo %MONITOR_FINISHED%
|
---|
| 346 | goto exit
|
---|
| 347 |
|
---|
[19278] | 348 | :exit
|
---|
[23966] | 349 | cd "%startdir%"
|
---|
| 350 | set startdir=
|
---|
[19970] | 351 | endlocal
|
---|