This commit is contained in:
ericgaspar 2021-09-05 17:04:01 +02:00
parent a973c479a7
commit 187f2ae98b
4 changed files with 9 additions and 25 deletions

View file

@ -56,7 +56,7 @@
"type": "boolean", "type": "boolean",
"ask": { "ask": {
"en": "Enable end-to-bridge encryption?", "en": "Enable end-to-bridge encryption?",
"fr": "Activer le chiffrement entre synapse et le bridge ?" "fr": "Activer le chiffrement entre Synapse et le bridge ?"
}, },
"help": { "help": {
"en": "Only activate if you know the prerequisites and constraints related to e2b.", "en": "Only activate if you know the prerequisites and constraints related to e2b.",
@ -103,7 +103,7 @@
"default": "", "default": "",
"help": { "help": {
"en": "Get your own API keys at https://my.telegram.org/apps", "en": "Get your own API keys at https://my.telegram.org/apps",
"fr": "TODO" "fr": "Obtenez vos propres clés API sur https://my.telegram.org/apps"
} }
}, },
{ {
@ -111,7 +111,7 @@
"type": "string", "type": "string",
"ask": { "ask": {
"en": "Telegram API keys (https://my.telegram.org/apps): Hash", "en": "Telegram API keys (https://my.telegram.org/apps): Hash",
"fr": "TODO" "fr": "Clés API Telegram (https://my.telegram.org/apps) : Hash"
}, },
"example": "tjyd5yge35lbodk1xwzw2jstp90k55qz", "example": "tjyd5yge35lbodk1xwzw2jstp90k55qz",
"default": "", "default": "",
@ -125,13 +125,13 @@
"type": "string", "type": "string",
"ask": { "ask": {
"en": "Telegram bot token (optional)", "en": "Telegram bot token (optional)",
"fr": "TODO" "fr": "Jeton de bot de Telegram (facultatif) "
}, },
"example": "disabled", "example": "disabled",
"default": "disabled", "default": "disabled",
"help": { "help": {
"en": "Create your own telegram bot.", "en": "Create your own telegram bot.",
"fr": "TODO" "fr": "Créez votre propre bot de Telegram."
} }
} }
] ]

View file

@ -108,15 +108,7 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
#================================================= #=================================================
ynh_script_progression --message="Installing dependencies..." --weight=97 ynh_script_progression --message="Installing dependencies..." --weight=97
### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package. ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
### Those deb packages will be installed as dependencies of this package.
### If you're not using this helper:
### - Remove the section "REMOVE DEPENDENCIES" in the remove script
### - Remove the variable "pkg_dependencies" in _common.sh
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# CREATE A POSTGRESQL DATABASE # CREATE A POSTGRESQL DATABASE

View file

@ -78,7 +78,7 @@ chown $mautrix_bridge_user:root -R $final_path
ynh_script_progression --message="Reinstalling dependencies..." --weight=1 ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies # Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
# TODO # TODO
#================================================= #=================================================

View file

@ -36,18 +36,10 @@ bottoken=$(ynh_app_setting_get --app=$app --key=bottoken)
upstream_version=$(ynh_app_setting_get --app=$app --key=mautrix_version) upstream_version=$(ynh_app_setting_get --app=$app --key=mautrix_version)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
### This helper will compare the version of the currently installed app and the version of the upstream package.
### $upgrade_type can have 2 different values
### - UPGRADE_APP if the upstream app version has changed
### - UPGRADE_PACKAGE if only the YunoHost package has changed
### ynh_check_app_version_changed will stop the upgrade if the app is up to date.
### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do.
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
@ -113,7 +105,7 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=1 ynh_script_progression --message="Upgrading dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
@ -135,7 +127,7 @@ ynh_script_progression --message="Upgrading python packages..." --weight=1
$final_path/bin/pip3 install --upgrade setuptools wheel # HACK fixes "error: invalid command 'bdist_wheel'" $final_path/bin/pip3 install --upgrade setuptools wheel # HACK fixes "error: invalid command 'bdist_wheel'"
$final_path/bin/pip3 install --upgrade $final_path/src/mautrix-telegram.tar.gz[postgres,speedups,qr_login] #,hq_thumbnails $final_path/bin/pip3 install --upgrade $final_path/src/mautrix-telegram.tar.gz[postgres,speedups,qr_login] #,hq_thumbnails
fi fi
#
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================