tried to fix restart button

** kann das mal jemand auf seiner linux-platform testen **
** und feed-back geben ob der restart funktionier ? **

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3937 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent e03fcf4627
commit c5c268c43e

@ -46,8 +46,10 @@
// javac -classpath .:../Classes SettingsAck_p.java
// if the shell's current path is HTROOT
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import de.anomic.http.httpHeader;
import de.anomic.plasma.plasmaSwitchboard;
@ -93,17 +95,14 @@ public class Steering {
} else if (serverSystem.canExecUnix) {
// start a re-start daemon
try {
/*Process p =*/ Runtime.getRuntime().exec("/bin/sh " + sb.getRootPath() + "/restart.sh &");
/*
Process p = Runtime.getRuntime().exec("source " + sb.getRootPath() + "/restart.sh " + sb.getRootPath() + " &");
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
PrintWriter out = new PrintWriter(System.out);
String text;
while ((text = in.readLine()) != null) {
out.println(text); out.flush();
sb.getLog().logInfo("RESTART -- " + text);
}
*/
} catch (IOException e) {
e.printStackTrace();
sb.getLog().logSevere("restart failed", e);
}
}
sb.terminate(5000);

@ -4,7 +4,8 @@
# in case that YaCy is terminated with the restart option
# navigate into the own directory path
cd `dirname $0`
# the path is handed over upon start of this script
cd $1
# waiting for shutdown
while [ -e DATA/yacy.running ]; do
@ -12,4 +13,4 @@ sleep 1
done
# shutdown complete, start up yacy
./startYaCy.sh
./startYACY.sh

@ -98,7 +98,7 @@ public final class serverSystem {
isMacArchitecture = ((systemOS == systemMacOSC) || (systemOS == systemMacOSX));
isUnixFS = ((systemOS == systemMacOSX) || (systemOS == systemUnix));
canExecUnix = ((isUnixFS) || (!((systemOS == systemMacOSC) || (systemOS == systemWindows))));
canExecUnix = ((isUnixFS) || (!((systemOS == systemMacOSC) || (systemOS == systemWindows))));
// set up the MRJ Methods through reflection
if (isMacArchitecture) try {

@ -246,9 +246,10 @@ public final class yacy {
System.out.println("could not find logging properties in homePath=" + homePath);
e.printStackTrace();
}
serverLog.logConfig("STARTUP", "java version " + System.getProperty("java.version", "no-java-version"));
serverLog.logConfig("STARTUP", "Application Root Path: " + homePath);
serverLog.logConfig("STARTUP", "Time Zone: UTC" + serverDate.UTCDiffString() + "; UTC+0000 is " + System.currentTimeMillis());
serverLog.logConfig("STARTUP", "Java version: " + System.getProperty("java.version", "no-java-version"));
serverLog.logConfig("STARTUP", "Operation system: " + System.getProperty("os.name","unknown"));
serverLog.logConfig("STARTUP", "Application root-ath: " + homePath);
serverLog.logConfig("STARTUP", "Time zone: UTC" + serverDate.UTCDiffString() + "; UTC+0000 is " + System.currentTimeMillis());
serverLog.logConfig("STARTUP", "Maximum file system path length: " + serverSystem.maxPathLength);
f = new File(homePath, "DATA/yacy.running");

Loading…
Cancel
Save