-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrunner
executable file
·23 lines (19 loc) · 1.11 KB
/
runner
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# You may need to customize memory config below to optimize for your environment.
# To display time when the application is stopped for GC:
# -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime
JAVA_OPTS="-Xmx512m -Xms256m -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -XX:+AggressiveOpts -XX:+OptimizeStringConcat -XX:+UseFastAccessorMethods -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.awt.headless=true -server -Dxitrum.mode=production"
# Quote because path may contain spaces
if [ -h $0 ]
then
ROOT_DIR="$(cd "$(dirname "$(readlink -n "$0")")/.." && pwd)"
else
ROOT_DIR="$(cd "$(dirname $0)/.." && pwd)"
fi
cd "$ROOT_DIR"
# Include ROOT_DIR to do "ps aux | grep java" to find this pid easier when
# starting multiple processes from different directories
CLASS_PATH="$ROOT_DIR/lib/*:config"
# Use exec to be compatible with daemontools:
# http://cr.yp.to/daemontools.html
exec java $JAVA_OPTS -cp "$CLASS_PATH" "$@"