Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fixes purging configuration.

Damian Minkov8f9c6de0b658
diff --git a/debian/jitsi-meet.postinst b/debian/jitsi-meet.postinst
index 487bcbb2d8..3a07287db5 100644
--- a/debian/jitsi-meet.postinst
+++ b/debian/jitsi-meet.postinst
@@ -22,6 +22,12 @@ case "$1" in
. /etc/default/jitsi-videobridge
+ # loading debconf
+ . /usr/share/debconf/confmodule
+
+ # stores the hostname so we will reuse it later, like in purge
+ db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME
+
# nginx conf
if [ ! -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf ]; then
cp /usr/share/doc/jitsi-meet/jitsi-meet.example /etc/nginx/sites-available/$JVB_HOSTNAME.conf
@@ -36,9 +42,6 @@ case "$1" in
fi
if [ ! -f /etc/ssl/$JVB_HOSTNAME.key ] || [ ! -f /etc/ssl/$JVB_HOSTNAME.crt ]; then
- # loading debconf
- . /usr/share/debconf/confmodule
-
# SSL for nginx
db_get jitsi-meet/cert-choice
CERT_CHOICE="$RET"
@@ -63,9 +66,6 @@ case "$1" in
sed -i "s/ssl_certificate\ \/var\/lib\/prosody\/.*crt/ssl_certificate\ $CERT_CRT_ESC/g" \
/etc/nginx/sites-available/$JVB_HOSTNAME.conf
fi
-
- # and we're done with debconf
- db_stop
fi
# jitsi meet
@@ -75,6 +75,9 @@ case "$1" in
sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $JITSI_MEET_CONFIG
fi
+ # and we're done with debconf
+ db_stop
+
invoke-rc.d nginx reload
;;
diff --git a/debian/jitsi-meet.postrm b/debian/jitsi-meet.postrm
index 69de75d3ac..c36fcb9d57 100644
--- a/debian/jitsi-meet.postrm
+++ b/debian/jitsi-meet.postrm
@@ -28,8 +28,17 @@ case "$1" in
invoke-rc.d nginx reload
fi
;;
-
- purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ purge)
+ db_get jitsi-meet/jvb-hostname
+ JVB_HOSTNAME=$RET
+ if [ -n "$RET" ]; then
+ #. /etc/default/jitsi-videobridge
+ rm -f /etc/jitsi/meet/$JVB_HOSTNAME-config.js
+ rm -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf
+ rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf
+ fi
+ ;;
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
diff --git a/debian/jitsi-meet.templates b/debian/jitsi-meet.templates
index 030da8daf2..59f502ba8f 100644
--- a/debian/jitsi-meet.templates
+++ b/debian/jitsi-meet.templates
@@ -21,3 +21,9 @@ Default: ${default-crt}
_Description: Full local server path to the SSL certificate file:
The full path to the SSL certificate file on the server.
If you haven't uploaded it, now is a good time to upload it in another console.
+
+Template: jitsi-meet/jvb-hostname
+Type: string
+Default: ${default-key}
+_Description: The hostname of the current installation:
+ The value for the hostname that is set in Jitsi Videobridge installation.
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
index 9a10a70f28..ad43bd3353 100644
--- a/debian/po/templates.pot
+++ b/debian/po/templates.pot
@@ -73,3 +73,17 @@ msgid ""
"The full path to the SSL certificate file on the server. If you haven't "
"uploaded it, now is a good time to upload it in another console."
msgstr ""
+
+
+#. Type: string
+#. Description
+#: ../jitsi-meet.templates:4001
+msgid "The hostname of the current installation:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../jitsi-meet.templates:4001
+msgid ""
+"The value for the hostname that is set in Jitsi Videobridge installation."
+msgstr ""