1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mautrix_whatsapp_ynh.git synced 2024-09-03 19:46:01 +02:00

typo and small clean

This commit is contained in:
Gredin67 2023-01-06 16:29:20 +01:00 committed by GitHub
parent faa5d5ca9a
commit a25dcb70a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 15 deletions

View file

@ -64,7 +64,7 @@ services = ["__APP__"]
[appservice.metrics.metrics_listen_port]
ask = "IP and Port for the Metrics listener?"
type = "string"
help = "Default "127.0.0.1:8001". The path is always /metrics"
help = "Defaults to: '127.0.0.1:8001'. The path is always /metrics"
bind = ":__FINALPATH__/config.yaml"
[whatsapp]

View file

@ -104,11 +104,11 @@
"en": "Choose Matrix user(s) authorized to bridge with the WhatsApp bot.",
"fr": "Choisissez le/les compte(s) Matrix autorisés à utiliser la passerelle WhatsApp."
},
"example": "admin or domain or @johndoe:server.name or server.name or *",
"default": "domain",
"example": "local or @johndoe:server.name or server.name or *",
"default": "local",
"help": {
"en": "Either the administrator only (admin), all local Synapse users (domain), a remote or local user (@johndoe:server.name), a remote server (matrix.org), or all remote/local servers (*) can be authorized. Give the Matrix server_name, not the full domain/URL.",
"fr": "L'administrateur seulement (admin), tous les comptes Synapse locaux (domain), un compte local ou distant (@johndoe:server.name), un serveur distant (matrix.org), ou tous les serveurs remote/local (*). Donner le nom du serveur Matrix, pas le domaine/URL complet."
"en": "Either all local Synapse users (local), a remote or local user (@johndoe:server.name), a remote server (matrix.org), or all remote/local servers (*) can be authorized. Give the Matrix server_name, not the full domain/URL.",
"fr": "Soir tous les comptes Synapse locaux (local), un compte local ou distant (@johndoe:server.name), un serveur distant (matrix.org), ou tous les serveurs remote/local (*). Donner le nom du serveur Matrix, pas le domaine/URL complet."
}
}
]

View file

@ -33,11 +33,6 @@ botusers=$YNH_APP_ARG_BOTUSERS
app=$YNH_APP_INSTANCE_NAME
if [ "$botusers" == "admin" ]
then
botusers=$botadmin
fi
# ToDo check (in manifest?) if the selected synapse instance is not already connected to a mautrix_whatsapp bridge
if [ $synapsenumber -eq "1" ]
then
@ -49,6 +44,11 @@ server_name=$(ynh_app_setting_get --app $synapse_instance --key server_name)
domain=$(ynh_app_setting_get --app $synapse_instance --key domain)
synapse_db_name="matrix_$synapse_instance"
if [ "$botusers" == "local" ]
then
botusers="$server_name"
fi
#=================================================
# SET STANDARD SETTINGS FROM DEFAULT CONFIG
#=================================================
@ -105,10 +105,6 @@ ynh_script_progression --message="Validating installation parameters..." --weigh
final_path=/opt/yunohost/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
if [ $encryption -eq 1 ]; then
encryption="true"
fi
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
@ -236,7 +232,7 @@ ynh_script_progression --message="Starting a systemd service..." --weight=15
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
# Wait until the synapse user is created
sleep 30
# (Note that, by default, non-admins might not have your homeserver's permission to create communities.)
# (Note that, by default, non-admins might not have your homeserver's permission to create Spaces.)
if [ "$bot_synapse_adm" = true ]
then
ynh_psql_execute_as_root --database=$synapse_db_name --sql="UPDATE users SET admin = 1 WHERE name = ""$botname"";"