Skip to content

Commit

Permalink
Version bump for rebuild
Browse files Browse the repository at this point in the history
Fix jitsi-videobridge rc script to remove -XX:+UseConcMarkSweepGC

Make backups of rc scripts if exist

Use default RC files with user perms instead of custom running services as root
  • Loading branch information
bretton committed Aug 7, 2023
1 parent dbef32b commit 427e98e
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 29 deletions.
3 changes: 3 additions & 0 deletions jitsi-meet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
* Fix error with prosody setup
* Change password generation for turnserver
* Trim turnadmin output for final line only
* Fix jitsi-videobridge rc script to remove -XX:+UseConcMarkSweepGC
* Make backups of rc scripts if exist
* Use default RC files with user perms instead of custom running services as root

---

Expand Down
4 changes: 4 additions & 0 deletions jitsi-meet/jitsi-meet.d/local/bin/cook
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ timeout --foreground 120 \
service consul start || true; sleep 5;
done'

## Warning ##
#
# jitsi-meet-full installs unbound from ports, and this overwrites local_unbound
#
# Disabling, only practical in VNET jails
# In future a parameter can be added to enable on VNET jails.
#log "Set up local unbound using local consul once consul running"
Expand Down
27 changes: 19 additions & 8 deletions jitsi-meet/jitsi-meet.d/local/share/cook/bin/configure-jicofo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,27 @@ sep=$'\001'
sed "s${sep}%%keypassword%%${sep}$KEYPASSWORD${sep}g" \
> /usr/local/etc/jitsi/jicofo/jicofo.conf

## update rc script for jicofo
## see https://honeyguide.eu/posts/jitsi-freebsd/
## also need -Djavax.net.ssl.trustStorePassword=changeit
< "$TEMPLATEPATH/rc-jicofo.in" \
sed "s${sep}%%domain%%${sep}$DOMAIN${sep}g" | \
sed "s${sep}%%keypassword%%${sep}$KEYPASSWORD${sep}g" \
> /usr/local/etc/rc.d/jicofo
# Disable updating the RC file, the default should work fine but runs as user jicofo
#disable## make a backup any existing RC file
#disable#if [ -f /usr/local/etc/rc.d/jicofo ]; then
#disable# cp -f /usr/local/etc/rc.d/jicofo /usr/local/etc/rc.d/jicofo.bak
#disable# chmod -x /usr/local/etc/rc.d/jicofo.bak
#disable#fi
#
#disable### update rc script for jicofo
#disable### see https://honeyguide.eu/posts/jitsi-freebsd/
#disable### also need -Djavax.net.ssl.trustStorePassword=changeit
#disable#< "$TEMPLATEPATH/rc-jicofo.in" \
#disable# sed "s${sep}%%domain%%${sep}$DOMAIN${sep}g" | \
#disable# sed "s${sep}%%keypassword%%${sep}$KEYPASSWORD${sep}g" \
#disable# > /usr/local/etc/rc.d/jicofo
#
## set execute permissions
chmod +x /usr/local/etc/rc.d/jicofo
#disable#chmod +x /usr/local/etc/rc.d/jicofo

# eliminate a log error
touch /usr/local/etc/jitsi/jicofo/sip-communicator.properties
chown jicofo:jicofo /usr/local/etc/jitsi/jicofo/sip-communicator.properties

# copy over jicofostatus.sh, runs:
# [ curl -s "http://localhost:8080/debug?full=true" | jq . ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,22 @@ fi
sed "s${sep}%%link%%${sep}$LINK${sep}g" \
> /usr/local/www/jitsi-meet/interface_config.js

## update rc script for jitsi-videobridge
## see https://honeyguide.eu/posts/jitsi-freebsd/
< "$TEMPLATEPATH/rc-jitsi-videobridge.in" \
sed "s${sep}%%domain%%${sep}$DOMAIN${sep}g" | \
sed "s${sep}%%keypassword%%${sep}$KEYPASSWORD${sep}g" \
> /usr/local/etc/rc.d/jitsi-videobridge

