浏览代码

Removes some links when reconfiguring.

master
Damian Minkov 10 年前
父节点
当前提交
bc5565251c
共有 2 个文件被更改,包括 17 次插入0 次删除
  1. 9
    0
      debian/jitsi-meet-prosody.postinst
  2. 8
    0
      debian/jitsi-meet.postinst

+ 9
- 0
debian/jitsi-meet-prosody.postinst 查看文件

28
         # loading debconf
28
         # loading debconf
29
         . /usr/share/debconf/confmodule
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
         # stores the hostname so we will reuse it later, like in purge
40
         # stores the hostname so we will reuse it later, like in purge
32
         db_set jitsi-meet-prosody/jvb-hostname $JVB_HOSTNAME
41
         db_set jitsi-meet-prosody/jvb-hostname $JVB_HOSTNAME
33
 
42
 

+ 8
- 0
debian/jitsi-meet.postinst 查看文件

25
         # loading debconf
25
         # loading debconf
26
         . /usr/share/debconf/confmodule
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
         # stores the hostname so we will reuse it later, like in purge
36
         # stores the hostname so we will reuse it later, like in purge
29
         db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME
37
         db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME
30
 
38
 

正在加载...
取消
保存