mirror of
https://github.com/YunoHost-Apps/mautrix_telegram_ynh.git
synced 2024-09-03 19:45:55 +02:00
remove bot_synapse_adm and maintainer + update
as I do not use yunohost anymore testing is unnecessary complicated, hopefully someone else wants to go on with maintaining this app
This commit is contained in:
parent
7e6b841b49
commit
a3146ea59d
5 changed files with 4 additions and 36 deletions
|
@ -6,7 +6,6 @@
|
||||||
port="29317"
|
port="29317"
|
||||||
synapsenumber="1"
|
synapsenumber="1"
|
||||||
botname="telegrambot"
|
botname="telegrambot"
|
||||||
bot_synapse_adm=true
|
|
||||||
encryption=false
|
encryption=false
|
||||||
botadmin="@johndoe:synapsedomain.tld"
|
botadmin="@johndoe:synapsedomain.tld"
|
||||||
botusers="@johndoe:synapsedomain.tld"
|
botusers="@johndoe:synapsedomain.tld"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/mautrix/telegram/archive/refs/tags/v0.10.1.tar.gz
|
SOURCE_URL=https://github.com/mautrix/telegram/archive/refs/tags/v0.10.2.tar.gz
|
||||||
SOURCE_SUM=81376427d454b6c99c01b244027cd7609d19ef84653625d4027ba92fd5de0466
|
SOURCE_SUM=6c55dd22d71dc8c78a3069acabcd66d8c181c795688f37bfc88fc461e99f5e25
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
},
|
},
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "Benedikt Tissot",
|
"name": "",
|
||||||
"email": "benedikt.tissot@googlemail.com",
|
"email": "",
|
||||||
"url": "https://github.com/YunoHost-Apps/mautrix_telegram_ynh"
|
"url": "https://github.com/YunoHost-Apps/mautrix_telegram_ynh"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
|
@ -71,19 +71,6 @@
|
||||||
},
|
},
|
||||||
"default": false
|
"default": false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "bot_synapse_adm",
|
|
||||||
"type": "boolean",
|
|
||||||
"ask": {
|
|
||||||
"en": "Give the Telegram bot administrator rights to the synapse instance?",
|
|
||||||
"fr": "Donner au robot Telegram des droits administrateur à l'instance synapse ?"
|
|
||||||
},
|
|
||||||
"help": {
|
|
||||||
"en": "If true, the bot can group Telegram chats in a Matrix community. Not required if you set up synapse so that non-admins are authorized to create communities.",
|
|
||||||
"fr": "Si true, le robot groupera les conversations Telegram dans une communauté Matrix. Pas nécessaire si vous avez réglé synapse pour qu'il autorise les non-admin à créer des communautés."
|
|
||||||
},
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "botadmin",
|
"name": "botadmin",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|
|
@ -29,7 +29,6 @@ botname=$YNH_APP_ARG_BOTNAME
|
||||||
encryption=$YNH_APP_ARG_ENCRYPTION
|
encryption=$YNH_APP_ARG_ENCRYPTION
|
||||||
botadmin=$YNH_APP_ARG_BOTADMIN
|
botadmin=$YNH_APP_ARG_BOTADMIN
|
||||||
botusers=$YNH_APP_ARG_BOTUSERS
|
botusers=$YNH_APP_ARG_BOTUSERS
|
||||||
bot_synapse_adm=$YNH_APP_ARG_BOT_SYNAPSE_ADM
|
|
||||||
|
|
||||||
# TODO new settings specific to telegram
|
# TODO new settings specific to telegram
|
||||||
apiid=$YNH_APP_ARG_APIID
|
apiid=$YNH_APP_ARG_APIID
|
||||||
|
@ -91,7 +90,6 @@ ynh_app_setting_set --app=$app --key=server_name --value=$server_name
|
||||||
ynh_app_setting_set --app=$app --key=port --value=$port
|
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
ynh_app_setting_set --app=$app --key=botname --value=$botname
|
ynh_app_setting_set --app=$app --key=botname --value=$botname
|
||||||
ynh_app_setting_set --app=$app --key=synapse_instance --value=$synapse_instance
|
ynh_app_setting_set --app=$app --key=synapse_instance --value=$synapse_instance
|
||||||
ynh_app_setting_set --app=$app --key=bot_synapse_adm --value=$bot_synapse_adm
|
|
||||||
ynh_app_setting_set --app=$app --key=app_service_registration_path --value=$app_service_registration_path
|
ynh_app_setting_set --app=$app --key=app_service_registration_path --value=$app_service_registration_path
|
||||||
ynh_app_setting_set --app=$app --key=encryption --value=$encryption
|
ynh_app_setting_set --app=$app --key=encryption --value=$encryption
|
||||||
ynh_app_setting_set --app=$app --key=mautrix_bridge_db_name --value=$mautrix_bridge_db_name
|
ynh_app_setting_set --app=$app --key=mautrix_bridge_db_name --value=$mautrix_bridge_db_name
|
||||||
|
@ -257,15 +255,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name=$app --action="start"
|
ynh_systemd_action --service_name=$app --action="start"
|
||||||
# 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.)
|
|
||||||
if [ "$bot_synapse_adm" = true ]; then
|
|
||||||
ynh_psql_execute_as_root --database=$synapse_db_name --sql="UPDATE users SET admin = 1 WHERE name = ""$botname"";"
|
|
||||||
#yunohost app action run $synapse_instance set_admin_user -a username=$botname
|
|
||||||
fi
|
|
||||||
ynh_systemd_action --service_name=$app --action="restart"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -53,13 +53,6 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
# some legacy installs and you therefore want to initiaze stuff during upgrade)
|
# some legacy installs and you therefore want to initiaze stuff during upgrade)
|
||||||
#
|
#
|
||||||
|
|
||||||
bot_synapse_adm=$(ynh_app_setting_get --app=$app --key=bot_synapse_adm)
|
|
||||||
# If bot_synapse_adm doesn't exist, create it
|
|
||||||
if [ -z "$bot_synapse_adm" ]; then
|
|
||||||
bot_synapse_adm=true
|
|
||||||
ynh_app_setting_set --app=$app --key=bot_synapse_adm --value=$bot_synapse_adm
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If final_path doesn't exist, create it
|
# If final_path doesn't exist, create it
|
||||||
#if [ -z "$final_path" ]; then
|
#if [ -z "$final_path" ]; then
|
||||||
# final_path=/var/www/$app
|
# final_path=/var/www/$app
|
||||||
|
|
Loading…
Reference in a new issue