diff options
Diffstat (limited to 'startYACY.bat')
| -rw-r--r-- | startYACY.bat | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/startYACY.bat b/startYACY.bat index 5b4dce28c..93602ea7b 100644 --- a/startYACY.bat +++ b/startYACY.bat @@ -2,8 +2,10 @@ title YaCy REM setting startup type for proper restart -if not exist DATA md DATA -echo . >DATA\yacy.noconsole +if "%YACY_DATA%"=="" set "YACY_DATA=%LOCALAPPDATA%\YaCy" +set "YACY_DATA_DIR=%YACY_DATA%\DATA" +if not exist "%YACY_DATA_DIR%" md "%YACY_DATA_DIR%" +echo . >"%YACY_DATA_DIR%\yacy.noconsole" Rem Setting the classpath Set CLASSPATH=lib\yacycore.jar @@ -14,8 +16,8 @@ set jms= set javacmd=-Xmx600m set priolvl=10 set priority=/BELOWNORMAL -if exist DATA\SETTINGS\httpProxy.conf GoTo :RENAMEINDEX -if exist DATA\SETTINGS\yacy.conf GoTo :GETSTARTOPTS +if exist "%YACY_DATA_DIR%\SETTINGS\httpProxy.conf" GoTo :RENAMEINDEX +if exist "%YACY_DATA_DIR%\SETTINGS\yacy.conf" GoTo :GETSTARTOPTS :STARTJAVA set javacmd=%javacmd% -Djava.awt.headless=true -Dsolr.directoryFactory=solr.MMapDirectoryFactory -Dfile.encoding=UTF-8 @@ -35,7 +37,7 @@ Rem commandline parameter added for -config option, like -config "port=8090" "ad Rem special parameter "adminAccount=admin:password" calculates and sets new admin-pwd Rem any parameter in yacy.conf can me modified this way (make sure to use correct upper/lower case) -start %priority% java %javacmd% -classpath %CLASSPATH% net.yacy.yacy %1 %2 %3 %4 %5 %6 %7 %8 %9 +start %priority% java %javacmd% -Dyacy.data="%YACY_DATA%" -classpath %CLASSPATH% net.yacy.yacy %1 %2 %3 %4 %5 %6 %7 %8 %9 Echo You can close the console safely now. @@ -43,18 +45,17 @@ GoTo :END Rem PUBLIC is now freeworld (r4575) :RENAMEINDEX -for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\httpProxy.conf) do ( +for /F "usebackq tokens=1,2 delims==" %%i in ("%YACY_DATA_DIR%\SETTINGS\httpProxy.conf") do ( if "%%i"=="network.unit.name" set networkname=%%j ) if not defined networkname set networkname=PUBLIC -cd DATA\INDEX +pushd "%YACY_DATA_DIR%\INDEX" ren PUBLIC %networkname% -cd .. -cd .. +popd Rem This target is used to read java runtime parameters out of the yacy config file :GETSTARTOPTS -for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\yacy.conf) do ( +for /F "usebackq tokens=1,2 delims==" %%i in ("%YACY_DATA_DIR%\SETTINGS\yacy.conf") do ( if "%%i"=="javastart_Xmx" set jmx=%%j if "%%i"=="javastart_priority" set priolvl=%%j ) |
