Show
Ignore:
Timestamp:
05.08.2010 09:39:38 (9 years ago)
Author:
sjm84
Message:

Renamed gs2-server.bat to gs2-web-server.bat and created a new script called gs2-server.bat that runs either the apache server (gs2-web-server.bat) or the local library server (server.exe) depending on whether or not server.exe exists

Files:
1 copied

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/gs2-web-server.bat

    r22388 r22572  
    2424   set gsdl2path=%CD% 
    2525) 
     26 
     27:checkUserPermissions 
     28    echo Checking if the Greenstone log directory is writable ... 
     29    (echo This is a temporary file. It is safe to delete it. > "%GSDLHOME%\etc\logs-gsi\testing.tmp" ) 2>nul 
     30    if exist "%GSDLHOME%\etc\logs-gsi\testing.tmp" goto deleteTempFile   
     31    if "%1" == "Elevated" goto printWarning 
     32    echo ... FAILED 
     33    echo The Greenstone server cannot write to the log directory (%GSDLHOME%\etc\logs-gsi) 
     34    echo Requesting elevated status to become admin user to continue. 
     35    "%GSDLHOME%\bin\windows\gstart.exe" %0 Elevated %1 %2 %3 %4 %5 %6 %7 %8 %9 
     36    goto done 
     37     
     38:printWarning 
     39    echo ... FAILED 
     40    echo The Greenstone server cannot write to the log directory (%GSDLHOME%\etc\logs-gsi).  
     41    echo Attempting to continue without permissions. 
     42    goto shiftElevated 
     43 
     44:deleteTempFile 
     45    echo ... OK 
     46    del "%GSDLHOME%\etc\logs-gsi\testing.tmp" 
     47 
     48:shiftElevated 
     49:: Shift "Elevated" (one of our own internal command words) out of the way if present 
     50:: so the command-line is as it was when the user initiated the command 
     51    if "%1" == "Elevated" shift 
     52 
    2653echo GS2 Home: %GSDLHOME% 
    2754