diff --git a/scripts/restore b/scripts/restore index b88b5d9..21ebd6d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -80,7 +80,7 @@ ynh_install_app_dependencies $dependances ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$synapse_user --home_dir=$data_path +ynh_system_user_create --username=$synapse_user --home_dir=$final_path adduser $synapse_user ssl-cert adduser turnserver ssl-cert diff --git a/scripts/upgrade b/scripts/upgrade index 8e034a3..e652e29 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -190,8 +190,9 @@ then ynh_script_progression --message="Generating synapse secret..." --weight=1 # Go in virtualenvironnement - PS1=${PS1:-} + set +u source $final_path/bin/activate + set -u # Generate config and keys python -m synapse.app.homeserver --keys-directory /etc/matrix-$app/ --generate-config --generate-keys --server-name $server_name --report-stats=no -c homeserver.yml @@ -399,6 +400,7 @@ ynh_add_fail2ban_config --use_template # SETUP PERMISSIONS #================================================= ynh_script_progression --message="Configuring permissions..." --weight=1 +ynh_legacy_permissions_delete_all 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