*) 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


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3752 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
rramthun 18 years ago
parent 3562fe1706
commit dee29faf15

@ -143,10 +143,9 @@ public class Status {
prop.put("protection", 1); // protected prop.put("protection", 1); // protected
} }
// if running on Windows, enable restart button // if running on Windows or with updater/wrapper enable restart button
// (remove from servlet when Linux start-script is capable, too) if ((sb.updaterCallback != null) || (System.getProperty("os.name").toLowerCase().startsWith("win"))) {
//prop.put("restartEnabled", (System.getProperty("os.name").toLowerCase().startsWith("win")) ? 1 : 0); prop.put("restartEnabled", 1); }
prop.put("restartEnabled", (sb.updaterCallback != null) ? 1 : 0);
// version information // version information
prop.put("versionpp", yacy.combined2prettyVersion(sb.getConfig("version","0.1"))); prop.put("versionpp", yacy.combined2prettyVersion(sb.getConfig("version","0.1")));

@ -47,6 +47,9 @@
// if the shell's current path is HTROOT // if the shell's current path is HTROOT
import java.io.File;
import java.io.IOException;
import de.anomic.http.httpHeader; import de.anomic.http.httpHeader;
import de.anomic.plasma.plasmaSwitchboard; import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverObjects; import de.anomic.server.serverObjects;
@ -77,8 +80,8 @@ public class Steering {
} }
if (post.containsKey("restart")) { if (post.containsKey("restart")) {
/* if ((sb.updaterCallback == null) && (System.getProperty("os.name").toLowerCase().startsWith("win"))) {
// yacy.restart erstellen (wird im startscript ausgewertet) // 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()) { if (!yacyRestart.exists()) {
try { try {
@ -88,7 +91,8 @@ public class Steering {
e.printStackTrace(); e.printStackTrace();
} }
} }
*/ }
if (sb.updaterCallback != null) { if (sb.updaterCallback != null) {
sb.updaterCallback.signalYaCyRestart(); sb.updaterCallback.signalYaCyRestart();
} else { } else {

Loading…
Cancel
Save