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
pull/1/head
rramthun 19 years ago
parent be77fe1a88
commit 4bb7397b53

@ -31,9 +31,6 @@ picMinus.src = "/env/grafics/minus.gif";
<input type="submit" name="Enter" value="Search"><p> <input type="submit" name="Enter" value="Search"><p>
</center> </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> </td>
</tr> </tr>

@ -2,9 +2,31 @@
if [ $UID -eq 0 ] if [ $UID -eq 0 ]
then then
echo 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 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` cd `dirname $0`
#get javastart args #get javastart args

Loading…
Cancel
Save