Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

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

low01254004e929ba2
diff --git a/htroot/Steering.html b/htroot/Steering.html
index 22c039a6d..3da1099d6 100644
--- a/htroot/Steering.html
+++ b/htroot/Steering.html
@@ -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>
diff --git a/source/de/anomic/server/serverSystem.java b/source/de/anomic/server/serverSystem.java
index 916532c63..402951799 100644
--- a/source/de/anomic/server/serverSystem.java
+++ b/source/de/anomic/server/serverSystem.java
@@ -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) {
diff --git a/source/de/anomic/yacy/yacyVersion.java b/source/de/anomic/yacy/yacyVersion.java
index 3cf182612..b86c0e36f 100644
--- a/source/de/anomic/yacy/yacyVersion.java
+++ b/source/de/anomic/yacy/yacyVersion.java
@@ -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 +