Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix: ignore comment lines when reading yacy.conf keys in startYACY.sh (#736)
Leo8a1756d2df8c
diff --git a/startYACY.sh b/startYACY.shindex 14750d8ca..3b19fcefb 100755--- a/startYACY.sh+++ b/startYACY.sh@@ -197,20 +197,20 @@ thenif [ -z "$YACY_JAVASTART_XMX" ]then# When YACY_JAVASTART_XMX is not set or empty:- # Read from $CONFIGFILE- j="`grep javastart_Xmx "$CONFIGFILE" | sed 's/^[^=]*=//'`";+ # Read from $CONFIGFILE (strip comment lines first to avoid matching #javastart_Xmx=...)+ j="`grep -v '^\s*#' "$CONFIGFILE" | grep 'javastart_Xmx' | sed 's/^[^=]*=//'`";if [ -n "$j" ]; then JAVA_ARGS="-$j $JAVA_ARGS"; fi;else# use the YACY_JAVASTART_XMX variableJAVA_ARGS="-$YACY_JAVASTART_XMX $JAVA_ARGS"fi- # Priority- j="`grep javastart_priority "$CONFIGFILE" | sed 's/^[^=]*=//'`";+ # Priority (strip comment lines first)+ j="`grep -v '^\s*#' "$CONFIGFILE" | grep 'javastart_priority' | sed 's/^[^=]*=//'`";if [ -n "$j" ]; then JAVA="nice -n $j $JAVA"; fi;- PORT="`grep ^port= "$CONFIGFILE" | sed 's/^[^=]*=//'`";+ PORT="`grep -v '^\s*#' "$CONFIGFILE" | grep '^port=' | sed 's/^[^=]*=//'`";if [ -z "$PORT" ]; then PORT="8090"; fi;# for i in `grep javastart "$CONFIGFILE"`;do