mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Merge branch 'testing'
This commit is contained in:
commit
9861972f31
9 changed files with 42 additions and 47 deletions
|
@ -14,14 +14,14 @@ Instant messaging server matrix network.
|
||||||
|
|
||||||
Yunohost chatroom with matrix : [https://riot.im/app/#/room/#yunohost:matrix.org](https://riot.im/app/#/room/#yunohost:matrix.org)
|
Yunohost chatroom with matrix : [https://riot.im/app/#/room/#yunohost:matrix.org](https://riot.im/app/#/room/#yunohost:matrix.org)
|
||||||
|
|
||||||
**Shipped version:** 1.12.4
|
**Shipped version:** 1.14.0
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Install for ARM arch (or slow arch)
|
### Install for ARM arch (or slow arch)
|
||||||
|
|
||||||
For all slow or arm architecture it's recommended to build the dh file before the install to have a quicker install.
|
For all slow or arm architecture it's recommended to build the dh file before the install to have a quicker install.
|
||||||
You could build it by this cmd : `mkdir -p /etc/matrix-synapse && openssl dhparam -out /etc/matrix-synapse/dh.pem 2048 > /dev/null`
|
You could build it by this cmd : `openssl dhparam -out /etc/ssl/private/dh2048.pem 2048 > /dev/null`
|
||||||
After that you can install it without problem.
|
After that you can install it without problem.
|
||||||
|
|
||||||
The package uses a prebuilt python virtual environnement. The binary are taken from this repository: https://github.com/Josue-T/synapse_python_build
|
The package uses a prebuilt python virtual environnement. The binary are taken from this repository: https://github.com/Josue-T/synapse_python_build
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.12.4/matrix-synapse_1.12.4-stretch-bin1_armv7l.tar.gz
|
SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.14.0/matrix-synapse_1.14.0-stretch-bin1_armv7l.tar.gz
|
||||||
SOURCE_SUM=2e36e8e280e9f72de575cc33e825a72d9229614ce2c7b91dc3e73fa455a8cf4d
|
SOURCE_SUM=baff395839d1b4aba2d9864e106cbb87417a7fe9afdf4dedfdde08e456a343cf
|
||||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||||
# default: sha256
|
# default: sha256
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
|
|
|
@ -11,18 +11,18 @@ cli-port=__CLI_PORT__
|
||||||
|
|
||||||
cert=/etc/yunohost/certs/__DOMAIN__/crt.pem
|
cert=/etc/yunohost/certs/__DOMAIN__/crt.pem
|
||||||
pkey=/etc/yunohost/certs/__DOMAIN__/key.pem
|
pkey=/etc/yunohost/certs/__DOMAIN__/key.pem
|
||||||
dh-file=/etc/matrix-__APP__/__DOMAIN__.tls.dh
|
dh-file=/etc/ssl/private/dh2048.pem
|
||||||
|
|
||||||
no-sslv2
|
no-sslv2
|
||||||
no-sslv3
|
no-sslv3
|
||||||
no-tlsv1
|
no-tlsv1
|
||||||
|
no-tlsv1_1
|
||||||
|
|
||||||
no-loopback-peers
|
no-loopback-peers
|
||||||
no-multicast-peers
|
no-multicast-peers
|
||||||
|
|
||||||
|
no-cli
|
||||||
|
|
||||||
log-file=/var/log/matrix-__APP__/turnserver.log
|
log-file=/var/log/matrix-__APP__/turnserver.log
|
||||||
pidfile=/var/run/coturn-__APP__/turnserver.pid
|
pidfile=/var/run/coturn-__APP__/turnserver.pid
|
||||||
simple-log
|
simple-log
|
||||||
|
|
||||||
external-ip=__IPV4__,__IPV6__
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Instant messaging server which uses Matrix",
|
"en": "Instant messaging server which uses Matrix",
|
||||||
"fr": "Un serveur de messagerie instantané basé sur Matrix"
|
"fr": "Un serveur de messagerie instantané basé sur Matrix"
|
||||||
},
|
},
|
||||||
"version": "1.12.4~ynh1",
|
"version": "1.14.0~ynh1",
|
||||||
"url": "http://matrix.org",
|
"url": "http://matrix.org",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -57,6 +57,19 @@ apply_config() {
|
||||||
is_public=${YNH_CONFIG_SYNAPSE_CONFIG_SERVER_CONFIG_IS_PUBLIC:-$is_public}
|
is_public=${YNH_CONFIG_SYNAPSE_CONFIG_SERVER_CONFIG_IS_PUBLIC:-$is_public}
|
||||||
jitsi_server=${YNH_CONFIG_SYNAPSE_CONFIG_CLIENT_CONFIG_JITSI_SERVER:-$jitsi_server}
|
jitsi_server=${YNH_CONFIG_SYNAPSE_CONFIG_CLIENT_CONFIG_JITSI_SERVER:-$jitsi_server}
|
||||||
|
|
||||||
|
if [ $report_stats == 1 ]; then
|
||||||
|
report_stats=true
|
||||||
|
fi
|
||||||
|
if [ $report_stats == 0 ]; then
|
||||||
|
report_stats=false
|
||||||
|
fi
|
||||||
|
if [ $allow_public_rooms == 1 ]; then
|
||||||
|
allow_public_rooms=true
|
||||||
|
fi
|
||||||
|
if [ $allow_public_rooms == 0 ]; then
|
||||||
|
allow_public_rooms=false
|
||||||
|
fi
|
||||||
|
|
||||||
ynh_app_setting_set --app $app --key report_stats --value $report_stats
|
ynh_app_setting_set --app $app --key report_stats --value $report_stats
|
||||||
ynh_app_setting_set --app $app --key allow_public_rooms --value $allow_public_rooms
|
ynh_app_setting_set --app $app --key allow_public_rooms --value $allow_public_rooms
|
||||||
ynh_app_setting_set --app $app --key is_public --value $is_public
|
ynh_app_setting_set --app $app --key is_public --value $is_public
|
||||||
|
|
|
@ -363,16 +363,12 @@ public_ip6="$(curl ipv6.yunohost.org)" || true
|
||||||
|
|
||||||
if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4"
|
if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4"
|
||||||
then
|
then
|
||||||
ynh_replace_string --match_string='__IPV4__' --replace_string="$public_ip4" --target_file="$coturn_config_path"
|
echo "external-ip=$public_ip4" >> "$coturn_config_path"
|
||||||
else
|
|
||||||
ynh_replace_string --match_string='__IPV4__,' --replace_string="" --target_file="$coturn_config_path"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6"
|
if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6"
|
||||||
then
|
then
|
||||||
ynh_replace_string --match_string='__IPV6__' --replace_string="$public_ip6" --target_file="$coturn_config_path"
|
echo "external-ip=$public_ip6" >> "$coturn_config_path"
|
||||||
else
|
|
||||||
ynh_replace_string --match_string=',__IPV6__' --replace_string="" --target_file="$coturn_config_path"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_store_file_checksum --file="$coturn_config_path"
|
ynh_store_file_checksum --file="$coturn_config_path"
|
||||||
|
|
|
@ -185,16 +185,12 @@ public_ip6="$(curl ipv6.yunohost.org)" || true
|
||||||
|
|
||||||
if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4"
|
if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4"
|
||||||
then
|
then
|
||||||
ynh_replace_string --match_string='__IPV4__' --replace_string="$public_ip4" --target_file="$coturn_config_path"
|
echo "external-ip=$public_ip4" >> "$coturn_config_path"
|
||||||
else
|
|
||||||
ynh_replace_string --match_string='__IPV4__,' --replace_string="" --target_file="$coturn_config_path"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6"
|
if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6"
|
||||||
then
|
then
|
||||||
ynh_replace_string --match_string='__IPV6__' --replace_string="$public_ip6" --target_file="$coturn_config_path"
|
echo "external-ip=$public_ip6" >> "$coturn_config_path"
|
||||||
else
|
|
||||||
ynh_replace_string --match_string=',__IPV6__' --replace_string="" --target_file="$coturn_config_path"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_store_file_checksum --file="$coturn_config_path"
|
ynh_store_file_checksum --file="$coturn_config_path"
|
||||||
|
|
|
@ -117,6 +117,16 @@ if [ -z $jitsi_server ]; then
|
||||||
ynh_app_setting_set --app=$app --key=jitsi_server --value=$jitsi_server
|
ynh_app_setting_set --app=$app --key=jitsi_server --value=$jitsi_server
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $report_stats ]; then
|
||||||
|
report_stats="false"
|
||||||
|
ynh_app_setting_set --app=$app --key=report_stats --value=$report_stats
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $allow_public_rooms ]; then
|
||||||
|
allow_public_rooms="false"
|
||||||
|
ynh_app_setting_set --app=$app --key=allow_public_rooms --value=$allow_public_rooms
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
# INSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -220,18 +230,6 @@ then
|
||||||
fi
|
fi
|
||||||
ynh_print_ON
|
ynh_print_ON
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# MIGRATION 5 : DEFINE UNDEFINED SETTINGS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
if [ -n $report_stats ]; then
|
|
||||||
report_stats="false"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n $allow_public_rooms ]; then
|
|
||||||
allow_public_rooms="false"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE SYNAPSE CONFIG
|
# UPDATE SYNAPSE CONFIG
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -406,16 +404,12 @@ public_ip6="$(curl ipv6.yunohost.org)" || true
|
||||||
|
|
||||||
if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4"
|
if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4"
|
||||||
then
|
then
|
||||||
ynh_replace_string --match_string='__IPV4__' --replace_string="$public_ip4" --target_file="$coturn_config_path"
|
echo "external-ip=$public_ip4" >> "$coturn_config_path"
|
||||||
else
|
|
||||||
ynh_replace_string --match_string='__IPV4__,' --replace_string="" --target_file="$coturn_config_path"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6"
|
if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6"
|
||||||
then
|
then
|
||||||
ynh_replace_string --match_string='__IPV6__' --replace_string="$public_ip6" --target_file="$coturn_config_path"
|
echo "external-ip=$public_ip6" >> "$coturn_config_path"
|
||||||
else
|
|
||||||
ynh_replace_string --match_string=',__IPV6__' --replace_string="" --target_file="$coturn_config_path"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_store_file_checksum --file="$coturn_config_path"
|
ynh_store_file_checksum --file="$coturn_config_path"
|
||||||
|
|
|
@ -9,18 +9,14 @@ external_IP_line="external-ip=__IPV4__,__IPV6__"
|
||||||
public_ip4="$(curl ip.yunohost.org)" || true
|
public_ip4="$(curl ip.yunohost.org)" || true
|
||||||
public_ip6="$(curl ipv6.yunohost.org)" || true
|
public_ip6="$(curl ipv6.yunohost.org)" || true
|
||||||
|
|
||||||
if [[ -n "$public_ip4" ]] && ynh_validate_ip 4 "$public_ip4"
|
if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4"
|
||||||
then
|
then
|
||||||
external_IP_line="${external_IP_line/'__IPV4__'/$public_ip4}"
|
echo "external-ip=$public_ip4" >> "$coturn_config_path"
|
||||||
else
|
|
||||||
external_IP_line="${external_IP_line/'__IPV4__,'/}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$public_ip6" ]] && ynh_validate_ip 6 "$public_ip6"
|
if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6"
|
||||||
then
|
then
|
||||||
external_IP_line="${external_IP_line/'__IPV6__'/$public_ip6}"
|
echo "external-ip=$public_ip6" >> "$coturn_config_path"
|
||||||
else
|
|
||||||
external_IP_line="${external_IP_line/',__IPV6__'/}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
old_config_line=$(egrep "^external-ip=.*\$" "/etc/matrix-$app_instance/coturn.conf")
|
old_config_line=$(egrep "^external-ip=.*\$" "/etc/matrix-$app_instance/coturn.conf")
|
||||||
|
|
Loading…
Reference in a new issue