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
0784a8a0f0
9 changed files with 42 additions and 16 deletions
25
README.md
25
README.md
|
@ -14,7 +14,7 @@ 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.28.0
|
**Shipped version:** 1.31.0
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
@ -78,6 +78,29 @@ If you have a dynamic IP address, you also might need to update this config auto
|
||||||
*/15 * * * * root bash /opt/yunohost/__SYNAPSE_INSTANCE_NAME__/Coturn_config_rotate.sh;
|
*/15 * * * * root bash /opt/yunohost/__SYNAPSE_INSTANCE_NAME__/Coturn_config_rotate.sh;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### OpenVPN
|
||||||
|
|
||||||
|
In case of you have an OpenVPN server you might want than `coturn-synapse` restart when the VPN restart. To do this create a file named `/usr/local/bin/openvpn_up_script.sh` with this content:
|
||||||
|
```
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
(
|
||||||
|
sleep 5
|
||||||
|
sudo systemctl restart coturn-synapse.service
|
||||||
|
) &
|
||||||
|
exit 0
|
||||||
|
```
|
||||||
|
|
||||||
|
Add this line in you sudo config file `/etc/sudoers`
|
||||||
|
```
|
||||||
|
openvpn ALL=(ALL) NOPASSWD: /bin/systemctl restart coturn-synapse.service
|
||||||
|
```
|
||||||
|
|
||||||
|
And add this line in your OpenVPN config file
|
||||||
|
```
|
||||||
|
ipchange /usr/local/bin/openvpn_up_script.sh
|
||||||
|
```
|
||||||
|
|
||||||
### Important Security Note
|
### Important Security Note
|
||||||
|
|
||||||
We do not recommend running Element from the same domain name as your Matrix
|
We do not recommend running Element from the same domain name as your Matrix
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
upgrade=1 from_commit=35774cc0eabb82b03230210689fa060d5f2b0bd8
|
upgrade=1 from_commit=35774cc0eabb82b03230210689fa060d5f2b0bd8
|
||||||
upgrade=1 from_commit=dbf0a2c9359ccd62b55132cace548b17e44af9bf
|
upgrade=1 from_commit=dbf0a2c9359ccd62b55132cace548b17e44af9bf
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=0
|
||||||
incorrect_path=0
|
incorrect_path=0
|
||||||
port_already_use=1 (8448)
|
port_already_use=1 (8448)
|
||||||
change_url=0
|
change_url=0
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.28.0/matrix-synapse_1.28.0-stretch-bin1_armv7l.tar.gz
|
SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.31.0/matrix-synapse_1.31.0-bullseye-bin1_armv7l.tar.gz
|
||||||
SOURCE_SUM=03078aa4a8a88609ab71e11f8503c83f5bbee8e4211f997318d7843438ac4db5
|
SOURCE_SUM=edfe30078bae8fbe565e6e18f6c0859c81e1828862584a5135ac57f92e1f0c91
|
||||||
# (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
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.28.0/matrix-synapse_1.28.0-buster-bin1_armv7l.tar.gz
|
SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.31.0/matrix-synapse_1.31.0-buster-bin1_armv7l.tar.gz
|
||||||
SOURCE_SUM=9a3a0098953ee592f9c40fd98d1e54f0c5a369a27007667fbe4689cc0aa4bcc0
|
SOURCE_SUM=877bb0812bd133b4f4c6745b1c5dc441dcd919f65de8a53d348fd00b99e74660
|
||||||
# (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
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
location __PATH__ {
|
location __PATH__ {
|
||||||
proxy_pass http://localhost:__PORT__;
|
proxy_pass http://localhost:__PORT__;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
|
|
||||||
|
|
|
@ -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.28.0~ynh2",
|
"version": "1.31.0~ynh1",
|
||||||
"url": "http://matrix.org",
|
"url": "http://matrix.org",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -40,7 +40,7 @@ install_sources() {
|
||||||
if [ -e $final_path/.rustup ]; then
|
if [ -e $final_path/.rustup ]; then
|
||||||
sudo -u "$synapse_user" env PATH=$PATH rustup update
|
sudo -u "$synapse_user" env PATH=$PATH rustup update
|
||||||
else
|
else
|
||||||
sudo -u "$synapse_user" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=stable'
|
sudo -u "$synapse_user" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=stable --profile=minimal'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install virtualenv if it don't exist
|
# Install virtualenv if it don't exist
|
||||||
|
@ -49,18 +49,20 @@ install_sources() {
|
||||||
# Install synapse in virtualenv
|
# Install synapse in virtualenv
|
||||||
|
|
||||||
# We set all necessary environement variable to create a python virtualenvironnement.
|
# We set all necessary environement variable to create a python virtualenvironnement.
|
||||||
set +u;
|
u_arg='u'
|
||||||
|
set +$u_arg;
|
||||||
source $final_path/bin/activate
|
source $final_path/bin/activate
|
||||||
set -u;
|
set -$u_arg;
|
||||||
pip3 install --upgrade setuptools wheel
|
pip3 install --upgrade setuptools wheel
|
||||||
chown $synapse_user:root -R $final_path
|
chown $synapse_user:root -R $final_path
|
||||||
sudo -u $synapse_user env PATH=$PATH pip3 install --upgrade 'cryptography>=3.3'
|
sudo -u $synapse_user env PATH=$PATH pip3 install --upgrade 'cryptography>=3.3'
|
||||||
pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml jinja2
|
pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml jinja2
|
||||||
pip3 install --upgrade 'Twisted>=20.3.0<21' matrix-synapse==$upstream_version matrix-synapse-ldap3
|
# Fix issue https://github.com/YunoHost-Apps/synapse_ynh/issues/248
|
||||||
|
pip3 install --upgrade 'Twisted>=21' 'treq>=21.1.0' matrix-synapse==$upstream_version matrix-synapse-ldap3
|
||||||
|
|
||||||
# This function was defined when we called "source $final_path/bin/activate". With this function we undo what "$final_path/bin/activate" does
|
# This function was defined when we called "source $final_path/bin/activate". With this function we undo what "$final_path/bin/activate" does
|
||||||
set +u;
|
set +$u_arg;
|
||||||
deactivate
|
deactivate
|
||||||
set -u;
|
set -$u_arg;
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -342,7 +342,7 @@ ynh_add_config --template="../sources/update_synapse_for_appservice.sh" --destin
|
||||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||||
|
|
||||||
ynh_permission_url --permission=main --url=$domain/_matrix/cas_server.php/login --auth_header=true
|
ynh_permission_url --permission=main --url=$domain/_matrix/cas_server.php/login --auth_header=true
|
||||||
ynh_permission_update --permission=main --label="Synapse server SSO authentication" --show_tile=false --protected=true
|
ynh_permission_update --permission=main --show_tile=false --protected=true
|
||||||
|
|
||||||
ynh_permission_create --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \
|
ynh_permission_create --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \
|
||||||
--label="Server access for client apps." --show_tile=false --allowed=visitors \
|
--label="Server access for client apps." --show_tile=false --allowed=visitors \
|
||||||
|
|
|
@ -405,7 +405,7 @@ ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||||
ynh_legacy_permissions_delete_all
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
||||||
ynh_permission_url --permission=main --url=$domain/_matrix/cas_server.php/login --auth_header=true
|
ynh_permission_url --permission=main --url=$domain/_matrix/cas_server.php/login --auth_header=true
|
||||||
ynh_permission_update --permission=main --label="Synapse server SSO authentication" --show_tile=false --protected=true
|
ynh_permission_update --permission=main --show_tile=false --protected=true
|
||||||
|
|
||||||
if ! ynh_permission_exists --permission=server_api; then
|
if ! ynh_permission_exists --permission=server_api; then
|
||||||
ynh_permission_create --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \
|
ynh_permission_create --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \
|
||||||
|
|
Loading…
Add table
Reference in a new issue