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:
parent
faa5d5ca9a
commit
a25dcb70a2
3 changed files with 11 additions and 15 deletions
|
@ -64,7 +64,7 @@ services = ["__APP__"]
|
||||||
[appservice.metrics.metrics_listen_port]
|
[appservice.metrics.metrics_listen_port]
|
||||||
ask = "IP and Port for the Metrics listener?"
|
ask = "IP and Port for the Metrics listener?"
|
||||||
type = "string"
|
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"
|
bind = ":__FINALPATH__/config.yaml"
|
||||||
|
|
||||||
[whatsapp]
|
[whatsapp]
|
||||||
|
|
|
@ -104,11 +104,11 @@
|
||||||
"en": "Choose Matrix user(s) authorized to bridge with the WhatsApp bot.",
|
"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."
|
"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 *",
|
"example": "local or @johndoe:server.name or server.name or *",
|
||||||
"default": "domain",
|
"default": "local",
|
||||||
"help": {
|
"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.",
|
"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": "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."
|
"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."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -33,11 +33,6 @@ botusers=$YNH_APP_ARG_BOTUSERS
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
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
|
# ToDo check (in manifest?) if the selected synapse instance is not already connected to a mautrix_whatsapp bridge
|
||||||
if [ $synapsenumber -eq "1" ]
|
if [ $synapsenumber -eq "1" ]
|
||||||
then
|
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)
|
domain=$(ynh_app_setting_get --app $synapse_instance --key domain)
|
||||||
synapse_db_name="matrix_$synapse_instance"
|
synapse_db_name="matrix_$synapse_instance"
|
||||||
|
|
||||||
|
if [ "$botusers" == "local" ]
|
||||||
|
then
|
||||||
|
botusers="$server_name"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SET STANDARD SETTINGS FROM DEFAULT CONFIG
|
# SET STANDARD SETTINGS FROM DEFAULT CONFIG
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -105,10 +105,6 @@ ynh_script_progression --message="Validating installation parameters..." --weigh
|
||||||
final_path=/opt/yunohost/$app
|
final_path=/opt/yunohost/$app
|
||||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
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
|
# 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"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||||
# Wait until the synapse user is created
|
# Wait until the synapse user is created
|
||||||
sleep 30
|
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 ]
|
if [ "$bot_synapse_adm" = true ]
|
||||||
then
|
then
|
||||||
ynh_psql_execute_as_root --database=$synapse_db_name --sql="UPDATE users SET admin = 1 WHERE name = ""$botname"";"
|
ynh_psql_execute_as_root --database=$synapse_db_name --sql="UPDATE users SET admin = 1 WHERE name = ""$botname"";"
|
||||||
|
|
Loading…
Add table
Reference in a new issue