diff --git a/debian/jitsi-meet-prosody.postinst b/debian/jitsi-meet-prosody.postinst index 1754a19d59..84c1916613 100644 --- a/debian/jitsi-meet-prosody.postinst +++ b/debian/jitsi-meet-prosody.postinst @@ -28,6 +28,15 @@ case "$1" in # loading debconf . /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 db_set jitsi-meet-prosody/jvb-hostname $JVB_HOSTNAME diff --git a/debian/jitsi-meet.postinst b/debian/jitsi-meet.postinst index c6a373d872..93f31ab586 100644 --- a/debian/jitsi-meet.postinst +++ b/debian/jitsi-meet.postinst @@ -25,6 +25,14 @@ case "$1" in # loading debconf . /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 db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME