#!/bin/bash

JITSI_FQDN=$1

cat << EOF | sudo debconf-set-selections
jitsi-videobridge   jitsi-videobridge/jvb-hostname  string  "${JITSI_FQDN}"
jitsi-meet  jitsi-meet/jvb-serve    boolean false
jitsi-meet-prosody  jitsi-videobridge/jvb-hostname  string  "${JITSI_FQDN}"
jitsi-meet-web-config   jitsi-meet/cert-choice  select  I want to use my own certificate
jitsi-meet-web-config   jitsi-meet/cert-path-crt    string  /etc/ssl/"${JITSI_FQDN}".crt
jitsi-meet-web-config   jitsi-meet/cert-path-key    string  /etc/ssl/"${JITSI_FQDN}".key
EOF