mirror of
https://github.com/YunoHost-Apps/mautrix_signal_ynh.git
synced 2024-09-03 19:46:07 +02:00
initialize enable_relaybot
This commit is contained in:
parent
d3f9fb9624
commit
d7789a4743
3 changed files with 37 additions and 21 deletions
|
@ -37,7 +37,7 @@
|
|||
},
|
||||
"example": "2 (for instance synapse__2)",
|
||||
"help": {
|
||||
"en": "If you installed synapse only once time, then leave default value 1.",
|
||||
"en": "If you installed synapse only once, then leave default value 1.",
|
||||
"fr": "Si vous n'avez installé qu'une fois synapse, gardez la valeur par défaut 1."
|
||||
},
|
||||
"default": "1"
|
||||
|
@ -56,6 +56,19 @@
|
|||
},
|
||||
"default": "signalbot"
|
||||
},
|
||||
{
|
||||
"name": "encryption",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Enable end-to-bridge (e2b) encryption?",
|
||||
"fr": "Activer le chiffrement entre client et bridge (e2b) ?"
|
||||
},
|
||||
"help": {
|
||||
"en": "Only activate if you know the prerequisites and constraints related to e2b.",
|
||||
"fr": "N'activer que si vous connaissez les prérequis et constraintes liées à e2b."
|
||||
},
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "botadmin",
|
||||
"type": "string",
|
||||
|
|
|
@ -26,7 +26,7 @@ ynh_abort_if_errors
|
|||
synapsenumber=$YNH_APP_ARG_SYNAPSENUMBER
|
||||
botname=$YNH_APP_ARG_BOTNAME
|
||||
bot_synapse_adm=true
|
||||
encryption=false
|
||||
encryption="'${YNH_APP_ARG_ENCRYPTION}'"
|
||||
listadmin=$YNH_APP_ARG_BOTADMIN
|
||||
listuser=$YNH_APP_ARG_BOTUSERS
|
||||
|
||||
|
@ -42,7 +42,6 @@ fi
|
|||
server_name=$(ynh_app_setting_get --app $synapse_instance --key server_name)
|
||||
domain=$(ynh_app_setting_get --app $synapse_instance --key domain)
|
||||
mautrix_version=$(ynh_app_upstream_version)
|
||||
enable_relaybot=true
|
||||
bot_synapse_db_user="@$botname:$server_name"
|
||||
synapse_db_name="matrix_$synapse_instance"
|
||||
signald_user="signald" # This is actually chosen by the signald dependency
|
||||
|
@ -59,16 +58,17 @@ fi
|
|||
appserviceid=$botname
|
||||
displayname="Signal bridge bot"
|
||||
avatar="mxc://maunium.net/wPJgTQbZOtpBFmDNkiNEMDUp"
|
||||
ephemeral_events=false
|
||||
enable_metrics=false
|
||||
ephemeral_events="false"
|
||||
enable_metrics="false"
|
||||
listen_port=8000
|
||||
registration_enabled=true
|
||||
enable_disappearing_messages_in_groups=false
|
||||
registration_enabled="true"
|
||||
enable_disappearing_messages_in_groups="false"
|
||||
username_template="sg_{userid}"
|
||||
contact_list_names="disallow"
|
||||
federate_rooms=true
|
||||
encryption_default=false
|
||||
federate_rooms="true"
|
||||
encryption_default="false"
|
||||
print_level="INFO"
|
||||
enable_relaybot="true"
|
||||
listrelay="*"
|
||||
|
||||
ynh_app_setting_set --app=$app --key=appserviceid --value=$appserviceid
|
||||
|
@ -84,6 +84,7 @@ ynh_app_setting_set --app=$app --key=contact_list_names --value=$contact_list_na
|
|||
ynh_app_setting_set --app=$app --key=federate_rooms --value=$federate_rooms
|
||||
ynh_app_setting_set --app=$app --key=encryption_default --value=$encryption_default
|
||||
ynh_app_setting_set --app=$app --key=print_level --value=$print_level
|
||||
ynh_app_setting_set --app=$app --key=enable_relaybot --value=$enable_relaybot
|
||||
ynh_app_setting_set --app=$app --key=listrelay --value=$listrelay
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -47,10 +47,10 @@ federate_rooms=$(ynh_app_setting_get --app=$app --key=federate_rooms)
|
|||
encryption=$(ynh_app_setting_get --app=$app --key=encryption)
|
||||
encryption_default=$(ynh_app_setting_get --app=$app --key=encryption_default)
|
||||
print_level=$(ynh_app_setting_get --app=$app --key=print_level)
|
||||
enable_relaybot=$(ynh_app_setting_get --app=$app --key=enable_relaybot)
|
||||
listrelay=$(ynh_app_setting_get --app=$app --key=listrelay)
|
||||
listuser=$(ynh_app_setting_get --app=$app --key=listuser)
|
||||
listadmin=$(ynh_app_setting_get --app=$app --key=listadmin)
|
||||
enable_relaybot=$(ynh_app_setting_get --app=$app --key=enable_relaybot)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -108,7 +108,7 @@ fi
|
|||
|
||||
if [ -z "$enable_metrics" ]
|
||||
then
|
||||
enable_metrics=false
|
||||
enable_metrics="false"
|
||||
ynh_app_setting_set --app=$app --key=enable_metrics --value=$enable_metrics
|
||||
fi
|
||||
|
||||
|
@ -120,13 +120,13 @@ fi
|
|||
|
||||
if [ -z "$registration_enabled" ]
|
||||
then
|
||||
registration_enabled=true
|
||||
registration_enabled="true"
|
||||
ynh_app_setting_set --app=$app --key=registration_enabled --value=$registration_enabled
|
||||
fi
|
||||
|
||||
if [ -z "$enable_disappearing_messages_in_groups" ]
|
||||
then
|
||||
enable_disappearing_messages_in_groups=false
|
||||
enable_disappearing_messages_in_groups="false"
|
||||
ynh_app_setting_set --app=$app --key=enable_disappearing_messages_in_groups --value=$enable_disappearing_messages_in_groups
|
||||
fi
|
||||
|
||||
|
@ -144,13 +144,13 @@ fi
|
|||
|
||||
if [ -z "$federate_rooms" ]
|
||||
then
|
||||
federate_rooms=true
|
||||
federate_rooms="true"
|
||||
ynh_app_setting_set --app=$app --key=federate_rooms --value=$federate_rooms
|
||||
fi
|
||||
|
||||
if [ -z "$encryption_default" ]
|
||||
then
|
||||
encryption_default=false
|
||||
encryption_default="false"
|
||||
ynh_app_setting_set --app=$app --key=encryption_default --value=$encryption_default
|
||||
fi
|
||||
|
||||
|
@ -166,22 +166,24 @@ then
|
|||
ynh_app_setting_set --app=$app --key=listrelay --value=$listrelay
|
||||
fi
|
||||
|
||||
if [ -z "$enable_relaybot" ]
|
||||
then
|
||||
enable_relaybot="true"
|
||||
ynh_app_setting_set --app=$app --key=enable_relaybot --value=$enable_relaybot
|
||||
fi
|
||||
|
||||
if [ -z "$listuser" ]
|
||||
then
|
||||
listuser=$(ynh_app_setting_get --app=$app --key=botusers)
|
||||
ynh_app_setting_set --app=$app --key=listuser --value=$listuser
|
||||
ynh_app_setting_delete --app=$app --key=botusers
|
||||
fi
|
||||
|
||||
if [ -z "$listadmin" ]
|
||||
then
|
||||
listadmin=$(ynh_app_setting_get --app=$app --key=botadmin)
|
||||
ynh_app_setting_set --app=$app --key=listadmin --value=$listadmin
|
||||
fi
|
||||
|
||||
if [ -z "$enable_relaybot" ]
|
||||
then
|
||||
enable_relaybot=true
|
||||
ynh_app_setting_set --app=$app --key=enable_relaybot --value=$enable_relaybot
|
||||
ynh_app_setting_delete --app=$app --key=botadmin
|
||||
fi
|
||||
|
||||
# Fix possible permission issues with a previous signald version, esp. with stickers
|
||||
|
|
Loading…
Reference in a new issue