|
Lines 7-14
Link Here
|
| 7 |
# KEYWORD: shutdown |
7 |
# KEYWORD: shutdown |
| 8 |
# |
8 |
# |
| 9 |
# Configuration settings for jicofo in /etc/rc.conf: |
9 |
# Configuration settings for jicofo in /etc/rc.conf: |
|
|
10 |
# jicofo_enable: run jicofo server (default=NO) |
| 11 |
# jicofo_flags: additional flags for jicofo server (default="") |
| 10 |
# |
12 |
# |
| 11 |
# |
|
|
| 12 |
|
13 |
|
| 13 |
. /etc/rc.subr |
14 |
. /etc/rc.subr |
| 14 |
|
15 |
|
|
Lines 15-23
Link Here
|
| 15 |
name="jicofo" |
16 |
name="jicofo" |
| 16 |
rcvar=${name}_enable |
17 |
rcvar=${name}_enable |
| 17 |
|
18 |
|
| 18 |
jicofo_env_file="%%LOCALBASE%%/etc/jitsi/jicofo/jicofo.conf" |
19 |
jicofo_env_file="%%ETCDIR%%/jicofo.conf" |
| 19 |
jicofo_jar="%%JAVAJARDIR%%/jicofo.jar" |
20 |
jicofo_jar="%%JAVAJARDIR%%/jicofo.jar" |
| 20 |
jicofo_logging_config="%%DATADIR%%/lib/logging.properties" |
21 |
jicofo_logging_config="%%DATADIR%%/lib/logging.properties" |
|
|
22 |
jicofo_trust_store="%%ETCDIR%%/truststore.jks" |
| 21 |
|
23 |
|
| 22 |
load_rc_config "${name}" |
24 |
load_rc_config "${name}" |
| 23 |
|
25 |
|
|
Lines 24-32
Link Here
|
| 24 |
: ${jicofo_enable="NO"} |
26 |
: ${jicofo_enable="NO"} |
| 25 |
: ${jicofo_flags=""} |
27 |
: ${jicofo_flags=""} |
| 26 |
|
28 |
|
| 27 |
command="%%LOCALBASE%%/bin/java" |
29 |
command="%%JAVA%%" |
| 28 |
pidfile="/var/run/jicofo.pid" |
30 |
pidfile="/var/run/jicofo.pid" |
| 29 |
required_files="${jicofo_env_file} %%LOCALBASE%%/etc/ssl/java.pem" |
31 |
required_files="${jicofo_env_file} ${jicofo_trust_store}" |
| 30 |
|
32 |
|
| 31 |
start_cmd=${name}_start |
33 |
start_cmd=${name}_start |
| 32 |
stop_cmd=${name}_stop |
34 |
stop_cmd=${name}_stop |
|
Lines 35-41
Link Here
|
| 35 |
|
37 |
|
| 36 |
jicofo_start() |
38 |
jicofo_start() |
| 37 |
{ |
39 |
{ |
| 38 |
daemon -p ${pidfile} -o /var/log/${name}.log ${command} -Xmx${MAX_MEMORY} \ |
40 |
daemon -p ${pidfile} -o /var/log/${name}.log \ |
|
|
41 |
${command} -Xmx${MAX_MEMORY} \ |
| 39 |
-XX:+HeapDumpOnOutOfMemoryError \ |
42 |
-XX:+HeapDumpOnOutOfMemoryError \ |
| 40 |
-XX:HeapDumpPath=/tmp \ |
43 |
-XX:HeapDumpPath=/tmp \ |
| 41 |
-Djava.util.logging.config.file=${jicofo_logging_config} \ |
44 |
-Djava.util.logging.config.file=${jicofo_logging_config} \ |
|
Lines 42-57
Link Here
|
| 42 |
-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=%%LOCALBASE%%/etc/jitsi \ |
45 |
-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=%%LOCALBASE%%/etc/jitsi \ |
| 43 |
-Dnet.java.sip.communicator.SC_HOME_DIR_NAME=jicofo \ |
46 |
-Dnet.java.sip.communicator.SC_HOME_DIR_NAME=jicofo \ |
| 44 |
-Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/ \ |
47 |
-Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/ \ |
| 45 |
-Djavax.net.ssl.trustStore=%%LOCALBASE%%/etc/ssl/java.pem \ |
48 |
"-Djavax.net.ssl.trustStore=${jicofo_trust_store}" \ |
| 46 |
-cp ${jicofo_jar} \ |
49 |
-cp ${jicofo_jar} \ |
| 47 |
org.jitsi.jicofo.Main \ |
50 |
org.jitsi.jicofo.Main \ |
| 48 |
--host=${JVB_XMPP_HOST} \ |
51 |
--host=${JVB_XMPP_HOST} \ |
| 49 |
--domain=${JVB_XMPP_DOMAIN} \ |
52 |
--domain=${JVB_XMPP_DOMAIN} \ |
| 50 |
--port=${JVB_XMPP_PORT} \ |
53 |
--port=${JVB_XMPP_PORT} \ |
| 51 |
--secret=${JVB_XMPP_SECRET} \ |
54 |
"--secret=${JVB_XMPP_SECRET}" \ |
| 52 |
--user_domain=${JVB_XMPP_USER_DOMAIN} \ |
55 |
--user_domain=${JVB_XMPP_USER_DOMAIN} \ |
| 53 |
--user_name=${JVB_XMPP_USER_NAME} \ |
56 |
--user_name=${JVB_XMPP_USER_NAME} \ |
| 54 |
--user_password=${JVB_XMPP_USER_SECRET} ${jicofo_flags} |
57 |
"--user_password=${JVB_XMPP_USER_SECRET}" \ |
|
|
58 |
${jicofo_flags} |
| 55 |
echo "Started" |
59 |
echo "Started" |
| 56 |
} |
60 |
} |
| 57 |
|
61 |
|