Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #89 from patcon/feature/84-setenv-bug-v3.8+
Browse files Browse the repository at this point in the history
Use proper setenv.sh format for v3.8+.
  • Loading branch information
linc01n committed Jun 18, 2015
2 parents 3d55bb7 + 3f5f4be commit 927e699
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/default/setenv.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JAVA_OPTS} ${JV
# PermGen size needs to be increased if encountering OutOfMemoryError: PermGen problems. Specifying PermGen size is
# not valid on IBM JDKs
STASH_MAX_PERM_SIZE="<%= node['stash']['jvm']['maximum_permgen'] %>"
<% if Gem::Version.new(node['stash']['version']) < Gem::Version.new('3.8') -%>
if [ -f "${PRGDIR}/permgen.sh" ]; then
echo "Detecting JVM PermGen support..."
. "${PRGDIR}/permgen.sh"
Expand All @@ -99,6 +100,9 @@ if [ -f "${PRGDIR}/permgen.sh" ]; then
echo "PermGen switch is NOT supported and will NOT be set automatically."
fi
fi
<% else -%>
JAVA_OPTS="-XX:MaxPermSize=${STASH_MAX_PERM_SIZE} ${JAVA_OPTS}"
<% end -%>

export JAVA_OPTS

Expand Down

0 comments on commit 927e699

Please sign in to comment.