From 4a3ff8ce2c163bfdaa6ac2ffd49306f65304541c Mon Sep 17 00:00:00 2001 From: Jakob Pfeiffer Date: Mon, 4 Jan 2021 15:22:27 +0100 Subject: [PATCH] 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 --- debian/jitsi-meet-web-config.postinst | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/debian/jitsi-meet-web-config.postinst b/debian/jitsi-meet-web-config.postinst index c5199ae59a..a5d1ce461e 100644 --- a/debian/jitsi-meet-web-config.postinst +++ b/debian/jitsi-meet-web-config.postinst @@ -30,6 +30,7 @@ case "$1" in db_set jitsi-videobridge/jvb-hostname "localhost" db_input critical jitsi-videobridge/jvb-hostname || true db_go + db_get jitsi-videobridge/jvb-hostname fi JVB_HOSTNAME="$RET" @@ -75,15 +76,21 @@ case "$1" in CERT_CHOICE="$RET" if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then - db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key" - db_input critical jitsi-meet/cert-path-key || true - db_go db_get jitsi-meet/cert-path-key + if [ -z "$RET" ] ; then + db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key" + db_input critical jitsi-meet/cert-path-key || true + db_go + db_get jitsi-meet/cert-path-key + fi CERT_KEY="$RET" - db_set jitsi-meet/cert-path-crt "/etc/ssl/$JVB_HOSTNAME.crt" - db_input critical jitsi-meet/cert-path-crt || true - db_go db_get jitsi-meet/cert-path-crt + if [ -z "$RET" ] ; then + db_set jitsi-meet/cert-path-crt "/etc/ssl/$JVB_HOSTNAME.crt" + db_input critical jitsi-meet/cert-path-crt || true + db_go + db_get jitsi-meet/cert-path-crt + fi CERT_CRT="$RET" else # create self-signed certs