Initial commit
This commit is contained in:
96
README.authentication
Normal file
96
README.authentication
Normal file
@ -0,0 +1,96 @@
|
||||
# ============================================================================
|
||||
# Enable authentication for Jitsi
|
||||
#
|
||||
# Self-hosted Jitsi server with authentication
|
||||
# - https://dev.to/noandrea/self-hosted-jitsi-server-with-authentication-ie7
|
||||
#
|
||||
# see also:
|
||||
# - https://github.com/jitsi/jitsi-meet/blob/master/doc/quick-install.md
|
||||
#
|
||||
# - https://github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md
|
||||
# i============================================================================
|
||||
|
||||
FQND_HOSTNAME="meet.oopen.de"
|
||||
FQND_HOSTNAME="meet.faire-mobilitaet.de"
|
||||
|
||||
cp /etc/jitsi/meet/${FQND_HOSTNAME}-config.js /etc/jitsi/meet/${FQND_HOSTNAME}-config.js.ORIG
|
||||
cp /etc/prosody/conf.avail/${FQND_HOSTNAME}.cfg.lua /etc/prosody/conf.avail/${FQND_HOSTNAME}.cfg.lua.ORIG
|
||||
cp /etc/jitsi/jicofo/sip-communicator.properties /etc/jitsi/jicofo/sip-communicator.properties.ORIG
|
||||
|
||||
|
||||
# --
|
||||
# file: /etc/jitsi/meet/${FQND_HOSTNAME}-config.js
|
||||
# --
|
||||
|
||||
# Section 'host'
|
||||
#
|
||||
# anonymousdomain: 'guest.${FQND_HOSTNAME},
|
||||
#
|
||||
if ! $(grep -q -E "^\s*anonymousdomain:\s+'guest.${FQND_HOSTNAME}'\s*," \
|
||||
/etc/jitsi/meet/${FQND_HOSTNAME}-config.js 2>/dev/null); then
|
||||
perl -i -n -p -e "s#^((\s*)// anonymousdomain:.*)#\1\n\2anonymousdomain: 'guest.${FQND_HOSTNAME}',#" \
|
||||
/etc/jitsi/meet/${FQND_HOSTNAME}-config.js
|
||||
fi
|
||||
|
||||
# Section 'host'
|
||||
#
|
||||
# authdomain: 'guest.${FQND_HOSTNAME},
|
||||
#
|
||||
if ! $(grep -q -E "^\s*authdomain:\s+'${FQND_HOSTNAME}'\s*," \
|
||||
/etc/jitsi/meet/${FQND_HOSTNAME}-config.js 2>/dev/null); then
|
||||
perl -i -n -p -e "s#^((\s*)// authdomain:.*)#\1\n\2authdomain: '${FQND_HOSTNAME}',#" \
|
||||
/etc/jitsi/meet/${FQND_HOSTNAME}-config.js
|
||||
fi
|
||||
|
||||
|
||||
# root Section (var config = {)
|
||||
#
|
||||
# Enable:
|
||||
#
|
||||
# requireDisplayName: true,
|
||||
#
|
||||
if ! $(grep -q -E "^\s*requireDisplayName:\s+true\s*," \
|
||||
/etc/jitsi/meet/${FQND_HOSTNAME}-config.js 2>/dev/null); then
|
||||
perl -i -n -p -e "s#^((\s*)// requireDisplayName:.*)#\1\n\2requireDisplayName: true,#" \
|
||||
/etc/jitsi/meet/${FQND_HOSTNAME}-config.js
|
||||
fi
|
||||
|
||||
|
||||
# ---
|
||||
# file: /etc/prosody/conf.avail/${FQND_HOSTNAME}.cfg.lua
|
||||
# ---
|
||||
|
||||
|
||||
# Root section of 'VirtualHost "${FQND_HOSTNAME}"'
|
||||
#
|
||||
# authentication = "internal_plain"
|
||||
#
|
||||
if $(grep -q -E "^\s*authentication\s+=\s+\"anonymous\"" \
|
||||
/etc/prosody/conf.avail/${FQND_HOSTNAME}.cfg.lua 2>/dev/null); then
|
||||
perl -i -n -p -e "s/^(\s*)(authentication\s*=\s*\"anonymous\")/\1--\2\n\1authentication = \"internal_plain\"/" \
|
||||
/etc/prosody/conf.avail/${FQND_HOSTNAME}.cfg.lua
|
||||
fi
|
||||
|
||||
|
||||
# Add Section 'VirtualHost "guest.${FQND_HOSTNAME}""
|
||||
#
|
||||
if ! $(grep -q -E "^\s*VirtualHost \"guest.${FQND_HOSTNAME}\"" \
|
||||
/etc/prosody/conf.avail/${FQND_HOSTNAME}.cfg.lua 2>/dev/null); then
|
||||
cat <<EOF >> /etc/prosody/conf.avail/${FQND_HOSTNAME}.cfg.lua
|
||||
|
||||
VirtualHost "guest.${FQND_HOSTNAME}"
|
||||
authentication = "anonymous"
|
||||
c2s_require_encryption = false
|
||||
EOF
|
||||
fi
|
||||
|
||||
# ---
|
||||
# file: /etc/jitsi/jicofo/sip-communicator.properties
|
||||
# ---
|
||||
|
||||
if ! $(grep -q -E "^\s*org.jitsi.jicofo.auth.URL\s*=\s*XMPP:${FQND_HOSTNAME}" \
|
||||
/etc/jitsi/jicofo/sip-communicator.properties 2>/dev/null); then
|
||||
cat <<EOF >> /etc/jitsi/jicofo/sip-communicator.properties
|
||||
org.jitsi.jicofo.auth.URL=XMPP:${FQND_HOSTNAME}
|
||||
EOF
|
||||
fi
|
Reference in New Issue
Block a user