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)",
|
"example": "2 (for instance synapse__2)",
|
||||||
"help": {
|
"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."
|
"fr": "Si vous n'avez installé qu'une fois synapse, gardez la valeur par défaut 1."
|
||||||
},
|
},
|
||||||
"default": "1"
|
"default": "1"
|
||||||
|
@ -56,6 +56,19 @@
|
||||||
},
|
},
|
||||||
"default": "signalbot"
|
"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",
|
"name": "botadmin",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|
|
@ -26,7 +26,7 @@ ynh_abort_if_errors
|
||||||
synapsenumber=$YNH_APP_ARG_SYNAPSENUMBER
|
synapsenumber=$YNH_APP_ARG_SYNAPSENUMBER
|
||||||
botname=$YNH_APP_ARG_BOTNAME
|
botname=$YNH_APP_ARG_BOTNAME
|
||||||
bot_synapse_adm=true
|
bot_synapse_adm=true
|
||||||
encryption=false
|
encryption="'${YNH_APP_ARG_ENCRYPTION}'"
|
||||||
listadmin=$YNH_APP_ARG_BOTADMIN
|
listadmin=$YNH_APP_ARG_BOTADMIN
|
||||||
listuser=$YNH_APP_ARG_BOTUSERS
|
listuser=$YNH_APP_ARG_BOTUSERS
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@ fi
|
||||||
server_name=$(ynh_app_setting_get --app $synapse_instance --key server_name)
|
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)
|
||||||
mautrix_version=$(ynh_app_upstream_version)
|
mautrix_version=$(ynh_app_upstream_version)
|
||||||
enable_relaybot=true
|
|
||||||
bot_synapse_db_user="@$botname:$server_name"
|
bot_synapse_db_user="@$botname:$server_name"
|
||||||
synapse_db_name="matrix_$synapse_instance"
|
synapse_db_name="matrix_$synapse_instance"
|
||||||
signald_user="signald" # This is actually chosen by the signald dependency
|
signald_user="signald" # This is actually chosen by the signald dependency
|
||||||
|
@ -59,16 +58,17 @@ fi
|
||||||
appserviceid=$botname
|
appserviceid=$botname
|
||||||
displayname="Signal bridge bot"
|
displayname="Signal bridge bot"
|
||||||
avatar="mxc://maunium.net/wPJgTQbZOtpBFmDNkiNEMDUp"
|
avatar="mxc://maunium.net/wPJgTQbZOtpBFmDNkiNEMDUp"
|
||||||
ephemeral_events=false
|
ephemeral_events="false"
|
||||||
enable_metrics=false
|
enable_metrics="false"
|
||||||
listen_port=8000
|
listen_port=8000
|
||||||
registration_enabled=true
|
registration_enabled="true"
|
||||||
enable_disappearing_messages_in_groups=false
|
enable_disappearing_messages_in_groups="false"
|
||||||
username_template="sg_{userid}"
|
username_template="sg_{userid}"
|
||||||
contact_list_names="disallow"
|
contact_list_names="disallow"
|
||||||
federate_rooms=true
|
federate_rooms="true"
|
||||||
encryption_default=false
|
encryption_default="false"
|
||||||
print_level="INFO"
|
print_level="INFO"
|
||||||
|
enable_relaybot="true"
|
||||||
listrelay="*"
|
listrelay="*"
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=appserviceid --value=$appserviceid
|
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=federate_rooms --value=$federate_rooms
|
||||||
ynh_app_setting_set --app=$app --key=encryption_default --value=$encryption_default
|
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=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
|
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=$(ynh_app_setting_get --app=$app --key=encryption)
|
||||||
encryption_default=$(ynh_app_setting_get --app=$app --key=encryption_default)
|
encryption_default=$(ynh_app_setting_get --app=$app --key=encryption_default)
|
||||||
print_level=$(ynh_app_setting_get --app=$app --key=print_level)
|
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)
|
listrelay=$(ynh_app_setting_get --app=$app --key=listrelay)
|
||||||
listuser=$(ynh_app_setting_get --app=$app --key=listuser)
|
listuser=$(ynh_app_setting_get --app=$app --key=listuser)
|
||||||
listadmin=$(ynh_app_setting_get --app=$app --key=listadmin)
|
listadmin=$(ynh_app_setting_get --app=$app --key=listadmin)
|
||||||
enable_relaybot=$(ynh_app_setting_get --app=$app --key=enable_relaybot)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
|
@ -108,7 +108,7 @@ fi
|
||||||
|
|
||||||
if [ -z "$enable_metrics" ]
|
if [ -z "$enable_metrics" ]
|
||||||
then
|
then
|
||||||
enable_metrics=false
|
enable_metrics="false"
|
||||||
ynh_app_setting_set --app=$app --key=enable_metrics --value=$enable_metrics
|
ynh_app_setting_set --app=$app --key=enable_metrics --value=$enable_metrics
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -120,13 +120,13 @@ fi
|
||||||
|
|
||||||
if [ -z "$registration_enabled" ]
|
if [ -z "$registration_enabled" ]
|
||||||
then
|
then
|
||||||
registration_enabled=true
|
registration_enabled="true"
|
||||||
ynh_app_setting_set --app=$app --key=registration_enabled --value=$registration_enabled
|
ynh_app_setting_set --app=$app --key=registration_enabled --value=$registration_enabled
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$enable_disappearing_messages_in_groups" ]
|
if [ -z "$enable_disappearing_messages_in_groups" ]
|
||||||
then
|
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
|
ynh_app_setting_set --app=$app --key=enable_disappearing_messages_in_groups --value=$enable_disappearing_messages_in_groups
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -144,13 +144,13 @@ fi
|
||||||
|
|
||||||
if [ -z "$federate_rooms" ]
|
if [ -z "$federate_rooms" ]
|
||||||
then
|
then
|
||||||
federate_rooms=true
|
federate_rooms="true"
|
||||||
ynh_app_setting_set --app=$app --key=federate_rooms --value=$federate_rooms
|
ynh_app_setting_set --app=$app --key=federate_rooms --value=$federate_rooms
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$encryption_default" ]
|
if [ -z "$encryption_default" ]
|
||||||
then
|
then
|
||||||
encryption_default=false
|
encryption_default="false"
|
||||||
ynh_app_setting_set --app=$app --key=encryption_default --value=$encryption_default
|
ynh_app_setting_set --app=$app --key=encryption_default --value=$encryption_default
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -166,22 +166,24 @@ then
|
||||||
ynh_app_setting_set --app=$app --key=listrelay --value=$listrelay
|
ynh_app_setting_set --app=$app --key=listrelay --value=$listrelay
|
||||||
fi
|
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" ]
|
if [ -z "$listuser" ]
|
||||||
then
|
then
|
||||||
listuser=$(ynh_app_setting_get --app=$app --key=botusers)
|
listuser=$(ynh_app_setting_get --app=$app --key=botusers)
|
||||||
ynh_app_setting_set --app=$app --key=listuser --value=$listuser
|
ynh_app_setting_set --app=$app --key=listuser --value=$listuser
|
||||||
|
ynh_app_setting_delete --app=$app --key=botusers
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$listadmin" ]
|
if [ -z "$listadmin" ]
|
||||||
then
|
then
|
||||||
listadmin=$(ynh_app_setting_get --app=$app --key=botadmin)
|
listadmin=$(ynh_app_setting_get --app=$app --key=botadmin)
|
||||||
ynh_app_setting_set --app=$app --key=listadmin --value=$listadmin
|
ynh_app_setting_set --app=$app --key=listadmin --value=$listadmin
|
||||||
fi
|
ynh_app_setting_delete --app=$app --key=botadmin
|
||||||
|
|
||||||
if [ -z "$enable_relaybot" ]
|
|
||||||
then
|
|
||||||
enable_relaybot=true
|
|
||||||
ynh_app_setting_set --app=$app --key=enable_relaybot --value=$enable_relaybot
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fix possible permission issues with a previous signald version, esp. with stickers
|
# Fix possible permission issues with a previous signald version, esp. with stickers
|
||||||
|
|
Loading…
Reference in a new issue