Skip to content

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

Updated startYACY.sh: now it checks if java is executable and provides errormessage if it is not.

rramthun4bb7397b53ee
diff --git a/htroot/index.html b/htroot/index.html
index f63554e90..834639624 100644
--- a/htroot/index.html
+++ b/htroot/index.html
@@ -31,9 +31,6 @@ picMinus.src = "/env/grafics/minus.gif";
<input type="submit" name="Enter" value="Search"><p>
</center>
-<!-- Below is Ronald's code which is not working with Opera, Konqueror and Safari
-<input type="submit" name="Enter" value="Search" onClick="with (this) { value = 'Searching...'; disabled = true; }">
--->
</td>
</tr>
diff --git a/startYACY.sh b/startYACY.sh
index 415a240f5..e3e65a816 100755
--- a/startYACY.sh
+++ b/startYACY.sh
@@ -2,9 +2,31 @@
if [ $UID -eq 0 ]
then
echo
- echo "For security reasons, you should not run this as root!"
+ echo "For security reasons, you should not run this script as root!"
echo
-else
+ exit 2
+elif ! [-x "`which java`"]
+ echo "The java command is not executable."
+ echo "Either you have not installed java or it is not in your $PATH"
+ echo "Has this script been invoked by CRON? Then use the -c option."
+ exit 2
+
+ #-c to be imlemented.
+ #Possible locations for setting of PATH
+
+ #sh, ksh, bash, zsh
+ #. ~/.profile
+ #bash
+ #. ~/.bash_profile
+ #csh, tcsh
+ #. ~/.login
+ #sh, ksh, bash, zsh
+ #. /etc/profile
+ #csh, tcsh
+ #. /etc/csh.login
+
+elif [-x "`which java`"]
+ #startup YaCy
cd `dirname $0`
#get javastart args