Browse Source

fix(jitsi-meet-web-config.postinst) allow cert and key pre-selection (#8319)

* fix(jitsi-meet-web-config.postinst) allow cert and key pre-selection

* fix(jitsi-meet-web-config.postinst) jvb-hostname gets value from db_go instead of db_get

Co-authored-by: Jakob Pfeiffer <pgp-jkp@pfeiffer.ws>
j8
Jakob Pfeiffer 4 years ago
parent
commit
4a3ff8ce2c
No account linked to committer's email address
1 changed files with 13 additions and 6 deletions
  1. 13
    6
      debian/jitsi-meet-web-config.postinst

+ 13
- 6
debian/jitsi-meet-web-config.postinst View File

30
             db_set jitsi-videobridge/jvb-hostname "localhost"
30
             db_set jitsi-videobridge/jvb-hostname "localhost"
31
             db_input critical jitsi-videobridge/jvb-hostname || true
31
             db_input critical jitsi-videobridge/jvb-hostname || true
32
             db_go
32
             db_go
33
+            db_get jitsi-videobridge/jvb-hostname
33
         fi
34
         fi
34
         JVB_HOSTNAME="$RET"
35
         JVB_HOSTNAME="$RET"
35
 
36
 
75
             CERT_CHOICE="$RET"
76
             CERT_CHOICE="$RET"
76
 
77
 
77
             if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
78
             if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
78
-                db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
79
-                db_input critical jitsi-meet/cert-path-key || true
80
-                db_go
81
                 db_get jitsi-meet/cert-path-key
79
                 db_get jitsi-meet/cert-path-key
80
+                if [ -z "$RET" ] ; then
81
+                    db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
82
+                    db_input critical jitsi-meet/cert-path-key || true
83
+                    db_go
84
+                    db_get jitsi-meet/cert-path-key
85
+                fi
82
                 CERT_KEY="$RET"
86
                 CERT_KEY="$RET"
83
-                db_set jitsi-meet/cert-path-crt "/etc/ssl/$JVB_HOSTNAME.crt"
84
-                db_input critical jitsi-meet/cert-path-crt || true
85
-                db_go
86
                 db_get jitsi-meet/cert-path-crt
87
                 db_get jitsi-meet/cert-path-crt
88
+                if [ -z "$RET" ] ; then
89
+                    db_set jitsi-meet/cert-path-crt "/etc/ssl/$JVB_HOSTNAME.crt"
90
+                    db_input critical jitsi-meet/cert-path-crt || true
91
+                    db_go
92
+                    db_get jitsi-meet/cert-path-crt
93
+                fi
87
                 CERT_CRT="$RET"
94
                 CERT_CRT="$RET"
88
             else
95
             else
89
                 # create self-signed certs
96
                 # create self-signed certs

Loading…
Cancel
Save