Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Properly read configured memory settings when using a custom data path
lucciomanc00cd70a38e6
diff --git a/startYACY.sh b/startYACY.shindex 6e9101030..3c6e5080f 100755--- a/startYACY.sh+++ b/startYACY.sh@@ -47,7 +47,8 @@ USAGE}#startup YaCy-cd "`dirname $0`"+YACY_PARENT_DATA_PATH="`dirname $0`"+cd "$YACY_PARENT_DATA_PATH"if [ $OS = "OpenBSD" ] || [ $OS = "Darwin" ]then@@ -116,7 +117,7 @@ for option in $options;do-t|--tail-log)TAILLOG=1;;- -s|-startup)+ -s|--startup)STARTUP=1isparameter=1;;@@ -139,6 +140,16 @@ for option in $options;dofi #parameter or option?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`"+ 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"+ fi+ CONFIGFILE="$YACY_PARENT_DATA_PATH/DATA/SETTINGS/yacy.conf"+fi+#echo $options;exit 0 #DEBUG for getopts#check if Linux system supports large memory pages or if OS is Solaris which@@ -172,10 +183,10 @@ fi#turn on MMap for Solr if OS is a 64bit OSif [ -n "`uname -m | grep 64`" ]; then JAVA_ARGS="$JAVA_ARGS -Dsolr.directoryFactory=solr.MMapDirectoryFactory"; fi-if [ ! -f $CONFIGFILE -a -f DATA/SETTINGS/httpProxy.conf ]+if [ ! -f $CONFIGFILE -a -f "$YACY_PARENT_DATA_PATH/DATA/SETTINGS/httpProxy.conf" ]then# old config if new does not exist- CONFIGFILE="DATA/SETTINGS/httpProxy.conf"+ CONFIGFILE="$YACY_PARENT_DATA_PATH/DATA/SETTINGS/httpProxy.conf"fiif [ -f $CONFIGFILE ]then