|
|
|
@ -17,7 +17,6 @@ set -e |
|
|
|
|
# for details, see http://www.debian.org/doc/debian-policy/ or |
|
|
|
|
# the debian-policy package |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "$1" in |
|
|
|
|
configure) |
|
|
|
|
|
|
|
|
@ -35,6 +34,31 @@ case "$1" in |
|
|
|
|
sed -i "s/#\ server_names_hash_bucket_size\ 64/\ server_names_hash_bucket_size\ 64/" /etc/nginx/nginx.conf |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# loading debconf |
|
|
|
|
. /usr/share/debconf/confmodule |
|
|
|
|
|
|
|
|
|
# SSL for nginx |
|
|
|
|
db_get jitsi-meet/cert-choice |
|
|
|
|
CERT_CHOICE="$RET" |
|
|
|
|
if [ "$CERT_CHOICE" == 'I want a generated self-signed certificate' ]; then |
|
|
|
|
# self-signed certificate is already in place for prosody |
|
|
|
|
elif [ "$CERT_CHOICE" == 'I have a certificate and will upload the files on the server' ]; then |
|
|
|
|
db_fset jitsi-meet/default-key "/etc/ssl/$JVB_HOSTNAME.key" |
|
|
|
|
db_get jitsi-meet/cert-path-key |
|
|
|
|
CERT_KEY="$RET" |
|
|
|
|
db_fset jitsi-meet/default-crt "/etc/ssl/$JVB_HOSTNAME.crt" |
|
|
|
|
db_get jitsi-meet/cert-path-crt |
|
|
|
|
CERT_CRT="$RET" |
|
|
|
|
# replace self-signed certificate paths with user provided ones |
|
|
|
|
sed -i "s/ssl_certificate_key\ /var/lib/prosody/(.*)key;/ssl_certificate_key\ $CERT_KEY;/g" \ |
|
|
|
|
/etc/nginx/sites-available/$JVB_HOSTNAME.conf |
|
|
|
|
sed -i "s/ssl_certificate\ /var/lib/prosody/(.*)crt;/ssl_certificate\ $CERT_CRT;/g" \ |
|
|
|
|
/etc/nginx/sites-available/$JVB_HOSTNAME.conf |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# and we're done with debconf |
|
|
|
|
db_stop |
|
|
|
|
|
|
|
|
|
# jitsi meet |
|
|
|
|
chown -R www-data:www-data /usr/share/jitsi-meet/ |
|
|
|
|
sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" /usr/share/jitsi-meet/config.js |
|
|
|
|