diff options
| author | luccioman <luccioman@users.noreply.github.com> | 2019-01-26 10:28:44 +0100 |
|---|---|---|
| committer | luccioman <luccioman@users.noreply.github.com> | 2019-01-26 10:28:44 +0100 |
| commit | 965c752ed5664781ba29b5f0721f93c6b3109e15 (patch) | |
| tree | e67ca0a1ab2e81e227e6d22f9ce51f09c6652b9f | |
| parent | 9782a98a9c1b60e00423ae1cae380647f2f198d4 (diff) | |
Fixed shell start script failure on missing memory settings in conf file
Before that fix, the startYACY.sh failed when the javastart_Xmx or
javastart_Xms configuration keys were missing for some reason from
yacy.conf file, with the error "Unrecognized option: - Error: Could not
create the Java Virtual Machine."
| -rwxr-xr-x | startYACY.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/startYACY.sh b/startYACY.sh index 3c6e5080f..876f5df14 100755 --- a/startYACY.sh +++ b/startYACY.sh @@ -193,17 +193,16 @@ then # startup memory for i in Xmx Xms; do j="`grep javastart_$i $CONFIGFILE | sed 's/^[^=]*=//'`"; - if [ -n $j ]; then JAVA_ARGS="-$j $JAVA_ARGS"; fi; + if [ -n "$j" ]; then JAVA_ARGS="-$j $JAVA_ARGS"; fi; done # Priority j="`grep javastart_priority $CONFIGFILE | sed 's/^[^=]*=//'`"; - if [ ! -z "$j" ];then - if [ -n $j ]; then JAVA="nice -n $j $JAVA"; fi; - fi + 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 # i="${i#javastart_*=}"; |
