Permalink
Browse files

Clean up the run script and make things just a little bit more config…

…urable.
  • Loading branch information...
1 parent 492aedf commit 195bf3d8cdeaa31d20aa636fc01c1c7804e9706b @nrr committed Mar 31, 2012
Showing with 9 additions and 3 deletions.
  1. +9 −3 run
View
12 run
@@ -1,6 +1,12 @@
#! /bin/sh
-exec envdir ./env sh -c '
- export JAVA_OPTS="${MAX_HEAP+"-Xmx$MAX_HEAP"} ${MIN_HEAP+"-Xms$MIN_HEAP"} $JAVA_OPTS"
- exec setuidgid $USER $JAVA_HOME/bin/java $JAVA_OPTS -XX:MaxPermGen=512m -jar ./root/minecraft_server.jar nogui
+exec 2>&1 \
+envdir ./env \
+sh -c '
+ export JAVA_OPTS="-server ${MAX_HEAP+"-Xmx$MAX_HEAP"} ${MIN_HEAP+"-Xms$MIN_HEAP"} $JAVA_OPTS"
+ export JAVA="$JAVA_HOME/bin/java"
+
+ cd ./root
+ exec ${USER+"setuidgid ${USER}"} \
+ $JAVA $JAVA_OPTS -jar ./root/minecraft_server.jar nogui
'

0 comments on commit 195bf3d

Please sign in to comment.