diff --git a/resources/dayon.sh b/resources/dayon.sh index 3edce22e..58ecde98 100755 --- a/resources/dayon.sh +++ b/resources/dayon.sh @@ -20,7 +20,6 @@ elif [ ! -f /etc/alternatives/java ]; then else JAVA=$(ls -l /etc/alternatives/java | awk -F'> ' '{print $2}') fi -JAVA_OPTS="-Xmx512M" case "$@" in *log=console*) LOG= @@ -29,5 +28,13 @@ case "$@" in LOG="-Ddayon.log=file" ;; esac +case "$@" in + *assistant*) + JAVA_OPTS="-Xmx512m" + ;; + *) + JAVA_OPTS="-Xmx1g" + ;; +esac JAR="${DAYON_HOME}/dayon.jar" ${JAVA} ${JAVA_OPTS} ${LOG} -jar "${JAR}" "$@" diff --git a/resources/snap/dayon.launcher b/resources/snap/dayon.launcher index e091a32c..e93d806e 100755 --- a/resources/snap/dayon.launcher +++ b/resources/snap/dayon.launcher @@ -7,4 +7,12 @@ case "$@" in LOG="-Ddayon.log=file" ;; esac -java ${LOG} -Xmx1g -jar "$@" +case "$@" in + *assistant*) + JAVA_OPTS="-Xmx512m" + ;; + *) + JAVA_OPTS="-Xmx1g" + ;; +esac +java ${JAVA_OPTS} ${LOG} -jar "$@"