*) Better Bourne-Shell (OpenSolaris) compatibility, update and restart really work now. As the Bourne-Shell is the grandfather of most modern shells, it should also work with Linux (tested with Mandriva, works) and OSX (Please test!).

*) Fixed a typo.


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4054 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 18 years ago
parent 72752bb503
commit 54004e929b

@ -26,7 +26,7 @@
If you can't reach YaCy's interface after 5 minutes restart failed.
::
<b>Installing release #[release]#</b><br />
<p>YaCy will be restartet after installation</p>
<p>YaCy will be restarted after installation</p>
#(/info)#
</p>
</body>

@ -99,7 +99,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 {
@ -340,7 +340,7 @@ public final class serverSystem {
// runs a unix/linux script as separate thread
File starterFile = new File(scriptFile.getAbsolutePath() + ".starter.sh");
//deployScript(starterFile, "touch restart.starter.startet1");
deployScript(starterFile, scriptFile.getAbsolutePath() + " &" + serverCore.lfstring);
deployScript(starterFile, "#!/bin/sh" + serverCore.lfstring + scriptFile.getAbsolutePath() + " &" + serverCore.lfstring);
try {
Runtime.getRuntime().exec(starterFile.getAbsolutePath()).waitFor();
} catch (InterruptedException e) {

@ -371,13 +371,14 @@ public final class yacyVersion implements Comparator, Comparable {
try {
serverLog.logInfo("RESTART", "INITIATED");
String script =
"#!/bin/sh" + serverCore.lfstring +
"cd " + sb.getRootPath() + "/DATA/RELEASE/" + serverCore.lfstring +
"while [ -e ../yacy.running ]; do" + serverCore.lfstring +
"while [ -f ../yacy.running ]; do" + serverCore.lfstring +
"sleep 1" + serverCore.lfstring +
"done" + serverCore.lfstring +
"cd ../../" + serverCore.lfstring +
"nohup ./startYACY.sh > /dev/null" + serverCore.lfstring;
File scriptFile = new File(sb.getRootPath(), "DATA/RELEASE/restart.sh");
File scriptFile = new File(sb.getRootPath(), "DATA/RELEASE/restart.sh");
serverSystem.deployScript(scriptFile, script);
serverLog.logInfo("RESTART", "wrote restart-script to " + scriptFile.getAbsolutePath());
serverSystem.execAsynchronous(scriptFile);
@ -395,9 +396,10 @@ public final class yacyVersion implements Comparator, Comparable {
plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();
serverLog.logInfo("UPDATE", "INITIATED");
String script =
"#!/bin/sh" + serverCore.lfstring +
"cd " + sb.getRootPath() + "/DATA/RELEASE/" + serverCore.lfstring +
"gunzip -c " + release + " | tar xf -" + serverCore.lfstring +
"while [ -e ../yacy.running ]; do" + serverCore.lfstring +
"while [ -f ../yacy.running ]; do" + serverCore.lfstring +
"sleep 1" + serverCore.lfstring +
"done" + serverCore.lfstring +
"cp -Rf yacy/* ../../" + serverCore.lfstring +

Loading…
Cancel
Save