Merge pull request #597 from joestr/issue/574-fix-mac-script

Fix macOS script
pull/600/head
Michael Christen 1 year ago committed by GitHub
commit 961d3cc8af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,4 +5,4 @@
# This data directory is set in conforming to OS X File System Programming Guide
# see : https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html
"`dirname $0`"/startYACY.sh -s "'Library/Application Support/net.yacy.YaCy'"
"`dirname $0`"/startYACY.sh -s 'Library/Application Support/net.yacy.YaCy'

@ -143,7 +143,7 @@ done
if [ ! -z "$parameter" ] && [ "$STARTUP" -eq 1 -o "$GUI" -eq 1 ]; then
# The data path is explicitely provided with startup or gui option
YACY_PARENT_DATA_PATH="`echo $parameter | cut -d' ' -f1`"
YACY_PARENT_DATA_PATH=$parameter
if [ ! "`echo $YACY_PARENT_DATA_PATH | cut -c1`" = "/" ]; then
# Parent DATA path is relative to the user home
YACY_PARENT_DATA_PATH="$HOME/$YACY_PARENT_DATA_PATH"
@ -184,7 +184,7 @@ fi
#turn on MMap for Solr if OS is a 64bit OS
if [ -n "`uname -m | grep 64`" ]; then JAVA_ARGS="$JAVA_ARGS -Dsolr.directoryFactory=solr.MMapDirectoryFactory"; fi
if [ -f $CONFIGFILE ]
if [ -f "$CONFIGFILE" ]
then
# startup memory
@ -192,7 +192,7 @@ then
then
# When YACY_JAVASTART_XMX is not set or empty:
# Read from $CONFIGFILE
j="`grep javastart_Xmx $CONFIGFILE | sed 's/^[^=]*=//'`";
j="`grep javastart_Xmx "$CONFIGFILE" | sed 's/^[^=]*=//'`";
if [ -n "$j" ]; then JAVA_ARGS="-$j $JAVA_ARGS"; fi;
else
# use the YACY_JAVASTART_XMX variable
@ -200,14 +200,14 @@ then
fi
# Priority
j="`grep javastart_priority $CONFIGFILE | sed 's/^[^=]*=//'`";
j="`grep javastart_priority "$CONFIGFILE" | sed 's/^[^=]*=//'`";
if [ -n "$j" ]; then JAVA="nice -n $j $JAVA"; fi;
PORT="`grep ^port= $CONFIGFILE | sed 's/^[^=]*=//'`";
PORT="`grep ^port= "$CONFIGFILE" | sed 's/^[^=]*=//'`";
if [ -z "$PORT" ]; then PORT="8090"; fi;
# for i in `grep javastart $CONFIGFILE`;do
# for i in `grep javastart "$CONFIGFILE"`;do
# i="${i#javastart_*=}";
# JAVA_ARGS="-$i $JAVA_ARGS";
# done
@ -228,7 +228,7 @@ cmdline="$JAVA $JAVA_ARGS -classpath $CLASSPATH net.yacy.yacy";
if [ $STARTUP -eq 1 ] #startup
then
cmdline="$cmdline -startup $parameter"
cmdline="$cmdline -startup \"$parameter\""
elif [ $GUI -eq 1 ];then #gui
cmdline="$cmdline -gui $parameter"
fi

Loading…
Cancel
Save