From bc5565251cd45af7d65673933b4c878b903c7f4e Mon Sep 17 00:00:00 2001 From: Damian Minkov Date: Mon, 16 Mar 2015 17:54:36 +0200 Subject: [PATCH] Removes some links when reconfiguring. --- debian/jitsi-meet-prosody.postinst | 9 +++++++++ debian/jitsi-meet.postinst | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/debian/jitsi-meet-prosody.postinst b/debian/jitsi-meet-prosody.postinst index 1754a19d5..84c191661 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 c6a373d87..93f31ab58 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