Переглянути джерело

Fixes purging configuration.

j8
Damian Minkov 10 роки тому
джерело
коміт
8f9c6de0b6

+ 9
- 6
debian/jitsi-meet.postinst Переглянути файл

@@ -22,6 +22,12 @@ case "$1" in
22 22
 
23 23
         . /etc/default/jitsi-videobridge
24 24
 
25
+        # loading debconf
26
+        . /usr/share/debconf/confmodule
27
+
28
+        # stores the hostname so we will reuse it later, like in purge
29
+        db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME
30
+
25 31
         # nginx conf
26 32
         if [ ! -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf ]; then
27 33
             cp /usr/share/doc/jitsi-meet/jitsi-meet.example /etc/nginx/sites-available/$JVB_HOSTNAME.conf
@@ -36,9 +42,6 @@ case "$1" in
36 42
         fi
37 43
 
38 44
         if [ ! -f /etc/ssl/$JVB_HOSTNAME.key ] || [ ! -f /etc/ssl/$JVB_HOSTNAME.crt ]; then
39
-            # loading debconf
40
-            . /usr/share/debconf/confmodule
41
-
42 45
             # SSL for nginx
43 46
             db_get jitsi-meet/cert-choice
44 47
             CERT_CHOICE="$RET"
@@ -63,9 +66,6 @@ case "$1" in
63 66
                 sed -i "s/ssl_certificate\ \/var\/lib\/prosody\/.*crt/ssl_certificate\ $CERT_CRT_ESC/g" \
64 67
                     /etc/nginx/sites-available/$JVB_HOSTNAME.conf
65 68
             fi
66
-
67
-            # and we're done with debconf
68
-            db_stop
69 69
         fi
70 70
 
71 71
         # jitsi meet
@@ -75,6 +75,9 @@ case "$1" in
75 75
             sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $JITSI_MEET_CONFIG
76 76
         fi
77 77
 
78
+        # and we're done with debconf
79
+        db_stop
80
+
78 81
         invoke-rc.d nginx reload
79 82
     ;;
80 83
 

+ 11
- 2
debian/jitsi-meet.postrm Переглянути файл

@@ -28,8 +28,17 @@ case "$1" in
28 28
             invoke-rc.d nginx reload
29 29
         fi
30 30
     ;;
31
-
32
-    purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
31
+    purge)
32
+        db_get jitsi-meet/jvb-hostname
33
+        JVB_HOSTNAME=$RET
34
+        if [ -n "$RET" ]; then
35
+            #. /etc/default/jitsi-videobridge
36
+            rm -f /etc/jitsi/meet/$JVB_HOSTNAME-config.js
37
+            rm -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf
38
+            rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf
39
+        fi
40
+    ;;
41
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
33 42
     ;;
34 43
 
35 44
     *)

+ 6
- 0
debian/jitsi-meet.templates Переглянути файл

@@ -21,3 +21,9 @@ Default: ${default-crt}
21 21
 _Description: Full local server path to the SSL certificate file:
22 22
  The full path to the SSL certificate file on the server.
23 23
  If you haven't uploaded it, now is a good time to upload it in another console.
24
+
25
+Template: jitsi-meet/jvb-hostname
26
+Type: string
27
+Default: ${default-key}
28
+_Description: The hostname of the current installation:
29
+ The value for the hostname that is set in Jitsi Videobridge installation.

+ 14
- 0
debian/po/templates.pot Переглянути файл

@@ -73,3 +73,17 @@ msgid ""
73 73
 "The full path to the SSL certificate file on the server. If you haven't "
74 74
 "uploaded it, now is a good time to upload it in another console."
75 75
 msgstr ""
76
+
77
+
78
+#. Type: string
79
+#. Description
80
+#: ../jitsi-meet.templates:4001
81
+msgid "The hostname of the current installation:"
82
+msgstr ""
83
+
84
+#. Type: string
85
+#. Description
86
+#: ../jitsi-meet.templates:4001
87
+msgid ""
88
+"The value for the hostname that is set in Jitsi Videobridge installation."
89
+msgstr ""

Завантаження…
Відмінити
Зберегти