mirror of https://github.com/jitsi/jitsi-meet
debian: updates around coturn package and order of install (#5729)
* debian: Update coturn udp port to non-privileged one. * debian: Turnserver config requires jitsi-meet-web-config files. * doc: Updates doc, removing `--no-install-recommends`. * debian: Moves checks and configs to default to prosody 0.11. * debian: Disable room locking on internal muc. * add scripts for deploying coturn with certbot * turnserver: Removes unused variable showing error. * debian: updates let's encrypt and coturn scripts. * debian: Detect failure to retrieve external ip address. * debian: Always configure turn when the turnserver package is installed. Co-authored-by: Julien Fastré <julien.fastre@champs-libres.coop>pull/5807/head stable/jitsi-meet_4416
parent
0b0a19ea5c
commit
ffdd4f2eed
@ -1,2 +1,3 @@ |
||||
doc/debian/jitsi-meet-turn/turnserver.conf /usr/share/jitsi-meet-turnserver/ |
||||
doc/debian/jitsi-meet/jitsi-meet.conf /usr/share/jitsi-meet-turnserver/ |
||||
doc/debian/jitsi-meet-turn/turnserver.conf /usr/share/jitsi-meet-turnserver/ |
||||
doc/debian/jitsi-meet/jitsi-meet.conf /usr/share/jitsi-meet-turnserver/ |
||||
doc/debian/jitsi-meet-turn/coturn-certbot-deploy.sh /usr/share/jitsi-meet-turnserver/ |
||||
|
@ -0,0 +1,45 @@ |
||||
#!/bin/sh |
||||
|
||||
set -e |
||||
|
||||
COTURN_CERT_DIR="/etc/coturn/certs" |
||||
TURN_CONFIG="/etc/turnserver.conf" |
||||
|
||||
# create a directory to store certs if it does not exists |
||||
if [ ! -d "$COTURN_CERT_DIR" ]; then |
||||
mkdir -p $COTURN_CERT_DIR |
||||
chown -R turnserver:turnserver /etc/coturn/ |
||||
chmod -R 700 /etc/coturn/ |
||||
fi |
||||
|
||||
# This is a template and when copied to /etc/letsencrypt/renewal-hooks/deploy/ |
||||
# during creating the Let's encrypt certs script |
||||
# jitsi-meet.example.com will be replaced with the real domain of deployment |
||||
for domain in $RENEWED_DOMAINS; do |
||||
case $domain in |
||||
jitsi-meet.example.com) |
||||
# Make sure the certificate and private key files are |
||||
# never world readable, even just for an instant while |
||||
# we're copying them into daemon_cert_root. |
||||
umask 077 |
||||
|
||||
cp "$RENEWED_LINEAGE/fullchain.pem" "$COTURN_CERT_DIR/$domain.fullchain.pem" |
||||
cp "$RENEWED_LINEAGE/privkey.pem" "$COTURN_CERT_DIR/$domain.privkey.pem" |
||||
|
||||
# Apply the proper file ownership and permissions for |
||||
# the daemon to read its certificate and key. |
||||
chown turnserver "$COTURN_CERT_DIR/$domain.fullchain.pem" \ |
||||
"$COTURN_CERT_DIR/$domain.privkey.pem" |
||||
chmod 400 "$COTURN_CERT_DIR/$domain.fullchain.pem" \ |
||||
"$COTURN_CERT_DIR/$domain.privkey.pem" |
||||
|
||||
if [ -f $TURN_CONFIG ] && grep -q "jitsi-meet coturn config" "$TURN_CONFIG" ; then |
||||
echo "Configuring turnserver" |
||||
sed -i "/^cert/c\cert=\/etc\/coturn\/certs\/${domain}.fullchain.pem" $TURN_CONFIG |
||||
sed -i "/^pkey/c\pkey=\/etc\/coturn\/certs\/${domain}.privkey.pem" $TURN_CONFIG |
||||
fi |
||||
service coturn restart |
||||
;; |
||||
esac |
||||
done |
||||
|
Loading…
Reference in new issue