# set execute permission
chmod +x /usr/local/etc/rc.d/jitsi-videobridge
# Disabling custom RC file running as root, using default running as user jvb
#disable## make a backup any existing RC file
#disable#if [ -f /usr/local/etc/rc.d/jitsi-videobridge ]; then
#disable# cp -f /usr/local/etc/rc.d/jitsi-videobridge /usr/local/etc/rc.d/jitsi-videobridge.bak
#disable# chmod -x /usr/local/etc/rc.d/jitsi-videobridge.bak
#disable#fi
#
#disable### update rc script for jitsi-videobridge
#disable### see https://honeyguide.eu/posts/jitsi-freebsd/
#disable#< "$TEMPLATEPATH/rc-jitsi-videobridge.in" \
#disable# sed "s${sep}%%domain%%${sep}$DOMAIN${sep}g" | \
#disable# sed "s${sep}%%keypassword%%${sep}$KEYPASSWORD${sep}g" \
#disable# > /usr/local/etc/rc.d/jitsi-videobridge
#
#disable## set execute permission
#disable#chmod +x /usr/local/etc/rc.d/jitsi-videobridge

# copy over manifest.json
cp -f "$TEMPLATEPATH/manifest.json.in" /usr/local/www/jitsi-meet/manifest.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

# Note: jitsi-meet installs unbound and that overwrites any local_unbound setup

# shellcheck disable=SC1091
. /root/.env.cook

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ videobridge {
cc {
trust-bwe = false
}

http-servers {
public {
port = 9090
Expand Down
18 changes: 9 additions & 9 deletions jitsi-meet/jitsi-meet.d/local/share/cook/templates/rc-jicofo.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ jicofo_start()
# daemon -u ${jicofo_user} -p ${pidfile} -o /var/log/${name}.log \
daemon -p ${pidfile} -o /var/log/${name}.log \
${command} -Xmx${jicofo_maxmem} \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=/tmp \
-Djava.util.logging.config.file=${jicofo_logging_config} \
-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/usr/local/etc/jitsi \
-Dnet.java.sip.communicator.SC_HOME_DIR_NAME=jicofo \
-Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/ \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=/tmp \
-Djava.util.logging.config.file=${jicofo_logging_config} \
-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/usr/local/etc/jitsi \
-Dnet.java.sip.communicator.SC_HOME_DIR_NAME=jicofo \
-Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/ \
-Dconfig.file=${jicofo_config} \
-Djavax.net.ssl.trustStore=${jicofo_trust_store} \
-cp ${jicofo_jar} \
org.jitsi.jicofo.Main \
${jicofo_flags}
-cp ${jicofo_jar} \
org.jitsi.jicofo.Main \
${jicofo_flags}

echo "Starting ${name}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rcvar=${name}_enable

jitsi_videobridge_config="/usr/local/etc/jitsi/videobridge/jitsi-videobridge.conf"
jitsi_videobridge_jar="/usr/local/share/java/classes/jitsi-videobridge.jar"
jitsi_videobridge_logging_config="/usr/local/share/java/jitsi-videobridge-2.1.681/lib/logging.properties"
jitsi_videobridge_logging_config="/usr/local/share/java/jitsi-videobridge-2.2.79/lib/logging.properties"
jitsi_videobridge_user="jvb"

load_rc_config "${name}"
Expand All @@ -42,7 +42,6 @@ jitsi_videobridge_start()
# daemon -u ${jitsi_videobridge_user} -p ${pidfile} -o /var/log/jitsi-videobridge.log \
daemon -p ${pidfile} -o /var/log/jitsi-videobridge.log \
${command} -Xmx${jitsi_videobridge_maxmem} \
-XX:+UseConcMarkSweepGC \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=/tmp \
-Djava.util.logging.config.file=${jitsi_videobridge_logging_config} \
Expand Down
2 changes: 1 addition & 1 deletion jitsi-meet/jitsi-meet.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[manifest]
potname="jitsi-meet"
author = "Stephan Lichtenauer, Bretton Vine, Michael Gmelin"
version="0.10.10"
version="0.10.11"
origin="freebs"
runs_in_nomad="false"
1 change: 1 addition & 0 deletions jitsi-meet/jitsi-meet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ pkg install -y prosody
step "Install package turnserver"
pkg install -y turnserver

# Be aware this installs unbound from ports which overwrites local_unbound
step "Install package jitsi-meet"
pkg install -y jitsi-meet-full

Expand Down

0 comments on commit 427e98e

Please sign in to comment.