-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add scripts for deploying coturn with certbot
- Loading branch information
1 parent
48cdc66
commit d6b2718
Showing
3 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
COTURN_CERT_DIR="/etc/coturn/certs" | ||
|
||
# create a directory to store certs if it does not exists | ||
if [ ! -d "$COTURN_CERT_DIR" ]; then | ||
mkdir -p /etc/coturn/certs | ||
chown -R turnserver:turnserver /etc/coturn/ | ||
chmod -R 700 /etc/coturn/ | ||
fi | ||
|
||
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" | ||
|
||
;; | ||
esac | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters