mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
fix
This commit is contained in:
parent
3cee13dd50
commit
7535c70c8a
4 changed files with 13 additions and 19 deletions
|
@ -61,6 +61,9 @@ ynh_app_setting_set --app=$app --key=allow_public_rooms --value=$allow_public_ro
|
||||||
ynh_app_setting_set --app=$app --key=e2e_enabled_by_default --value=$e2e_enabled_by_default
|
ynh_app_setting_set --app=$app --key=e2e_enabled_by_default --value=$e2e_enabled_by_default
|
||||||
ynh_app_setting_set --app=$app --key=synapse_user_app_pwd --value=$synapse_user_app_pwd
|
ynh_app_setting_set --app=$app --key=synapse_user_app_pwd --value=$synapse_user_app_pwd
|
||||||
|
|
||||||
|
ynh_app_setting_set --app=$app --key=synapse_user --value=$synapse_user
|
||||||
|
ynh_app_setting_set --app=$app --key=final_www_path --value=$final_www_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A DH FILE
|
# CREATE A DH FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -154,11 +157,9 @@ ynh_app_setting_set --app=$app --key=macaroon_secret_key --value="$macaroon_secr
|
||||||
ynh_script_progression --message="Configuring a systemd service..." --weight=2
|
ynh_script_progression --message="Configuring a systemd service..." --weight=2
|
||||||
|
|
||||||
# Create systemd service for Synapse and Turnserver
|
# Create systemd service for Synapse and Turnserver
|
||||||
#cp ../conf/default_matrix-synapse /etc/default/matrix-$app
|
|
||||||
ynh_add_config --template="../conf/default_matrix-synapse" --destination="/etc/default/matrix-$app"
|
ynh_add_config --template="../conf/default_matrix-synapse" --destination="/etc/default/matrix-$app"
|
||||||
ynh_add_systemd_config --service=matrix-$app --template=matrix-synapse.service
|
ynh_add_systemd_config --service=matrix-$app --template=matrix-synapse.service
|
||||||
|
|
||||||
#cp ../conf/default_coturn /etc/default/coturn-$app
|
|
||||||
ynh_add_config --template="../conf/default_coturn" --destination="/etc/default/coturn-$app"
|
ynh_add_config --template="../conf/default_coturn" --destination="/etc/default/coturn-$app"
|
||||||
ynh_add_systemd_config --service=coturn-$app --template=coturn-synapse.service
|
ynh_add_systemd_config --service=coturn-$app --template=coturn-synapse.service
|
||||||
|
|
||||||
|
@ -175,8 +176,8 @@ then
|
||||||
ynh_add_config --template="server_name.conf" --destination="/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf"
|
ynh_add_config --template="server_name.conf" --destination="/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config #app
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SET SYNAPSE CONFIG
|
# SET SYNAPSE CONFIG
|
||||||
|
@ -305,9 +306,6 @@ ynh_systemd_action --service_name=matrix-$app --action=restart --line_match="Syn
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring Fail2Ban..." --weight=10
|
ynh_script_progression --message="Configuring Fail2Ban..." --weight=10
|
||||||
|
|
||||||
# WARNING : theses command are used in INSTALL, UPGRADE
|
|
||||||
# For any update do it in all files
|
|
||||||
|
|
||||||
ynh_add_fail2ban_config --use_template
|
ynh_add_fail2ban_config --use_template
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -14,9 +14,7 @@ source /usr/share/yunohost/helpers
|
||||||
# SET CONSTANTS
|
# SET CONSTANTS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
synapse_user="matrix-$app"
|
|
||||||
upstream_version=$(ynh_app_upstream_version)
|
upstream_version=$(ynh_app_upstream_version)
|
||||||
final_www_path="/var/www/$app"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE SYSTEM CONFIGURATIONS
|
# REMOVE SYSTEM CONFIGURATIONS
|
||||||
|
|
|
@ -22,10 +22,7 @@ main_domain=$(yunohost domain list --output-as json | jq -r .main)
|
||||||
# SET ALL CONSTANT
|
# SET ALL CONSTANT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
synapse_user="matrix-$app"
|
|
||||||
synapse_user_app="$app"
|
|
||||||
upstream_version=$(ynh_app_upstream_version)
|
upstream_version=$(ynh_app_upstream_version)
|
||||||
final_www_path="/var/www/$app"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE THE DEDICATED USER
|
# RECREATE THE DEDICATED USER
|
||||||
|
@ -37,11 +34,14 @@ ynh_system_user_create --username=$synapse_user --home_dir=$install_dir
|
||||||
|
|
||||||
# The format to create an user account varies depending on the version of YunoHost currently installed.
|
# The format to create an user account varies depending on the version of YunoHost currently installed.
|
||||||
ynh_current_version=$(dpkg-query --showformat='${Version}' --show yunohost)
|
ynh_current_version=$(dpkg-query --showformat='${Version}' --show yunohost)
|
||||||
if $(dpkg --compare-versions "$ynh_current_version" ge "11.1"); then
|
#if $(dpkg --compare-versions "$ynh_current_version" ge "11.1"); then
|
||||||
yunohost user create $synapse_user_app -F "Synapse Application" -d $domain -p "$synapse_user_app_pwd"
|
# yunohost user create $app -F "Synapse Application" -d $domain -p "$synapse_user_app_pwd"
|
||||||
else
|
#else
|
||||||
yunohost user create $synapse_user_app -f Synapse -l Application -d $domain -p "$synapse_user_app_pwd"
|
# yunohost user create $app -f Synapse -l Application -d $domain -p "$synapse_user_app_pwd"
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
|
ynh_system_user_create --username=$synapse_user
|
||||||
|
|
||||||
adduser $synapse_user ssl-cert
|
adduser $synapse_user ssl-cert
|
||||||
adduser turnserver ssl-cert
|
adduser turnserver ssl-cert
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,8 @@ main_domain=$(yunohost domain list --output-as json | jq -r .main)
|
||||||
# SET ALL CONSTANT
|
# SET ALL CONSTANT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
synapse_user="matrix-$app"
|
|
||||||
upstream_version=$(ynh_app_upstream_version)
|
upstream_version=$(ynh_app_upstream_version)
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
upgrade_type=$(ynh_check_app_version_changed)
|
||||||
final_www_path="/var/www/$app"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
|
|
Loading…
Add table
Reference in a new issue