summaryrefslogtreecommitdiff
path: root/pcr/jitsi/jitsi.sh
blob: e6f879bef3d8257531442bdcb70216b82ad232b5 (plain)
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

CLIENTARGS=""
uname -m | grep i686 && CLIENTARGS="-client -Xmx256m"

if [[ -n ${JAVA_HOME} ]]; then
  JAVABIN="${JAVA_HOME}/bin/java"
else
  JAVABIN="/usr/lib/jvm/java-8-openjdk/bin/java"
fi

SCDIR=/usr/lib/jitsi
LIBPATH="${SCDIR}/lib"
CLASSPATH="${LIBPATH}/felix.jar:${SCDIR}/sc-bundles/sc-launcher.jar:${SCDIR}/sc-bundles/util.jar:${SCDIR}/sc-bundles/dnsjava.jar:${LIBPATH}"
FELIX_CONFIG="${LIBPATH}/felix.client.run.properties"
LOG_CONFIG="${LIBPATH}/logging.properties"
COMMAND="${JAVABIN} ${CLIENTARGS} -classpath ${CLASSPATH} -Djna.library.path=${LIBPATH}/native -Dfelix.config.properties=file:${FELIX_CONFIG} -Djava.util.logging.config.file=${LOG_CONFIG} net.java.sip.communicator.launcher.SIPCommunicator"

export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${LIBPATH}/native"

cd "${SCDIR}"

exec ${COMMAND} $*