Skip to content

Commit 80ae790

Browse files
committed
feat(deb): Moves to using jvb.conf only.
1 parent e7690fd commit 80ae790

File tree

1 file changed

+23
-30
lines changed

1 file changed

+23
-30
lines changed

debian/postinst

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,8 @@ case "$1" in
4848
# and we're done with debconf
4949
db_stop
5050

51-
OLD_JITSI_CONFIG="/usr/share/jitsi-videobridge/.sip-communicator/sip-communicator.properties"
52-
NEW_JITSI_CONFIG="/etc/jitsi/videobridge/sip-communicator.properties"
5351
HOCON_CONFIG="/etc/jitsi/videobridge/jvb.conf"
5452

55-
if [ -f $OLD_JITSI_CONFIG ]; then
56-
mv $OLD_JITSI_CONFIG $NEW_JITSI_CONFIG
57-
echo "# Config has moved to /etc/jitsi/videobridge/
58-
# do not edit this file as it is not used" > ${OLD_JITSI_CONFIG}.old
59-
elif [ ! -f $NEW_JITSI_CONFIG ]; then
60-
# if sip-communicator.properties file is missing create it
61-
# as jvb will search for it and if cannot create it will fail starting
62-
touch $NEW_JITSI_CONFIG
63-
fi
64-
6553
# let's check whether there is a setting in the $CONFIG
6654
# for home folder and logging props file, if missing add it
6755
if ! grep -q "JAVA_SYS_PROPS" "$CONFIG"; then
@@ -82,25 +70,8 @@ case "$1" in
8270
# and this breaks startup script
8371
sed -i 's/\$JVB_EXTRA_JVM_PARAMS//g' $CONFIG
8472

85-
if ! grep -q "org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES" "$NEW_JITSI_CONFIG" \
86-
&& ! grep -q "org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS" "$NEW_JITSI_CONFIG" ;then
87-
echo "org.ice4j.ice.harvest.DISABLE_AWS_HARVESTER=true" >> $NEW_JITSI_CONFIG
88-
echo "org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=meet-jit-si-turnrelay.jitsi.net:443" >> $NEW_JITSI_CONFIG
89-
fi
90-
91-
if ! grep -q "org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS" "$NEW_JITSI_CONFIG" ;then
92-
echo "org.jitsi.videobridge.ENABLE_STATISTICS=true" >> $NEW_JITSI_CONFIG
93-
echo "org.jitsi.videobridge.STATISTICS_TRANSPORT=muc" >> $NEW_JITSI_CONFIG
94-
echo "org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=localhost" >> $NEW_JITSI_CONFIG
95-
echo "org.jitsi.videobridge.xmpp.user.shard.DOMAIN=auth.$JVB_HOSTNAME" >> $NEW_JITSI_CONFIG
96-
echo "org.jitsi.videobridge.xmpp.user.shard.USERNAME=jvb" >> $NEW_JITSI_CONFIG
97-
echo "org.jitsi.videobridge.xmpp.user.shard.PASSWORD=$JVB_SECRET" >> $NEW_JITSI_CONFIG
98-
echo "org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=JvbBrewery@internal.auth.$JVB_HOSTNAME" >> $NEW_JITSI_CONFIG
99-
echo "org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME=$(uuidgen)" >> $NEW_JITSI_CONFIG
100-
fi
101-
10273
if [ ! -f $HOCON_CONFIG ]; then
103-
echo "Generating an empty hocon config"
74+
echo "Generating a default hocon config"
10475
echo "videobridge {
10576
http-servers {
10677
public {
@@ -112,6 +83,28 @@ case "$1" in
11283
domain = \"$JVB_HOSTNAME:443\"
11384
tls = true
11485
}
86+
apis.xmpp-client.configs {
87+
shard {
88+
HOSTNAME=localhost
89+
DOMAIN=\"auth.$JVB_HOSTNAME\"
90+
USERNAME=jvb
91+
PASSWORD=$JVB_SECRET
92+
MUC_JIDS=\"jvbbrewery@internal.auth.$JVB_HOSTNAME\"
93+
MUC_NICKNAME=$(uuidgen)
94+
}
95+
}
96+
}
97+
ice4j {
98+
harvest {
99+
mapping {
100+
aws {
101+
enabled = false
102+
}
103+
stun {
104+
addresses = [\"meet-jit-si-turnrelay.jitsi.net:443\"]
105+
}
106+
}
107+
}
115108
}" >> $HOCON_CONFIG
116109
fi
117110

0 commit comments

Comments
 (0)