forked from jitsi/jigasi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jigasi.sh
executable file
·25 lines (20 loc) · 890 Bytes
/
jigasi.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
#!/bin/bash
kernel="$(uname -s)"
if [ $kernel == "Darwin" ] ; then
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
elif [ $kernel == "Linux" ] ; then
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
else
echo "Unknown system : $kernel"
exit 1
fi
mainClass="org.jitsi.jigasi.Main"
cp=$(JARS=($SCRIPT_DIR/jigasi.jar $SCRIPT_DIR/lib/*.jar); IFS=:; echo "${JARS[*]}")
libs="$SCRIPT_DIR/lib"
logging_config="$SCRIPT_DIR/lib/logging.properties"
# if there is a logging config file in lib folder use it (running from source)
if [ -f $logging_config ]; then
LOGGING_CONFIG_PARAM="-Djava.util.logging.config.file=$logging_config"
fi
if [ -z "$JIGASI_MAX_MEMORY" ]; then JIGASI_MAX_MEMORY=3072m; fi
LD_LIBRARY_PATH=$libs exec java -Xmx$JIGASI_MAX_MEMORY -Djdk.net.usePlainDatagramSocketImpl=true -Djava.library.path=$libs $LOGGING_CONFIG_PARAM $JAVA_SYS_PROPS -cp $cp $mainClass $@