Removes some links when reconfiguring.

This commit is contained in:
Damian Minkov 2015-03-16 17:54:36 +02:00
parent 4f548ce748
commit bc5565251c
2 changed files with 17 additions and 0 deletions

View File

@ -28,6 +28,15 @@ case "$1" in
# loading debconf # loading debconf
. /usr/share/debconf/confmodule . /usr/share/debconf/confmodule
# detect dpkg-reconfigure, just delete old links
db_get jitsi-meet/jvb-hostname
JVB_HOSTNAME_OLD=$RET
if [ -n "$RET" ] && [ ! "$JVB_HOSTNAME_OLD" = "$JVB_HOSTNAME" ] ; then
rm -f /etc/prosody/conf.d/$JVB_HOSTNAME_OLD.cfg.lua
rm -f /etc/prosody/certs/$JVB_HOSTNAME_OLD.key
rm -f /etc/prosody/certs/$JVB_HOSTNAME_OLD.crt
fi
# stores the hostname so we will reuse it later, like in purge # stores the hostname so we will reuse it later, like in purge
db_set jitsi-meet-prosody/jvb-hostname $JVB_HOSTNAME db_set jitsi-meet-prosody/jvb-hostname $JVB_HOSTNAME

View File

@ -25,6 +25,14 @@ case "$1" in
# loading debconf # loading debconf
. /usr/share/debconf/confmodule . /usr/share/debconf/confmodule
# detect dpkg-reconfigure, just delete old links
db_get jitsi-meet/jvb-hostname
JVB_HOSTNAME_OLD=$RET
if [ -n "$RET" ] && [ ! "$JVB_HOSTNAME_OLD" = "$JVB_HOSTNAME" ] ; then
rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME_OLD.conf
rm -f /etc/jitsi/meet/$JVB_HOSTNAME_OLD-config.js
fi
# stores the hostname so we will reuse it later, like in purge # stores the hostname so we will reuse it later, like in purge
db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME