Fixes SSL debconf questions.
This commit is contained in:
parent
f0a237d537
commit
c5edb4b5a3
|
@ -6,11 +6,3 @@
|
|||
# certificate type choice
|
||||
db_input critical jitsi-meet/cert-choice || true
|
||||
db_go
|
||||
|
||||
# ssl key file path
|
||||
#db_input critical jitsi-meet/cert-path-key || true
|
||||
#db_go
|
||||
|
||||
# ssl cert file path
|
||||
#db_input critical jitsi-meet/cert-path-crt || true
|
||||
#db_go
|
||||
|
|
|
@ -44,20 +44,24 @@ case "$1" in
|
|||
# self-signed certificate is already in place for prosody
|
||||
:
|
||||
elif [ "$CERT_CHOICE" = 'I have a certificate and will upload the files on the server' ]; then
|
||||
db_fset jitsi-meet/default-key "/etc/ssl/$JVB_HOSTNAME.key"
|
||||
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
|
||||
CERT_KEY="$RET"
|
||||
db_fset jitsi-meet/default-crt "/etc/ssl/$JVB_HOSTNAME.crt"
|
||||
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
|
||||
CERT_CRT="$RET"
|
||||
# replace self-signed certificate paths with user provided ones
|
||||
sed -i "s/ssl_certificate_key\ \/var\/lib\/prosody\/(.*)key/ssl_certificate_key\ $CERT_KEY/g" \
|
||||
CERT_KEY_ESC=$(echo $CERT_KEY | sed 's/\./\\\./g')
|
||||
CERT_KEY_ESC=$(echo $CERT_KEY_ESC | sed 's/\//\\\//g')
|
||||
sed -i "s/ssl_certificate_key\ \/var\/lib\/prosody\/.*key/ssl_certificate_key\ $CERT_KEY_ESC/g" \
|
||||
/etc/nginx/sites-available/$JVB_HOSTNAME.conf
|
||||
sed -i "s/ssl_certificate\ \/var\/lib\/prosody\/(.*)crt/ssl_certificate\ $CERT_CRT/g" \
|
||||
CERT_CRT_ESC=$(echo $CERT_CRT | sed 's/\./\\\./g')
|
||||
CERT_CRT_ESC=$(echo $CERT_CRT_ESC | sed 's/\//\\\//g')
|
||||
sed -i "s/ssl_certificate\ \/var\/lib\/prosody\/.*crt/ssl_certificate\ $CERT_CRT_ESC/g" \
|
||||
/etc/nginx/sites-available/$JVB_HOSTNAME.conf
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue