Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if java executable not found using 'which', try to use 'command' #670

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion startYACY.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,24 @@ else
ID="id"
fi

# if java executable not found using 'which', let's try 'command'
if [ ! -x "$JAVA" ]
then
JAVA="`command -v java`"
fi

if [ ! -x "$JAVA" ]
then
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
#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."
exit 1
fi


usage() {
cat - <<USAGE
startscript for YaCy on UNIX-like systems
Expand Down
Loading