-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathrun.sh
executable file
·31 lines (28 loc) · 853 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /bin/sh
if [ "$1" = "-debug" ]; then
DBG="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000"
shift
fi
if [ "$JAVA_HOME" != "" ]; then
JAVA=$JAVA_HOME/bin/java
else
JAVA=java
fi
if [ "$1" = "-admin" ]; then
shift
echo executing: $JAVA -jar lib/snipsnap-utils.jar $*
$JAVA -jar lib/snipsnap-utils.jar $*
exit
fi
case "`uname`" in
IRIX*)
JAVA_OPTS="$JAVA_OPTS"
;;
*)
JAVA_OPTS="$JAVA_OPTS -server"
;;
esac
JAVA_OPTS="$JAVA_OPTS -DentityExpansionLimit=1000000 -Djava.awt.headless=true -Xmx512m"
# uncomment if you have a lot of memory and want optimizations
JAVA_OPTS="$JAVA_OPTS -Xsqnopause -XX:+UseLWPSynchronization -Xms512m -Xmx1024m -Xss256k -XX:MaxNewSize=96m -XX:MaxPermSize=512m"
$JAVA $JAVA_OPTS $DBG -Dlauncher.errlog=server.log -jar lib/snipsnap.jar $*