Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) Preparations for system-independent restart using the wrapper. Not functional yet.
(no author)b4b56a54754f
diff --git a/htroot/Status.java b/htroot/Status.javaindex 48ff06f18..6e235aee5 100644--- a/htroot/Status.java+++ b/htroot/Status.java@@ -145,8 +145,9 @@ public class Status {// if running on Windows, enable restart button// (remove from servlet when Linux start-script is capable, too)- prop.put("restartEnabled", (System.getProperty("os.name").toLowerCase().startsWith("win")) ? 1 : 0);-+ //prop.put("restartEnabled", (System.getProperty("os.name").toLowerCase().startsWith("win")) ? 1 : 0);+ prop.put("restartEnabled", (sb.updaterCallback != null) ? 1 : 0);+// version informationprop.put("versionpp", yacy.combined2prettyVersion(sb.getConfig("version","0.1")));diff --git a/htroot/Steering.java b/htroot/Steering.javaindex 0ad7281f7..f2ee48a80 100644--- a/htroot/Steering.java+++ b/htroot/Steering.java@@ -46,8 +46,6 @@// javac -classpath .:../Classes SettingsAck_p.java// if the shell's current path is HTROOT-import java.io.File;-import java.io.IOException;import de.anomic.http.httpHeader;import de.anomic.plasma.plasmaSwitchboard;@@ -72,12 +70,14 @@ public class Steering {}if (post.containsKey("shutdown")) {+ if (sb.updaterCallback != null) { sb.updaterCallback.signalYaCyShutdown(); }sb.terminate(3000);prop.put("info", 3);return prop;}if (post.containsKey("restart")) {+ /*// yacy.restart erstellen (wird im startscript ausgewertet)final File yacyRestart = new File(sb.getRootPath(), "DATA/yacy.restart");if (!yacyRestart.exists()) {@@ -88,12 +88,20 @@ public class Steering {e.printStackTrace();}}- sb.terminate(5000);+ */+ if (sb.updaterCallback != null) {+ sb.updaterCallback.signalYaCyRestart();+ } else {+ serverLog.logWarning("SHUTDOWN", "ERROR: no wrapper/updater running! Performing a normal shutdown...");+ }++ sb.terminate(5000);prop.put("info", 4);+return prop;}return prop;}-}\ No newline at end of file+}diff --git a/startYACY.bat b/startYACY.batindex 97b78684e..2066c744f 100644--- a/startYACY.bat+++ b/startYACY.bat@@ -22,10 +22,10 @@ Echo Generated classpath:%CLASSPATH%Echo JRE Parameters:%javacmd%Echo Priority:%priority%-Echo ****************** YaCy Web Crawler/Indexer ^& Search Engine *******************+Echo ****************** YaCy Web Crawler/Indexer ^& Search Engine ******************Echo **** (C) by Michael Peter Christen, usage granted under the GPL Version 2 ****Echo **** USE AT YOUR OWN RISK! Project home and releases: http://yacy.net/yacy ****-Echo ** LOG of YaCy: DATA/LOG/yacy00.log (and yacy^<xx^>.log) **+Echo ** LOG of YaCy: DATA/LOG/yacy00.log (and yacy^<xx^>.log) **Echo ** STOP YaCy: execute stopYACY.bat and wait some seconds **Echo ** GET HELP for YaCy: see www.yacy-websearch.net/wiki and www.yacy-forum.de **Echo *******************************************************************************