mirror of
https://github.com/yacy/yacy_search_server.git
synced 2026-10-25 05:54:15 +00:00
Merge pull request #670 from okybaca/startfix
if java executable not found using 'which', try to use 'command'
This commit is contained in:
1 file changed
+9
-1
+9
-1
@@ -20,16 +20,24 @@ else
|
|||||||
ID="id"
|
ID="id"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# if java executable not found using 'which', let's try 'command'
|
||||||
|
if [ ! -x "$JAVA" ]
|
||||||
|
then
|
||||||
|
JAVA="`command -v java`"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -x "$JAVA" ]
|
if [ ! -x "$JAVA" ]
|
||||||
then
|
then
|
||||||
echo "The java command is not executable."
|
echo "The java command is not executable."
|
||||||
echo "Either you have not installed java or it is not in your PATH"
|
echo "Either you have not installed java or it is not in your PATH."
|
||||||
|
echo "You can also set a path to java manually, in \$JAVA option of $0 script."
|
||||||
#Cron supports setting the path in
|
#Cron supports setting the path in
|
||||||
#echo "Has this script been invoked by CRON?"
|
#echo "Has this script been invoked by CRON?"
|
||||||
#echo "if so, please set PATH in the crontab, or set the correct path in the variable in this script."
|
#echo "if so, please set PATH in the crontab, or set the correct path in the variable in this script."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat - <<USAGE
|
cat - <<USAGE
|
||||||
startscript for YaCy on UNIX-like systems
|
startscript for YaCy on UNIX-like systems
|
||||||
|
|||||||
Reference in new issue
Block a user