*) 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
}
// 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 information
prop.put("versionpp", yacy.combined2prettyVersion(sb.getConfig("version","0.1")));

@ -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 startscript
final 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 {

Loading…
Cancel
Save