mirror of
https://github.com/YunoHost-Apps/jitsi_ynh.git
synced 2024-09-03 19:35:57 +02:00
managing behind a nat
This commit is contained in:
parent
a51291b851
commit
85b304790e
3 changed files with 12 additions and 0 deletions
|
@ -1,2 +1,4 @@
|
|||
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__
|
||||
|
|
|
@ -171,9 +171,14 @@ ynh_systemd_action --service_name=metronome --action=restart
|
|||
#=================================================
|
||||
ynh_print_info --message="Building Jitsi-Videobridge..."
|
||||
|
||||
public_ipv4="$(curl ip.yunohost.org)" || true
|
||||
private_ipv4="$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')" || true
|
||||
|
||||
mkdir -p "$final_path/.sip-communicator"
|
||||
cp ../conf/sip-communicator.properties "$final_path/.sip-communicator/sip-communicator.properties"
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/.sip-communicator/sip-communicator.properties"
|
||||
ynh_replace_string --match_string="__PRIVATE_IPV4__" --replace_string="$private_ipv4" --target_file="$final_path/.sip-communicator/sip-communicator.properties"
|
||||
ynh_replace_string --match_string="__PUBLIC_IPV4__" --replace_string="$public_ipv4" --target_file="$final_path/.sip-communicator/sip-communicator.properties"
|
||||
chown -R $app: $final_path
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -147,9 +147,14 @@ ynh_print_info --message="Building Jitsi-Videobridge..."
|
|||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
public_ipv4="$(curl ip.yunohost.org)" || true
|
||||
private_ipv4="$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')" || true
|
||||
|
||||
mkdir -p "$final_path/.sip-communicator"
|
||||
cp ../conf/sip-communicator.properties "$final_path/.sip-communicator/sip-communicator.properties"
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/.sip-communicator/sip-communicator.properties"
|
||||
ynh_replace_string --match_string="__PRIVATE_IPV4__" --replace_string="$private_ipv4" --target_file="$final_path/.sip-communicator/sip-communicator.properties"
|
||||
ynh_replace_string --match_string="__PUBLIC_IPV4__" --replace_string="$public_ipv4" --target_file="$final_path/.sip-communicator/sip-communicator.properties"
|
||||
chown -R $app: $final_path
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue