From 4bb7397b53ee1da2b8553b22dea0b774a53f0599 Mon Sep 17 00:00:00 2001 From: rramthun Date: Sat, 4 Feb 2006 15:56:21 +0000 Subject: [PATCH] Updated startYACY.sh: now it checks if java is executable and provides errormessage if it is not. To-Do: Perhaps could someone implement an -c (Cron) and -help option. Places where you could find PATH are in the comments. I will add text for -help if someone provides the code. git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1530 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/index.html | 3 --- startYACY.sh | 26 ++++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-) 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";

- 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