Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
* ported restart on Windows to unix-style, works on _noconsole now * removed Win9x scripts from build for more tidiness and less decisions for newbies
lotuseac62a68823d
diff --git a/build.xml b/build.xmlindex 575b458ab..434eece1a 100644--- a/build.xml+++ b/build.xml@@ -393,10 +393,12 @@<fileset dir="."><include name="startYACY.bat"/><include name="startYACY_noconsole.bat"/>- <include name="stopYACY.bat"/>+ <include name="stopYACY.bat"/>+ <!--<include name="startYACY_Win9x.bat"/><include name="startYACY_noconsole_Win9x.bat"/>- <include name="stopYACY_Win9x.bat"/>+ <include name="stopYACY_Win9x.bat"/>+ --></fileset></copy><copy todir="${release_main}" file="yacy.exe" failonerror="false"/>diff --git a/htroot/ConfigBasic.html b/htroot/ConfigBasic.htmlindex d6756bea2..c9410aa82 100644--- a/htroot/ConfigBasic.html+++ b/htroot/ConfigBasic.html@@ -39,7 +39,7 @@<dl><dt>Community-based web search</dt><dd>- <input type="radio" name="usecase" value="freeworld" id="usecaseFreeworld" #(freeworldChecked)#::checked="checked"#(/freeworldChecked)# /> <label for="usecaseFreeworld">join and support the global network 'freeworld', search the web with a uncensored user-owned search network</label>+ <input type="radio" name="usecase" value="freeworld" id="usecaseFreeworld" #(freeworldChecked)#::checked="checked"#(/freeworldChecked)# /> <label for="usecaseFreeworld">join and support the global network 'freeworld', search the web with an uncensored user-owned search network</label></dd><dt>Search portal for your own web pages</dt><dd>diff --git a/source/de/anomic/server/serverSystem.java b/source/de/anomic/server/serverSystem.javaindex 60024b1e2..2447761f7 100644--- a/source/de/anomic/server/serverSystem.java+++ b/source/de/anomic/server/serverSystem.java@@ -348,7 +348,7 @@ public final class serverSystem {String script = null;if(isWindows){starterFileExtension = ".starter.bat";- // TODO: use /K to debug+ // TODO: use /K to debug, /C for releasescript = "start /MIN CMD /C " + scriptFile.getAbsolutePath().replaceAll(" ", "\\ ");} else { // unix/linuxstarterFileExtension = ".starter.sh";diff --git a/source/de/anomic/yacy/yacyVersion.java b/source/de/anomic/yacy/yacyVersion.javaindex 109a48577..fbbdd09e5 100644--- a/source/de/anomic/yacy/yacyVersion.java+++ b/source/de/anomic/yacy/yacyVersion.java@@ -370,10 +370,38 @@ public final class yacyVersion implements Comparator<yacyVersion>, Comparable<yapublic static void restart() {plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();+ String apphome = sb.getRootPath().toString();if (serverSystem.isWindows) {+ File startType = new File(sb.getRootPath(), "DATA/yacy.noconsole");+ String starterFile = "startYACY.bat";+ if (startType.exists()) starterFile = "startYACY_noconsole.bat"; // startType noconsole++ try{+ serverLog.logInfo("RESTART", "INITIATED");+ String script =+ "@echo off" + serverCore.LF_STRING ++ "title YaCy restarter" + serverCore.LF_STRING ++ "echo YACY RESTARTER" + serverCore.LF_STRING ++ "echo working..." + serverCore.LF_STRING ++ "cd " + apphome + "/DATA/RELEASE/".replace("/", File.separator) + serverCore.LF_STRING ++ ":WAIT" + serverCore.LF_STRING ++ "ping -n 2 127.0.0.1 >nul" + serverCore.LF_STRING ++ "IF exist ..\\yacy.running goto WAIT" + serverCore.LF_STRING ++ "cd " + apphome + serverCore.LF_STRING ++ "start /MIN CMD /C " + starterFile + serverCore.LF_STRING;+ File scriptFile = new File(sb.getRootPath(), "DATA/RELEASE/restart.bat".replace("/", File.separator));+ serverSystem.deployScript(scriptFile, script);+ serverLog.logInfo("RESTART", "wrote restart-script to " + scriptFile.getAbsolutePath());+ serverSystem.execAsynchronous(scriptFile);+ serverLog.logInfo("RESTART", "script is running");+ sb.terminate(5000);+ } catch (IOException e) {+ serverLog.logSevere("RESTART", "restart failed", e);+ }+// create yacy.restart file which is used in Windows startscript- final File yacyRestart = new File(sb.getRootPath(), "DATA/yacy.restart");+/* final File yacyRestart = new File(sb.getRootPath(), "DATA/yacy.restart");if (!yacyRestart.exists()) {try {yacyRestart.createNewFile();@@ -381,7 +409,7 @@ public final class yacyVersion implements Comparator<yacyVersion>, Comparable<ya} catch (IOException e) {serverLog.logSevere("SHUTDOWN", "restart failed", e);}- }+ }*/}@@ -434,9 +462,9 @@ public final class yacyVersion implements Comparator<yacyVersion>, Comparable<ya":WAIT" + serverCore.LF_STRING +"ping -n 2 127.0.0.1 >nul" + serverCore.LF_STRING +"IF exist ..\\yacy.running goto WAIT" + serverCore.LF_STRING +-+ // Error: "Die Batchdatei kann nicht gefunden werden.""IF not exist yacy goto NODATA" + serverCore.LF_STRING +-+"cd yacy" + serverCore.LF_STRING +"xcopy *.* " + apphome + " /E /Y >nul" + serverCore.LF_STRING +// /E - all subdirectoriesdiff --git a/startYACY.bat b/startYACY.batindex 5cb36836b..c6bc543b4 100644--- a/startYACY.bat+++ b/startYACY.bat@@ -1,6 +1,8 @@@Echo Offtitle YaCy+if exist DATA\yacy.noconsole del DATA\yacy.noconsole+If %1.==CPGEN. GoTo :CPGENRem Generating the proper classpath unsing loops and labelsdiff --git a/startYACY_noconsole.bat b/startYACY_noconsole.batindex af63bfcc1..45b97a74d 100644--- a/startYACY_noconsole.bat+++ b/startYACY_noconsole.bat@@ -1,6 +1,10 @@@Echo Offtitle YaCy+REM setting startup type for proper restart+if not exist DATA md DATA+echo . >DATA\yacy.noconsole+If %1.==CPGEN. GoTo :CPGENRem Generating the proper classpath unsing loops and labels