Fixes purging configuration.

This commit is contained in:
Damian Minkov 2014-10-23 11:00:48 +03:00
parent 380cdcdd65
commit 8f9c6de0b6
4 changed files with 40 additions and 8 deletions

View File

@ -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
;;

View File

@ -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)
;;
*)

View File

@ -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.

View File

@ -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 ""