diff --git a/type/__jitsi_meet/explorer/jicofo-authpassword b/type/__jitsi_meet/explorer/jicofo-authpassword new file mode 100755 index 0000000..c71a969 --- /dev/null +++ b/type/__jitsi_meet/explorer/jicofo-authpassword @@ -0,0 +1,26 @@ +#!/bin/sh -eu + +JICOFO_AUTHPASSWORD="" +# We need this to properly configure jicofo + +# Default to reading debconf +DEBCONF_PASS_FILE="/var/cache/debconf/passwords.dat" +if [ -f "${DEBCONF_PASS_FILE}" ]; then + JICOFO_AUTHPASSWORD="$(grep -A1 'Template: jicofo/jicofo-authpassword' "${DEBCONF_PASS_FILE}" | tail -n 1 | cut -d ' ' -f 2-)" +fi + +# Try jicofo.conf if necessary +JICOFO_CONF_FILE="/etc/jitsi/jicofo/jicofo.conf" +if [ -z "${JICOFO_AUTHPASSWORD}" ] && [ -f "${JICOFO_CONF_FILE}" ]; then + JICOFO_AUTHPASSWORD="$(grep -E '^[[:space:]]*password:' "${JICOFO_CONF_FILE}" | sed -E 's!^[^:]*:[[:space:]]*"(.*)"$!\1!')" +fi + +# And fallback to config file if necessary +JICOFO_CONFIG_FILE="/etc/jitsi/jicofo/config" +if [ -z "${JICOFO_AUTHPASSWORD}" ] && [ -f "${JICOFO_CONFIG_FILE}" ]; then + JICOFO_AUTHPASSWORD="$(grep -E '^JICOFO_AUTH_PASSWORD=' "${JICOFO_CONFIG_FILE}" | cut -d '=' -f 2-)" +fi + +# If we didn't find it, this is likely a new installation and we'll generate +# the password on the manifest +echo "${JICOFO_AUTHPASSWORD:-}" diff --git a/type/__jitsi_meet/files/debconf_settings.sh b/type/__jitsi_meet/files/debconf_settings.sh index 9e358f0..f246c07 100644 --- a/type/__jitsi_meet/files/debconf_settings.sh +++ b/type/__jitsi_meet/files/debconf_settings.sh @@ -5,9 +5,6 @@ if false; then # We are currently not using these, just here as documentation DEBCONF_SETTINGS="$(cat <'; +var subdomain = ''; + +if (subdomain) { + subdomain = subdomain.substr(0, subdomain.length - 1).split('.') + .join('_') + .toLowerCase() + '.'; +} + +// In case of no ssi provided by the webserver, use empty strings +if (subdir.startsWith(''; +var subdomain = ''; + +if (subdomain) { + subdomain = subdomain.substr(0, subdomain.length - 1).split('.') + .join('_') + .toLowerCase() + '.'; +} + +// In case of no ssi provided by the webserver, use empty strings +if (subdir.startsWith('