Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) System independent restart is now possible if using the updater/wrapper. - Part 1/2 (YaCy side) The old Windows-only method has not been removed, so Windows-users without updater are still able to restart without updater
rramthundee29faf159d
diff --git a/htroot/Status.java b/htroot/Status.javaindex 6e235aee5..36d283d43 100644--- a/htroot/Status.java+++ b/htroot/Status.java@@ -143,10 +143,9 @@ public class Status {prop.put("protection", 1); // protected}- // 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", (sb.updaterCallback != null) ? 1 : 0);+ // if running on Windows or with updater/wrapper enable restart button+ if ((sb.updaterCallback != null) || (System.getProperty("os.name").toLowerCase().startsWith("win"))) {+ prop.put("restartEnabled", 1); }// version informationprop.put("versionpp", yacy.combined2prettyVersion(sb.getConfig("version","0.1")));diff --git a/htroot/Steering.java b/htroot/Steering.javaindex f2ee48a80..8e13bb678 100644--- a/htroot/Steering.java+++ b/htroot/Steering.java@@ -47,6 +47,9 @@// 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;import de.anomic.server.serverObjects;@@ -77,8 +80,8 @@ public class Steering {}if (post.containsKey("restart")) {- /*- // yacy.restart erstellen (wird im startscript ausgewertet)+ if ((sb.updaterCallback == null) && (System.getProperty("os.name").toLowerCase().startsWith("win"))) {+ // create yacy.restart file which is used in Windows startscriptfinal File yacyRestart = new File(sb.getRootPath(), "DATA/yacy.restart");if (!yacyRestart.exists()) {try {@@ -88,7 +91,8 @@ public class Steering {e.printStackTrace();}}- */+ }+if (sb.updaterCallback != null) {sb.updaterCallback.signalYaCyRestart();} else {