瀏覽代碼

fix(debian): Improves handling db_get.

master
damencho 4 年之前
父節點
當前提交
5ac30262a5
共有 1 個檔案被更改,包括 10 行新增3 行删除
  1. 10
    3
      debian/jitsi-meet-web-config.postinst

+ 10
- 3
debian/jitsi-meet-web-config.postinst 查看文件

45
 
45
 
46
         JVB_SERVE="false"
46
         JVB_SERVE="false"
47
         # this detect only old installations
47
         # this detect only old installations
48
+        RET=""
48
         db_get jitsi-meet/jvb-serve || true
49
         db_get jitsi-meet/jvb-serve || true
49
-        if [ -n "$RET" ] && [ "$RET" = "true" ] ; then
50
+        if [ "$RET" = "true" ] ; then
50
             JVB_SERVE="true"
51
             JVB_SERVE="true"
51
         fi
52
         fi
52
 
53
 
69
             FORCE_APACHE="true"
70
             FORCE_APACHE="true"
70
         fi
71
         fi
71
         # In case user enforces apache and if apache is available, unset nginx.
72
         # In case user enforces apache and if apache is available, unset nginx.
73
+        RET=""
72
         db_get jitsi-meet/enforce_apache || RET="false"
74
         db_get jitsi-meet/enforce_apache || RET="false"
73
-        if [ -n "$RET" ] && [ "$RET" = "true" ] \
74
-            && [ "$FORCE_APACHE" = "true" ]; then
75
+        if [ "$RET" = "true" ] && [ "$FORCE_APACHE" = "true" ]; then
75
             FORCE_NGINX="false"
76
             FORCE_NGINX="false"
76
         fi
77
         fi
77
 
78
 
78
         UPLOADED_CERT_CHOICE="I want to use my own certificate"
79
         UPLOADED_CERT_CHOICE="I want to use my own certificate"
79
         # if first time config ask for certs, or if we are reconfiguring
80
         # if first time config ask for certs, or if we are reconfiguring
80
         if [ -z "$JVB_HOSTNAME_OLD" ] || [ "$RECONFIGURING" = "true" ] ; then
81
         if [ -z "$JVB_HOSTNAME_OLD" ] || [ "$RECONFIGURING" = "true" ] ; then
82
+            RET=""
81
             db_get jitsi-meet/cert-choice
83
             db_get jitsi-meet/cert-choice
82
             CERT_CHOICE="$RET"
84
             CERT_CHOICE="$RET"
83
 
85
 
84
             if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
86
             if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
87
+                RET=""
85
                 db_get jitsi-meet/cert-path-key
88
                 db_get jitsi-meet/cert-path-key
86
                 if [ -z "$RET" ] ; then
89
                 if [ -z "$RET" ] ; then
87
                     db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
90
                     db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
90
                     db_get jitsi-meet/cert-path-key
93
                     db_get jitsi-meet/cert-path-key
91
                 fi
94
                 fi
92
                 CERT_KEY="$RET"
95
                 CERT_KEY="$RET"
96
+                RET=""
93
                 db_get jitsi-meet/cert-path-crt
97
                 db_get jitsi-meet/cert-path-crt
94
                 if [ -z "$RET" ] ; then
98
                 if [ -z "$RET" ] ; then
95
                     db_set jitsi-meet/cert-path-crt "/etc/ssl/$JVB_HOSTNAME.crt"
99
                     db_set jitsi-meet/cert-path-crt "/etc/ssl/$JVB_HOSTNAME.crt"
152
                 # Removing this value will force nginx or apache to be locally configured
156
                 # Removing this value will force nginx or apache to be locally configured
153
                 JVB_HOSTNAME_OLD=""
157
                 JVB_HOSTNAME_OLD=""
154
 
158
 
159
+                RET=""
155
                 db_get jitsi-meet/cert-choice
160
                 db_get jitsi-meet/cert-choice
156
                 CERT_CHOICE="$RET"
161
                 CERT_CHOICE="$RET"
157
                 # Fix certs on upgrade from jetty
162
                 # Fix certs on upgrade from jetty
158
                 if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
163
                 if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
164
+                    RET=""
159
                     db_get jitsi-meet/cert-path-key
165
                     db_get jitsi-meet/cert-path-key
160
                     CERT_KEY="$RET"
166
                     CERT_KEY="$RET"
167
+                    RET=""
161
                     db_get jitsi-meet/cert-path-crt
168
                     db_get jitsi-meet/cert-path-crt
162
                     CERT_CRT="$RET"
169
                     CERT_CRT="$RET"
163
                 else
170
                 else

Loading…
取消
儲存