1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

Merge pull request #213 from Gredin67/testing

Make app service registration work for mautrix_whatsapp
This commit is contained in:
Josue-T 2020-09-21 21:49:38 +02:00 committed by GitHub
commit cf0b7de895
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 2 deletions

View file

@ -21,10 +21,10 @@ description = "Close the ports range 49153:49193 with TCP and UDP. (Undo \"Open
[set_admin_user]
name = "Set a user as admin"
command = "[[ \"$(su --command=\"psql matrix_synapse\" postgres <<< \"UPDATE users SET admin = 1 WHERE name = '@$YNH_ACTION_USERNAME:$(yunohost app setting $YNH_APP_INSTANCE_NAME domain)'\")\" == 'UPDATE 1' ]]"
command = "[[ \"$(su --command=\"psql matrix_synapse\" postgres <<< \"UPDATE users SET admin = 1 WHERE name = '@$YNH_ACTION_USERNAME:$(yunohost app setting $YNH_APP_INSTANCE_NAME server_name)'\")\" == 'UPDATE 1' ]]"
user = "root"
accepted_return_codes = [0]
description = "Set a synapse user as admin in the synapse server. It probably usefull only to manage the community function."
description = "Set a synapse user as admin in the synapse server. It is mainly required to manage the community function."
[set_admin_user.arguments]
[set_admin_user.arguments.username]

View file

@ -175,6 +175,7 @@ ynh_script_progression --message="Setting up source files..." --weight=50
mkdir -p /var/lib/matrix-$app
mkdir -p /var/log/matrix-$app
mkdir -p /etc/matrix-$app/conf.d
mkdir -p /etc/matrix-$app/app-service
# Install synapse in virtualenv
install_sources

View file

@ -77,6 +77,7 @@ ynh_install_app_dependencies $dependances
ynh_script_progression --message="Restoring directory and configuration..." --weight=10
ynh_restore
mkdir -p /etc/matrix-$app/app-service
# Check that the good python version is installed
# If not upgrade the source

View file

@ -385,6 +385,9 @@ cp ../sources/update_synapse_for_appservice.sh $final_path/
ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh"
ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/update_synapse_for_appservice.sh"
# Ensure app-service folder has exists (Migration)
mkdir -p /etc/matrix-$app/app-service
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================