mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Enable Preview and refactor source install
This commit is contained in:
parent
a5b20793cd
commit
3784e64eca
4 changed files with 17 additions and 20 deletions
|
@ -197,7 +197,7 @@ thumbnail_sizes:
|
|||
# Is the preview URL API enabled? If enabled, you *must* specify
|
||||
# an explicit url_preview_ip_range_blacklist of IPs that the spider is
|
||||
# denied from accessing.
|
||||
url_preview_enabled: False
|
||||
url_preview_enabled: True
|
||||
|
||||
# List of IP address CIDR ranges that the URL preview spider is denied
|
||||
# from accessing. There are no defaults: you must explicitly
|
||||
|
@ -207,11 +207,11 @@ url_preview_enabled: False
|
|||
# synapse to issue arbitrary GET requests to your internal services,
|
||||
# causing serious security issues.
|
||||
#
|
||||
# url_preview_ip_range_blacklist:
|
||||
# - '127.0.0.0/8'
|
||||
# - '10.0.0.0/8'
|
||||
# - '172.16.0.0/12'
|
||||
# - '192.168.0.0/16'
|
||||
url_preview_ip_range_blacklist:
|
||||
- '127.0.0.0/8'
|
||||
- '10.0.0.0/8'
|
||||
- '172.16.0.0/12'
|
||||
- '192.168.0.0/16'
|
||||
#
|
||||
# List of IP address CIDR ranges that the URL preview spider is allowed
|
||||
# to access even if they are specified in url_preview_ip_range_blacklist.
|
||||
|
|
|
@ -13,24 +13,24 @@ install_dependances() {
|
|||
pip install --upgrade virtualenv
|
||||
}
|
||||
|
||||
install_from_source() {
|
||||
setup_dir() {
|
||||
# Create empty dir for synapse
|
||||
mkdir -p /var/lib/matrix-synapse
|
||||
mkdir -p /var/log/matrix-synapse
|
||||
mkdir -p /etc/matrix-synapse/conf.d
|
||||
mkdir -p $final_path
|
||||
}
|
||||
|
||||
install_source() {
|
||||
# Install synapse in virtualenv
|
||||
virtualenv -p python2.7 $final_path
|
||||
PS1=""
|
||||
cp ../conf/virtualenv_activate $final_path/bin/activate
|
||||
source $final_path/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade cffi
|
||||
pip install --upgrade ndg-httpsclient
|
||||
pip install --upgrade setuptools
|
||||
pip install https://github.com/matrix-org/synapse/tarball/master
|
||||
pip install psycopg2
|
||||
pip install --upgrade cffi ndg-httpsclient setuptools
|
||||
pip install --upgrade https://github.com/matrix-org/synapse/tarball/master
|
||||
pip install --upgrade psycopg2 lxml
|
||||
|
||||
# Set permission
|
||||
chown $synapse_user:root -R $final_path
|
||||
|
@ -127,7 +127,7 @@ set_access() { # example : set_access USER FILE
|
|||
}
|
||||
|
||||
|
||||
####### Solve issue
|
||||
####### Solve issue https://dev.yunohost.org/issues/1006
|
||||
|
||||
# Install package(s)
|
||||
#
|
||||
|
|
|
@ -60,8 +60,9 @@ ynh_psql_create_user $synapse_db_user $synapse_db_pwd
|
|||
ynh_psql_execute_as_root \
|
||||
"CREATE DATABASE $synapse_db_name ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER $synapse_db_user;"
|
||||
|
||||
# Create directory Install synapse in virtualenv
|
||||
install_from_source
|
||||
# Create directory and Install synapse in virtualenv
|
||||
setup_dir
|
||||
install_source
|
||||
|
||||
# Open access to server without a button the home
|
||||
cp ../conf/add_sso_conf.py $final_path
|
||||
|
|
|
@ -127,11 +127,7 @@ set_certificat_access
|
|||
config_coturn
|
||||
|
||||
# Upgrade manually Synapse
|
||||
PS1=""
|
||||
source $final_path/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade setuptools
|
||||
pip install --upgrade https://github.com/matrix-org/synapse/tarball/master
|
||||
install_source
|
||||
|
||||
# Set new settings
|
||||
ynh_app_setting_set $app synapse_version $synapse_version
|
||||
|
|
Loading…
Reference in a new issue