1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jitsi_ynh.git synced 2024-09-03 19:35:57 +02:00

switching to the jvb user

This commit is contained in:
yalh76 2020-04-13 17:16:38 +02:00
parent c9e4ed4a4b
commit 51f7263ecc
7 changed files with 27 additions and 30 deletions

View file

@ -335,7 +335,7 @@ var config = {
// through the JVB and use the peer to peer connection instead. When a
// 3rd participant joins the conference will be moved back to the JVB
// connection.
enabled: true,
enabled: false,
// Use XEP-0215 to fetch STUN and TURN servers.
// useStunTurn: true,

View file

@ -1,14 +1,14 @@
org.jitsi.impl.neomedia.transform.srtp.SRTPCryptoContext.checkReplay=false
org.jitsi.videobridge.TCP_HARVESTER_PORT=__PORT__
org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=__PRIVATE_IPV4__
org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=__PUBLIC_IPV4__
org.ice4j.ice.harvest.DISABLE_AWS_HARVESTER=true
org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=meet-jit-si-turnrelay.jitsi.net:443
org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_TRANSPORT=muc
org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=localhost
org.jitsi.videobridge.xmpp.user.shard.DOMAIN=auth.__DOMAIN__
org.jitsi.videobridge.xmpp.user.shard.USERNAME=__JVB_USER__
org.jitsi.videobridge.xmpp.user.shard.PASSWORD=__JVB_PASSWORD__
org.jitsi.videobridge.xmpp.user.shard.USERNAME=__VIDEOBRIDGE_USER__
org.jitsi.videobridge.xmpp.user.shard.PASSWORD=__VIDEOBRIDGE_SECRET__
org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=JvbBrewery@internal.auth.__DOMAIN__
org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME=__MUC_NICKNAME__
org.jitsi.impl.neomedia.transform.srtp.SRTPCryptoContext.checkReplay=false
org.jitsi.videobridge.TCP_HARVESTER_PORT=__PORT__
org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=__PRIVATE_IPV4__
org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=__PUBLIC_IPV4__

View file

@ -1,4 +1,5 @@
component_ports = { __PORT_COMPONENT__ }
plugin_paths = { "__FINAL_PATH__/jitsi-meet-prosody/" }
-- domain mapper options, must at least have domain base set to use the mapper
@ -60,7 +61,7 @@ Component "internal.auth.__DOMAIN__" "muc"
modules_enabled = {
"ping";
}
admins = { "__FOCUS_USER__@auth.__DOMAIN__", "__JVB_USER__@auth.__DOMAIN__" }
admins = { "__FOCUS_USER__@auth.__DOMAIN__", "__VIDEOBRIDGE_USER__@auth.__DOMAIN__" }
VirtualHost "auth.__DOMAIN__"
ssl = {
@ -87,5 +88,5 @@ Component "speakerstats.__DOMAIN__" "speakerstats_component"
Component "conferenceduration.__DOMAIN__" "conference_duration_component"
muc_component = "conference.__DOMAIN__"
--Component "jitsi-videobridge.__DOMAIN__"
-- component_secret = "__VIDEOBRIDGE_SECRET__"
Component "jitsi-videobridge.__DOMAIN__"
component_secret = "__VIDEOBRIDGE_SECRET__"

View file

@ -15,7 +15,6 @@ source /usr/share/yunohost/helpers
ynh_print_info --message="Managing script failure..."
ynh_clean_setup () {
read -p "key"
ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
@ -38,11 +37,9 @@ videobridge_secret=$(ynh_string_random --length=8)
#YOURSECRET2
focus_secret=$(ynh_string_random --length=8)
focus_user="svc${app}focus"
focus_user="focus"
jvb_user="svc${app}jvb"
jvb_password=$(ynh_string_random --length=8)
videobridge_user="jvb"
muc_nickname=$(ynh_string_random --length=32)
@ -68,8 +65,7 @@ ynh_app_setting_set --app=$app --key=focus_password --value=$focus_password
ynh_app_setting_set --app=$app --key=videobridge_secret --value=$videobridge_secret
ynh_app_setting_set --app=$app --key=focus_secret --value=$focus_secret
ynh_app_setting_set --app=$app --key=focus_user --value=$focus_user
ynh_app_setting_set --app=$app --key=jvb_user --value=$jvb_user
ynh_app_setting_set --app=$app --key=jvb_password --value=$jvb_password
ynh_app_setting_set --app=$app --key=videobridge_user --value=$videobridge_user
ynh_app_setting_set --app=$app --key=muc_nickname --value=$muc_nickname
#=================================================
@ -159,7 +155,7 @@ ynh_replace_string --match_string="prosody" --replace_string="metronome" --targe
# Create focus user
yunohost domain add auth.$domain
yunohost user create $focus_user -f $focus_user -l $focus_user -m ${focus_user}@auth.$domain -p $focus_password -q 0
yunohost user create $jvb_user -f $jvb_user -l $jvb_user -m ${jvb_user}@auth.$domain -p $jvb_password -q 0
yunohost user create $videobridge_user -f $videobridge_user -l $videobridge_user -m ${videobridge_user}@auth.$domain -p $videobridge_secret -q 0
# Add Metronome domain conf template
metronome_conf="/usr/share/yunohost/templates/jitsi/$domain.cfg.lua"
@ -172,13 +168,13 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil
ynh_replace_string --match_string="__VIDEOBRIDGE_SECRET__" --replace_string="$videobridge_secret" --target_file="$metronome_conf"
ynh_replace_string --match_string="__FOCUS_SECRET__" --replace_string="$focus_secret" --target_file="$metronome_conf"
ynh_replace_string --match_string="__FOCUS_USER__" --replace_string="$focus_user" --target_file="$metronome_conf"
ynh_replace_string --match_string="__JVB_USER__" --replace_string="$jvb_user" --target_file="$metronome_conf"
ynh_replace_string --match_string="__VIDEOBRIDGE_USER__" --replace_string="$videobridge_user" --target_file="$metronome_conf"
touch "/usr/share/yunohost/templates/jitsi/auth.$domain.cfg.lua"
# Add Metronome hook
cp -R ../conf/metronome_regen_conf.hook /usr/share/yunohost/hooks/conf_regen/50-metronome_$app
yunohost tools regen-conf metronome
yunohost tools regen-conf metronome --force
ynh_systemd_action --service_name=metronome --action=restart
@ -198,8 +194,8 @@ ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_f
ynh_replace_string --match_string="__PRIVATE_IPV4__" --replace_string="$private_ipv4" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__PUBLIC_IPV4__" --replace_string="$public_ipv4" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__JVB_USER__" --replace_string="$jvb_user" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__JVB_PASSWORD__" --replace_string="$jvb_password" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__VIDEOBRIDGE_USER__" --replace_string="$videobridge_user" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__VIDEOBRIDGE_SECRET__" --replace_string="$videobridge_secret" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__MUC_NICKNAME__" --replace_string="$muc_nickname" --target_file="$jitsi_videobridge_sip_communicator_conf"
jitsi_videobridge_conf="/etc/$app/videobridge/config"

View file

@ -22,7 +22,7 @@ port_videobridge=$(ynh_app_setting_get --app=$app --key=port_videobridge)
port_component=$(ynh_app_setting_get --app=$app --key=port_component)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
focus_user=$(ynh_app_setting_get --app=$app --key=focus_user)
jvb_user=$(ynh_app_setting_get --app=$app --key=jvb_user)
videobridge_user=$(ynh_app_setting_get --app=$app --key=videobridge_user)
#=================================================
# STANDARD REMOVE
@ -128,11 +128,11 @@ fi
# Remove Metronome Hook
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/50-metronome_$app"
yunohost tools regen-conf metronome
yunohost tools regen-conf metronome --force
# Delete focus user
yunohost user delete $focus_user --purge
yunohost user delete $jvb_user --purge
yunohost user delete $videobridge_user --purge
yunohost domain remove auth.$domain
#=================================================

View file

@ -112,7 +112,7 @@ yunohost domain add auth.$domain
# Create focus user
yunohost user create $focus_user -f $focus_user -l $focus_user -m ${focus_user}@auth.$domain -p $focus_password -q 0
yunohost user create $jvb_user -f $jvb_user -l $jvb_user -m ${jvb_user}@auth.$domain -p $jvb_password -q 0
yunohost user create $videobridge_user -f $videobridge_user -l $videobridge_user -m ${videobridge_user}@auth.$domain -p $videobridge_secret -q 0
# Restore Metronome domain conf template
mkdir -p /usr/share/yunohost/templates/jitsi/
@ -121,7 +121,7 @@ ynh_restore_file --origin_path="/usr/share/yunohost/templates/jitsi/auth.$domain
# Restore Metronome Hook
ynh_restore_file --origin_path="/usr/share/yunohost/hooks/conf_regen/50-metronome_$app"
yunohost tools regen-conf metronome
yunohost tools regen-conf metronome --force
ynh_systemd_action --service_name=metronome --action=restart

View file

@ -64,7 +64,7 @@ if ynh_version_gt "1.0.3387~ynh2" "${current_version}" ; then
# Add Metronome hook
cp -R ../conf/metronome_regen_conf.hook /usr/share/yunohost/hooks/conf_regen/50-metronome_$app
yunohost tools regen-conf metronome
yunohost tools regen-conf metronome --force
fi
if ynh_version_gt "1.0.3969~ynh1" "${current_version}" ; then
@ -188,8 +188,8 @@ then
ynh_replace_string --match_string="__PRIVATE_IPV4__" --replace_string="$private_ipv4" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__PUBLIC_IPV4__" --replace_string="$public_ipv4" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__JVB_USER__" --replace_string="$jvb_user" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__JVB_PASSWORD__" --replace_string="$jvb_password" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__VIDEOBRIDGE_USER__" --replace_string="$videobridge_user" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__VIDEOBRIDGE_SECRET__" --replace_string="$videobridge_secret" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_replace_string --match_string="__MUC_NICKNAME__" --replace_string="$muc_nickname" --target_file="$jitsi_videobridge_sip_communicator_conf"
ynh_store_file_checksum --file="$jitsi_videobridge_sip_communicator_conf"