浏览代码

Fixes debconf questions for SSL.

j8
turint 10 年前
父节点
当前提交
f0a237d537
共有 2 个文件被更改,包括 22 次插入2 次删除
  1. 16
    0
      debian/jitsi-meet.config
  2. 6
    2
      debian/jitsi-meet.postinst

+ 16
- 0
debian/jitsi-meet.config 查看文件

@@ -0,0 +1,16 @@
1
+#!/bin/sh -e
2
+
3
+# Source debconf library.
4
+. /usr/share/debconf/confmodule
5
+
6
+# certificate type choice
7
+db_input critical jitsi-meet/cert-choice || true
8
+db_go
9
+
10
+# ssl key file path
11
+#db_input critical jitsi-meet/cert-path-key || true
12
+#db_go
13
+
14
+# ssl cert file path
15
+#db_input critical jitsi-meet/cert-path-crt || true
16
+#db_go

+ 6
- 2
debian/jitsi-meet.postinst 查看文件

@@ -45,15 +45,19 @@ case "$1" in
45 45
             :
46 46
         elif [ "$CERT_CHOICE" = 'I have a certificate and will upload the files on the server' ]; then
47 47
             db_fset jitsi-meet/default-key "/etc/ssl/$JVB_HOSTNAME.key"
48
+            db_input critical jitsi-meet/cert-path-key || true
49
+            db_go
48 50
             db_get jitsi-meet/cert-path-key
49 51
             CERT_KEY="$RET"
50 52
             db_fset jitsi-meet/default-crt "/etc/ssl/$JVB_HOSTNAME.crt"
53
+            db_input critical jitsi-meet/cert-path-crt || true
54
+            db_go
51 55
             db_get jitsi-meet/cert-path-crt
52 56
             CERT_CRT="$RET"
53 57
             # replace self-signed certificate paths with user provided ones
54
-            sed -i "s/ssl_certificate_key\ /var/lib/prosody/(.*)key;/ssl_certificate_key\ $CERT_KEY;/g" \
58
+            sed -i "s/ssl_certificate_key\ \/var\/lib\/prosody\/(.*)key/ssl_certificate_key\ $CERT_KEY/g" \
55 59
                 /etc/nginx/sites-available/$JVB_HOSTNAME.conf
56
-            sed -i "s/ssl_certificate\ /var/lib/prosody/(.*)crt;/ssl_certificate\ $CERT_CRT;/g" \
60
+            sed -i "s/ssl_certificate\ \/var\/lib\/prosody\/(.*)crt/ssl_certificate\ $CERT_CRT/g" \
57 61
                 /etc/nginx/sites-available/$JVB_HOSTNAME.conf
58 62
         fi
59 63
 

正在加载...
取消
保存