Skip to content

Commit

Permalink
fix duplicate java memory args on restart
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Edwards committed Nov 1, 2018
1 parent 51cc419 commit 3ef81d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/assets/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ fi

# Update min memory if the argument is passed
if [ "$ARTEMIS_MIN_MEMORY" ]; then
sed -i "s/^JAVA_ARGS=\"/JAVA_ARGS=\"-Xms$ARTEMIS_MIN_MEMORY /g" $CONFIG_PATH/artemis.profile
sed -i "/-Xms/!s/^JAVA_ARGS=\"/JAVA_ARGS=\"-Xms$ARTEMIS_MIN_MEMORY /g" $CONFIG_PATH/artemis.profile
fi

# Update max memory if the argument is passed
if [ "$ARTEMIS_MAX_MEMORY" ]; then
sed -i "s/^JAVA_ARGS=\"/JAVA_ARGS=\"-Xmx$ARTEMIS_MAX_MEMORY /g" $CONFIG_PATH/artemis.profile
sed -i "/-Xmx/!s/^JAVA_ARGS=\"/JAVA_ARGS=\"-Xmx$ARTEMIS_MAX_MEMORY /g" $CONFIG_PATH/artemis.profile
fi

# Support extra java opts from JAVA_OPTS env
Expand Down

0 comments on commit 3ef81d4

Please sign in to comment.