Ver código fonte

Removes some links when reconfiguring.

master
Damian Minkov 10 anos atrás
pai
commit
bc5565251c
2 arquivos alterados com 17 adições e 0 exclusões
  1. 9
    0
      debian/jitsi-meet-prosody.postinst
  2. 8
    0
      debian/jitsi-meet.postinst

+ 9
- 0
debian/jitsi-meet-prosody.postinst Ver arquivo

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

+ 8
- 0
debian/jitsi-meet.postinst Ver arquivo

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

Carregando…
Cancelar
Salvar