args:
  app: https://github.com/YunoHost-Apps/mautrix_telegram_ynh/
  args: synapsenumber=1&botname=telegrambot&encryption=0&botadmin=%40arntest%3Amaindomain.tld&botusers=local&apiid=12345&apihash=wefga132u57ejzww&bottoken='**********'
  force: false
  label: Matrix-Telegram bridge
  no_remove_on_failure: false
ended_at: 2021-06-07 21:15:32.200900
env:
  YNH_APP_ARG_APIHASH: wefga132u57ejzww
  YNH_APP_ARG_APIID: '12345'
  YNH_APP_ARG_BOTADMIN: '@arntest:maindomain.tld'
  YNH_APP_ARG_BOTNAME: telegrambot
  YNH_APP_ARG_BOTTOKEN: '**********'
  YNH_APP_ARG_BOTUSERS: local
  YNH_APP_ARG_ENCRYPTION: '0'
  YNH_APP_ARG_SYNAPSENUMBER: '1'
  YNH_APP_ID: mautrix_telegram
  YNH_APP_INSTANCE_NAME: mautrix_telegram
  YNH_APP_INSTANCE_NUMBER: '1'
  YNH_APP_MANIFEST_VERSION: 0.10.0-rc1~ynh1
error: An error occurred inside the app installation script
interface: api
operation: app_install
parent: null
related_to:
- - app
  - mautrix_telegram
started_at: 2021-06-07 21:14:34.629553
success: false
yunohost_version: 4.2.5.3

============

2021-06-07 23:14:34,650: INFO - Installing mautrix_telegram...
2021-06-07 23:14:35,318: DEBUG - Permission 'mautrix_telegram.main' updated
2021-06-07 23:14:35,869: DEBUG - Full log of this operation: '<a href="#/tools/logs/20210607-211435-permission_url-mautrix_telegram" style="text-decoration:underline">Update url related to permission 'mautrix_telegram'</a>'
2021-06-07 23:14:37,014: DEBUG - The permission database has been resynchronized
2021-06-07 23:14:37,743: DEBUG - SSOwat configuration regenerated
2021-06-07 23:14:38,330: DEBUG - Permission 'mautrix_telegram.main' created
2021-06-07 23:14:38,331: DEBUG - Full log of this operation: '<a href="#/tools/logs/20210607-211434-permission_create-mautrix_telegram" style="text-decoration:underline">Create permission 'mautrix_telegram'</a>'
2021-06-07 23:14:38,369: DEBUG - Executing command '/bin/bash -x "./install"  7>&1'
2021-06-07 23:14:38,394: DEBUG - + source _common.sh
2021-06-07 23:14:38,395: DEBUG - ++ pkg_dependencies='postgresql python3 zlib1g-dev libjpeg-dev libwebp-dev'
2021-06-07 23:14:38,396: DEBUG - + source /usr/share/yunohost/helpers
2021-06-07 23:14:38,397: DEBUG - +++ grep xtrace
2021-06-07 23:14:38,398: DEBUG - +++ set +o
2021-06-07 23:14:38,401: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace'
2021-06-07 23:14:38,402: DEBUG - ++ XTRACE_ENABLE='set -o xtrace'
2021-06-07 23:14:38,483: DEBUG - + ynh_abort_if_errors
2021-06-07 23:14:38,484: DEBUG - + set -o errexit
2021-06-07 23:14:38,485: DEBUG - + set -o nounset
2021-06-07 23:14:38,486: DEBUG - + trap ynh_exit_properly EXIT
2021-06-07 23:14:38,487: DEBUG - + synapsenumber=1
2021-06-07 23:14:38,488: DEBUG - + botname=telegrambot
2021-06-07 23:14:38,488: DEBUG - + encryption=0
2021-06-07 23:14:38,489: DEBUG - + botadmin=@arntest:maindomain.tld
2021-06-07 23:14:38,490: DEBUG - + botusers=local
2021-06-07 23:14:38,491: DEBUG - + apiid=12345
2021-06-07 23:14:38,491: DEBUG - + apihash=wefga132u57ejzww
2021-06-07 23:14:38,492: DEBUG - + bottoken=**********
2021-06-07 23:14:38,493: DEBUG - + app=mautrix_telegram
2021-06-07 23:14:38,493: DEBUG - + final_path=/opt/yunohost/mautrix_telegram
2021-06-07 23:14:38,494: DEBUG - + '[' 1 -eq 1 ']'
2021-06-07 23:14:38,494: DEBUG - + synapse_instance=synapse
2021-06-07 23:14:38,494: DEBUG - ++ ynh_app_setting_get --app synapse --key server_name
2021-06-07 23:14:38,618: DEBUG - ++ [[ server_name =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:38,619: DEBUG - ++ ynh_app_setting get synapse server_name
2021-06-07 23:14:38,802: DEBUG - + server_name=maindomain.tld
2021-06-07 23:14:38,807: DEBUG - ++ ynh_app_setting_get --app synapse --key domain
2021-06-07 23:14:38,983: DEBUG - ++ [[ domain =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:38,984: DEBUG - ++ ynh_app_setting get synapse domain
2021-06-07 23:14:39,182: DEBUG - + domain=matrix.maindomain.tld
2021-06-07 23:14:39,182: DEBUG - + synapse_config_path=/etc/matrix-synapse
2021-06-07 23:14:39,183: DEBUG - + app_service_registration_path=/etc/matrix-synapse/app-service
2021-06-07 23:14:39,183: DEBUG - + synapse_name=matrix-synapse
2021-06-07 23:14:39,184: DEBUG - + synapse_user=matrix-synapse
2021-06-07 23:14:39,184: DEBUG - + synapse_db_name=matrix_synapse
2021-06-07 23:14:39,184: DEBUG - + synapse_db_user=matrix_synapse
2021-06-07 23:14:39,187: DEBUG - + mautrix_bridge_user=mautrix_telegram
2021-06-07 23:14:39,187: DEBUG - + mautrix_bridge_db_name=mautrix_telegram
2021-06-07 23:14:39,188: DEBUG - + mautrix_bridge_db_user=mautrix_telegram
2021-06-07 23:14:39,190: DEBUG - ++ ynh_app_upstream_version
2021-06-07 23:14:39,192: DEBUG - ++ manifest=
2021-06-07 23:14:39,193: DEBUG - ++ [[ '' != '' ]]
2021-06-07 23:14:39,193: DEBUG - ++ version_key_=0.10.0-rc1~ynh1
2021-06-07 23:14:39,193: DEBUG - ++ echo 0.10.0-rc1
2021-06-07 23:14:39,194: DEBUG - + upstream_version=0.10.0-rc1
2021-06-07 23:14:39,404: DEBUG - + echo '[....................] > Validating installation parameters...'
2021-06-07 23:14:39,405: DEBUG - + test '!' -e /opt/yunohost/mautrix_telegram
2021-06-07 23:14:39,406: INFO - [....................] > Validating installation parameters...
2021-06-07 23:14:39,589: INFO - [....................] > Configuring firewall...
2021-06-07 23:14:39,591: DEBUG - + echo '[....................] > Configuring firewall...'
2021-06-07 23:14:39,592: DEBUG - ++ ynh_find_port --port=29317
2021-06-07 23:14:39,618: DEBUG - ++ test -n 29317
2021-06-07 23:14:39,618: DEBUG - ++ ynh_port_available --port=29317
2021-06-07 23:14:39,644: DEBUG - ++ ss --numeric --listening --tcp --udp
2021-06-07 23:14:39,645: DEBUG - ++ awk '{print$5}'
2021-06-07 23:14:39,647: DEBUG - ++ grep --quiet --extended-regexp ':29317$'
2021-06-07 23:14:39,694: DEBUG - ++ grep -q 'port: '\''29317'\''' /etc/yunohost/apps/borgserver/settings.yml /etc/yunohost/apps/castopod/settings.yml /etc/yunohost/apps/diagramsnet/settings.yml /etc/yunohost/apps/element/settings.yml /etc/yunohost/apps/hotspot/settings.yml /etc/yunohost/apps/matterbridge/settings.yml /etc/yunohost/apps/mautrix_facebook/settings.yml /etc/yunohost/apps/mautrix_signal/settings.yml /etc/yunohost/apps/mautrix_telegram/settings.yml /etc/yunohost/apps/mautrix_whatsapp/settings.yml /etc/yunohost/apps/movim/settings.yml /etc/yunohost/apps/netdata/settings.yml /etc/yunohost/apps/nextcloud/settings.yml /etc/yunohost/apps/roundcube/settings.yml /etc/yunohost/apps/synapse/settings.yml /etc/yunohost/apps/vpnclient/settings.yml
2021-06-07 23:14:39,698: DEBUG - ++ return 0
2021-06-07 23:14:39,699: DEBUG - ++ echo 29317
2021-06-07 23:14:39,699: DEBUG - + port=29317
2021-06-07 23:14:39,886: DEBUG - + echo '[+...................] > Storing installation settings...'
2021-06-07 23:14:39,887: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=domain --value=matrix.maindomain.tld
2021-06-07 23:14:39,891: INFO - [+...................] > Storing installation settings...
2021-06-07 23:14:40,082: DEBUG - + [[ domain =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:40,083: DEBUG - + ynh_app_setting set mautrix_telegram domain matrix.maindomain.tld
2021-06-07 23:14:40,237: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=server_name --value=maindomain.tld
2021-06-07 23:14:40,403: DEBUG - + [[ server_name =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:40,404: DEBUG - + ynh_app_setting set mautrix_telegram server_name maindomain.tld
2021-06-07 23:14:40,560: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=port --value=29317
2021-06-07 23:14:40,730: DEBUG - + [[ port =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:40,730: DEBUG - + ynh_app_setting set mautrix_telegram port 29317
2021-06-07 23:14:40,892: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=botname --value=telegrambot
2021-06-07 23:14:41,063: DEBUG - + [[ botname =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:41,064: DEBUG - + ynh_app_setting set mautrix_telegram botname telegrambot
2021-06-07 23:14:41,219: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=synapse_instance --value=synapse
2021-06-07 23:14:41,390: DEBUG - + [[ synapse_instance =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:41,391: DEBUG - + ynh_app_setting set mautrix_telegram synapse_instance synapse
2021-06-07 23:14:41,547: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=app_service_registration_path --value=/etc/matrix-synapse/app-service
2021-06-07 23:14:41,717: DEBUG - + [[ app_service_registration_path =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:41,718: DEBUG - + ynh_app_setting set mautrix_telegram app_service_registration_path /etc/matrix-synapse/app-service
2021-06-07 23:14:41,883: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=encryption --value=0
2021-06-07 23:14:42,054: DEBUG - + [[ encryption =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:42,055: DEBUG - + ynh_app_setting set mautrix_telegram encryption 0
2021-06-07 23:14:42,212: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=mautrix_bridge_db_name --value=mautrix_telegram
2021-06-07 23:14:42,380: DEBUG - + [[ mautrix_bridge_db_name =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:42,381: DEBUG - + ynh_app_setting set mautrix_telegram mautrix_bridge_db_name mautrix_telegram
2021-06-07 23:14:42,539: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=botadmin --value=@arntest:maindomain.tld
2021-06-07 23:14:42,705: DEBUG - + [[ botadmin =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:42,706: DEBUG - + ynh_app_setting set mautrix_telegram botadmin @arntest:maindomain.tld
2021-06-07 23:14:42,866: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=botusers --value=local
2021-06-07 23:14:43,046: DEBUG - + [[ botusers =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:43,046: DEBUG - + ynh_app_setting set mautrix_telegram botusers local
2021-06-07 23:14:43,207: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=apiid --value=12345
2021-06-07 23:14:43,373: DEBUG - + [[ apiid =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:43,374: DEBUG - + ynh_app_setting set mautrix_telegram apiid 12345
2021-06-07 23:14:43,536: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=apihash --value=wefga132u57ejzww
2021-06-07 23:14:43,704: DEBUG - + [[ apihash =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:43,705: DEBUG - + ynh_app_setting set mautrix_telegram apihash wefga132u57ejzww
2021-06-07 23:14:43,877: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=bottoken --value=**********
2021-06-07 23:14:44,053: DEBUG - + [[ bottoken =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:44,054: DEBUG - + ynh_app_setting set mautrix_telegram bottoken **********
2021-06-07 23:14:44,217: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=mautrix_version --value=0.10.0-rc1
2021-06-07 23:14:44,383: DEBUG - + [[ mautrix_version =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:44,383: DEBUG - + ynh_app_setting set mautrix_telegram mautrix_version 0.10.0-rc1
2021-06-07 23:14:44,547: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=final_path --value=/opt/yunohost/mautrix_telegram
2021-06-07 23:14:44,714: DEBUG - + [[ final_path =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:14:44,714: DEBUG - + ynh_app_setting set mautrix_telegram final_path /opt/yunohost/mautrix_telegram
2021-06-07 23:14:45,076: DEBUG - + echo '[#++++++++++++++.....] > Installing dependencies...'
2021-06-07 23:14:45,077: INFO - [#++++++++++++++.....] > Installing dependencies...
2021-06-07 23:14:45,079: DEBUG - + ynh_install_app_dependencies postgresql python3 zlib1g-dev libjpeg-dev libwebp-dev
2021-06-07 23:14:45,080: DEBUG - + local 'dependencies=postgresql python3 zlib1g-dev libjpeg-dev libwebp-dev'
2021-06-07 23:14:45,080: DEBUG - ++ echo 'postgresql python3 zlib1g-dev libjpeg-dev libwebp-dev'
2021-06-07 23:14:45,081: DEBUG - ++ sed 's/\([^\<=\>]\)\ \([^(]\)/\1, \2/g'
2021-06-07 23:14:45,087: DEBUG - + dependencies='postgresql, python3, zlib1g-dev, libjpeg-dev, libwebp-dev'
2021-06-07 23:14:45,088: DEBUG - + local 'dependencies=postgresql, python3, zlib1g-dev, libjpeg-dev, libwebp-dev'
2021-06-07 23:14:45,089: DEBUG - + local manifest_path=/var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/manifest.json
2021-06-07 23:14:45,091: DEBUG - ++ jq -r .version /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/manifest.json
2021-06-07 23:14:45,100: DEBUG - + local version=0.10.0-rc1~ynh1
2021-06-07 23:14:45,100: DEBUG - + '[' -z 0.10.0-rc1~ynh1 ']'
2021-06-07 23:14:45,101: DEBUG - + '[' 0.10.0-rc1~ynh1 == null ']'
2021-06-07 23:14:45,101: DEBUG - + local dep_app=mautrix-telegram
2021-06-07 23:14:45,102: DEBUG - + [[ postgresql, python3, zlib1g-dev, libjpeg-dev, libwebp-dev =~ [<=>] ]]
2021-06-07 23:14:45,102: DEBUG - + echo postgresql, python3, zlib1g-dev, libjpeg-dev, libwebp-dev
2021-06-07 23:14:45,103: DEBUG - + grep --quiet php
2021-06-07 23:14:45,107: DEBUG - + cat
2021-06-07 23:14:45,111: DEBUG - + ynh_package_install_from_equivs /tmp/mautrix-telegram-ynh-deps.control
2021-06-07 23:14:45,112: DEBUG - + local controlfile=/tmp/mautrix-telegram-ynh-deps.control
2021-06-07 23:14:45,113: DEBUG - ++ grep '^Package: ' /tmp/mautrix-telegram-ynh-deps.control
2021-06-07 23:14:45,114: DEBUG - ++ cut '--delimiter= ' --fields=2
2021-06-07 23:14:45,120: DEBUG - + local pkgname=mautrix-telegram-ynh-deps
2021-06-07 23:14:45,122: DEBUG - ++ grep '^Version: ' /tmp/mautrix-telegram-ynh-deps.control
2021-06-07 23:14:45,123: DEBUG - ++ cut '--delimiter= ' --fields=2
2021-06-07 23:14:45,128: DEBUG - + local pkgversion=0.10.0-rc1~ynh1
2021-06-07 23:14:45,129: DEBUG - + [[ -z mautrix-telegram-ynh-deps ]]
2021-06-07 23:14:45,129: DEBUG - + [[ -z 0.10.0-rc1~ynh1 ]]
2021-06-07 23:14:45,130: DEBUG - + ynh_package_update
2021-06-07 23:14:45,130: DEBUG - + ynh_apt update
2021-06-07 23:14:45,130: DEBUG - + ynh_wait_dpkg_free
2021-06-07 23:14:45,640: DEBUG - + return 0
2021-06-07 23:14:45,641: DEBUG - + LC_ALL=C
2021-06-07 23:14:45,642: DEBUG - + DEBIAN_FRONTEND=noninteractive
2021-06-07 23:14:45,642: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update
2021-06-07 23:14:46,017: DEBUG - Hit:1 http://deb.debian.org/debian buster InRelease
2021-06-07 23:14:46,018: DEBUG - Hit:2 http://security.debian.org/debian-security buster/updates InRelease
2021-06-07 23:14:46,018: DEBUG - Hit:3 http://forge.yunohost.org/debian buster InRelease
2021-06-07 23:14:46,025: DEBUG - Hit:4 http://deb.debian.org/debian buster-updates InRelease
2021-06-07 23:14:50,318: DEBUG - Reading package lists...
2021-06-07 23:14:50,429: DEBUG - ++ mktemp --directory
2021-06-07 23:14:50,433: DEBUG - + local TMPDIR=/tmp/tmp.8CY5DnJntG
2021-06-07 23:14:50,434: DEBUG - + echo 10
2021-06-07 23:14:50,435: DEBUG - + ynh_wait_dpkg_free
2021-06-07 23:14:50,959: DEBUG - + return 0
2021-06-07 23:14:50,959: DEBUG - + cp /tmp/mautrix-telegram-ynh-deps.control /tmp/tmp.8CY5DnJntG/control
2021-06-07 23:14:50,964: DEBUG - + cd /tmp/tmp.8CY5DnJntG
2021-06-07 23:14:50,965: DEBUG - + LC_ALL=C
2021-06-07 23:14:50,966: DEBUG - + equivs-build ./control
2021-06-07 23:14:53,632: DEBUG - + tee ./dpkg_log
2021-06-07 23:14:53,633: DEBUG - + LC_ALL=C
2021-06-07 23:14:53,633: DEBUG - + dpkg --force-depends --install ./mautrix-telegram-ynh-deps_0.10.0-rc1~ynh1_all.deb
2021-06-07 23:14:53,749: DEBUG - Selecting previously unselected package mautrix-telegram-ynh-deps.
2021-06-07 23:14:53,943: DEBUG - (Reading database ... 134176 files and directories currently installed.)
2021-06-07 23:14:53,978: DEBUG - Preparing to unpack .../mautrix-telegram-ynh-deps_0.10.0-rc1~ynh1_all.deb ...
2021-06-07 23:14:54,000: DEBUG - Unpacking mautrix-telegram-ynh-deps (0.10.0-rc1~ynh1) ...
2021-06-07 23:14:54,115: DEBUG - dpkg: mautrix-telegram-ynh-deps: dependency problems, but configuring anyway as you requested:
2021-06-07 23:14:54,116: DEBUG -  mautrix-telegram-ynh-deps depends on libwebp-dev; however:
2021-06-07 23:14:54,117: DEBUG -   Package libwebp-dev is not installed.
2021-06-07 23:14:54,118: DEBUG - 
2021-06-07 23:14:54,118: DEBUG - Setting up mautrix-telegram-ynh-deps (0.10.0-rc1~ynh1) ...
2021-06-07 23:14:54,190: DEBUG - + ynh_package_install --fix-broken
2021-06-07 23:14:54,190: DEBUG - + ynh_apt --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install --fix-broken
2021-06-07 23:14:54,191: DEBUG - + ynh_wait_dpkg_free
2021-06-07 23:14:54,698: DEBUG - + return 0
2021-06-07 23:14:54,699: DEBUG - + LC_ALL=C
2021-06-07 23:14:54,700: DEBUG - + DEBIAN_FRONTEND=noninteractive
2021-06-07 23:14:54,700: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install --fix-broken
2021-06-07 23:14:55,312: DEBUG - Reading package lists...
2021-06-07 23:14:55,807: DEBUG - Building dependency tree...
2021-06-07 23:14:55,811: DEBUG - Reading state information...
2021-06-07 23:14:56,375: DEBUG - Correcting dependencies... Done
2021-06-07 23:14:57,098: DEBUG - The following additional packages will be installed:
2021-06-07 23:14:57,101: DEBUG -   libwebp-dev
2021-06-07 23:14:57,156: DEBUG - The following NEW packages will be installed:
2021-06-07 23:14:57,159: DEBUG -   libwebp-dev
2021-06-07 23:14:58,974: DEBUG - 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2021-06-07 23:14:58,974: DEBUG - Need to get 0 B/345 kB of archives.
2021-06-07 23:14:58,975: DEBUG - After this operation, 1002 kB of additional disk space will be used.
2021-06-07 23:14:59,060: DEBUG - Selecting previously unselected package libwebp-dev:amd64.
2021-06-07 23:14:59,227: DEBUG - (Reading database ... 134180 files and directories currently installed.)
2021-06-07 23:14:59,260: DEBUG - Preparing to unpack .../libwebp-dev_0.6.1-2_amd64.deb ...
2021-06-07 23:14:59,267: DEBUG - Unpacking libwebp-dev:amd64 (0.6.1-2) ...
2021-06-07 23:14:59,499: DEBUG - Setting up libwebp-dev:amd64 (0.6.1-2) ...
2021-06-07 23:15:00,100: DEBUG - + [[ -n /tmp/tmp.8CY5DnJntG ]]
2021-06-07 23:15:00,101: DEBUG - + rm --recursive --force /tmp/tmp.8CY5DnJntG
2021-06-07 23:15:00,105: DEBUG - + ynh_package_is_installed mautrix-telegram-ynh-deps
2021-06-07 23:15:00,129: DEBUG - + ynh_wait_dpkg_free
2021-06-07 23:15:00,644: DEBUG - + return 0
2021-06-07 23:15:00,646: DEBUG - + dpkg-query --show '--showformat=${Status}' mautrix-telegram-ynh-deps
2021-06-07 23:15:00,647: DEBUG - + grep --count 'ok installed'
2021-06-07 23:15:00,706: DEBUG - + rm /tmp/mautrix-telegram-ynh-deps.control
2021-06-07 23:15:00,711: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=apt_dependencies '--value=postgresql, python3, zlib1g-dev, libjpeg-dev, libwebp-dev'
2021-06-07 23:15:00,885: DEBUG - + [[ apt_dependencies =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:15:00,886: DEBUG - + ynh_app_setting set mautrix_telegram apt_dependencies 'postgresql, python3, zlib1g-dev, libjpeg-dev, libwebp-dev'
2021-06-07 23:15:01,241: DEBUG - + echo '[###############.....] > Creating a PostgreSQL database...'
2021-06-07 23:15:01,243: DEBUG - + ynh_print_OFF
2021-06-07 23:15:01,243: DEBUG - + exec
2021-06-07 23:15:01,244: INFO - [###############.....] > Creating a PostgreSQL database...
2021-06-07 23:15:01,611: DEBUG - + echo ynh_print_ON
2021-06-07 23:15:01,611: DEBUG - + ynh_psql_test_if_first_run
2021-06-07 23:15:01,612: DEBUG - + dpkg --list
2021-06-07 23:15:01,613: DEBUG - + grep -q 'ii  postgresql-11'
2021-06-07 23:15:01,690: DEBUG - + '[' -e /etc/postgresql/11 ']'
2021-06-07 23:15:01,690: DEBUG - + systemctl is-active postgresql@11-main -q
2021-06-07 23:15:01,702: DEBUG - + systemctl is-enabled postgresql -q
2021-06-07 23:15:01,718: DEBUG - + '[' '!' -f /etc/yunohost/psql ']'
2021-06-07 23:15:01,719: DEBUG - + ynh_print_OFF
2021-06-07 23:15:01,720: DEBUG - + exec
2021-06-07 23:15:02,250: DEBUG - CREATE ROLE
2021-06-07 23:15:02,260: DEBUG - + echo ynh_print_ON
2021-06-07 23:15:02,261: DEBUG - + ynh_psql_execute_as_root '--sql=CREATE DATABASE mautrix_telegram ENCODING '\''UTF8'\'' LC_COLLATE='\''C'\'' LC_CTYPE='\''C'\'' template=template0 OWNER mautrix_telegram;'
2021-06-07 23:15:02,306: DEBUG - + database=
2021-06-07 23:15:02,306: DEBUG - + '[' -n '' ']'
2021-06-07 23:15:02,308: DEBUG - ++ cat /etc/yunohost/psql
2021-06-07 23:15:02,313: DEBUG - + ynh_psql_connect_as --user=postgres --password=**********
2021-06-07 23:15:02,423: DEBUG - + database=
2021-06-07 23:15:02,424: DEBUG - + sudo --login --user=postgres PGUSER=postgres PGPASSWORD=********** psql ''
2021-06-07 23:15:03,184: DEBUG - CREATE DATABASE
2021-06-07 23:15:03,390: DEBUG - + echo '[###############+....] > Setting up source files...'
2021-06-07 23:15:03,391: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=final_path --value=/opt/yunohost/mautrix_telegram
2021-06-07 23:15:03,395: INFO - [###############+....] > Setting up source files...
2021-06-07 23:15:03,569: DEBUG - + [[ final_path =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:15:03,571: DEBUG - + ynh_app_setting set mautrix_telegram final_path /opt/yunohost/mautrix_telegram
2021-06-07 23:15:03,760: DEBUG - + ynh_setup_source --dest_dir=/opt/yunohost/mautrix_telegram/src
2021-06-07 23:15:03,819: DEBUG - + source_id=app
2021-06-07 23:15:03,820: DEBUG - + keep=
2021-06-07 23:15:03,821: DEBUG - + local src_file_path=/var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/app.src
2021-06-07 23:15:03,823: DEBUG - ++ grep SOURCE_URL= /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/app.src
2021-06-07 23:15:03,825: DEBUG - ++ cut --delimiter== --fields=2-
2021-06-07 23:15:03,830: DEBUG - + local src_url=https://github.com/tulir/mautrix-telegram/archive/refs/tags/v0.10.0-rc1.tar.gz
2021-06-07 23:15:03,832: DEBUG - ++ grep SOURCE_SUM= /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/app.src
2021-06-07 23:15:03,835: DEBUG - ++ cut --delimiter== --fields=2-
2021-06-07 23:15:03,840: DEBUG - + local src_sum=8b1bd2d66d8c5d1f12d34a14f39f4831a0c9fb8e7e82a1de686d88257cda90a6
2021-06-07 23:15:03,843: DEBUG - ++ cut --delimiter== --fields=2-
2021-06-07 23:15:03,846: DEBUG - ++ grep SOURCE_SUM_PRG= /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/app.src
2021-06-07 23:15:03,852: DEBUG - + local src_sumprg=sha256sum
2021-06-07 23:15:03,855: DEBUG - ++ cut --delimiter== --fields=2-
2021-06-07 23:15:03,855: DEBUG - ++ grep SOURCE_FORMAT= /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/app.src
2021-06-07 23:15:03,860: DEBUG - + local src_format=tar.gz
2021-06-07 23:15:03,863: DEBUG - ++ grep SOURCE_EXTRACT= /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/app.src
2021-06-07 23:15:03,863: DEBUG - ++ cut --delimiter== --fields=2-
2021-06-07 23:15:03,868: DEBUG - + local src_extract=false
2021-06-07 23:15:03,870: DEBUG - ++ grep SOURCE_IN_SUBDIR= /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/app.src
2021-06-07 23:15:03,872: DEBUG - ++ cut --delimiter== --fields=2-
2021-06-07 23:15:03,876: DEBUG - + local src_in_subdir=true
2021-06-07 23:15:03,879: DEBUG - ++ cut --delimiter== --fields=2-
2021-06-07 23:15:03,881: DEBUG - ++ grep SOURCE_FILENAME= /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/app.src
2021-06-07 23:15:03,887: DEBUG - + local src_filename=mautrix-telegram.tar.gz
2021-06-07 23:15:03,888: DEBUG - + src_sumprg=sha256sum
2021-06-07 23:15:03,888: DEBUG - + src_in_subdir=true
2021-06-07 23:15:03,889: DEBUG - + src_format=tar.gz
2021-06-07 23:15:03,891: DEBUG - ++ echo tar.gz
2021-06-07 23:15:03,894: DEBUG - ++ tr '[:upper:]' '[:lower:]'
2021-06-07 23:15:03,900: DEBUG - + src_format=tar.gz
2021-06-07 23:15:03,900: DEBUG - + src_extract=false
2021-06-07 23:15:03,901: DEBUG - + '[' mautrix-telegram.tar.gz = '' ']'
2021-06-07 23:15:03,901: DEBUG - + local local_src=/opt/yunohost-apps-src/mautrix_telegram/mautrix-telegram.tar.gz
2021-06-07 23:15:03,902: DEBUG - + mkdir -p /var/cache/yunohost/download/mautrix_telegram/
2021-06-07 23:15:03,906: DEBUG - + src_filename=/var/cache/yunohost/download/mautrix_telegram/mautrix-telegram.tar.gz
2021-06-07 23:15:03,907: DEBUG - + test -e /opt/yunohost-apps-src/mautrix_telegram/mautrix-telegram.tar.gz
2021-06-07 23:15:03,907: DEBUG - + '[' -n https://github.com/tulir/mautrix-telegram/archive/refs/tags/v0.10.0-rc1.tar.gz ']'
2021-06-07 23:15:03,908: DEBUG - ++ wget --tries 3 --no-dns-cache --timeout 900 --no-verbose --output-document=/var/cache/yunohost/download/mautrix_telegram/mautrix-telegram.tar.gz https://github.com/tulir/mautrix-telegram/archive/refs/tags/v0.10.0-rc1.tar.gz
2021-06-07 23:15:05,126: DEBUG - + out='2021-06-07 23:15:05 URL:https://codeload.github.com/tulir/mautrix-telegram/tar.gz/refs/tags/v0.10.0-rc1 [689646] -> "/var/cache/yunohost/download/mautrix_telegram/mautrix-telegram.tar.gz" [1]'
2021-06-07 23:15:05,127: DEBUG - + sha256sum --check --status
2021-06-07 23:15:05,128: DEBUG - + echo '8b1bd2d66d8c5d1f12d34a14f39f4831a0c9fb8e7e82a1de686d88257cda90a6 /var/cache/yunohost/download/mautrix_telegram/mautrix-telegram.tar.gz'
2021-06-07 23:15:05,143: DEBUG - + rm -rf /var/cache/yunohost/files_to_keep_during_setup_source/
2021-06-07 23:15:05,147: DEBUG - + '[' -n '' ']'
2021-06-07 23:15:05,147: DEBUG - + mkdir --parents /opt/yunohost/mautrix_telegram/src
2021-06-07 23:15:05,154: DEBUG - + '[' -n /opt/yunohost/mautrix_telegram ']'
2021-06-07 23:15:05,154: DEBUG - + '[' /opt/yunohost/mautrix_telegram/src == /opt/yunohost/mautrix_telegram ']'
2021-06-07 23:15:05,155: DEBUG - + false
2021-06-07 23:15:05,155: DEBUG - + mv /var/cache/yunohost/download/mautrix_telegram/mautrix-telegram.tar.gz /opt/yunohost/mautrix_telegram/src
2021-06-07 23:15:05,162: DEBUG - + '[' -d /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/sources/patches/ ']'
2021-06-07 23:15:05,163: DEBUG - ++ realpath /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/sources/patches/
2021-06-07 23:15:05,166: DEBUG - + local patches_folder=/var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/sources/patches
2021-06-07 23:15:05,168: DEBUG - ++ find /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/sources/patches -type f -name 'app-*.patch'
2021-06-07 23:15:05,169: DEBUG - ++ wc --lines
2021-06-07 23:15:05,176: DEBUG - + ((  0 > 0  ))
2021-06-07 23:15:05,176: DEBUG - + test -e /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/sources/extra_files/app
2021-06-07 23:15:05,177: DEBUG - + cp --archive /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/sources/extra_files/app/. /opt/yunohost/mautrix_telegram/src
2021-06-07 23:15:05,181: DEBUG - + '[' -n '' ']'
2021-06-07 23:15:05,181: DEBUG - + rm -rf /var/cache/yunohost/files_to_keep_during_setup_source/
2021-06-07 23:15:05,379: DEBUG - + echo '[################....] > Configuring system user...'
2021-06-07 23:15:05,380: DEBUG - + ynh_system_user_create --username=mautrix_telegram
2021-06-07 23:15:05,382: INFO - [################....] > Configuring system user...
2021-06-07 23:15:05,470: DEBUG - + use_shell=0
2021-06-07 23:15:05,471: DEBUG - + home_dir=
2021-06-07 23:15:05,472: DEBUG - + groups=
2021-06-07 23:15:05,473: DEBUG - + ynh_system_user_exists mautrix_telegram
2021-06-07 23:15:05,496: DEBUG - + getent passwd mautrix_telegram
2021-06-07 23:15:05,509: DEBUG - + '[' -n '' ']'
2021-06-07 23:15:05,510: DEBUG - + local user_home_dir=--no-create-home
2021-06-07 23:15:05,511: DEBUG - + '[' 0 -eq 1 ']'
2021-06-07 23:15:05,511: DEBUG - + local 'shell=--shell /usr/sbin/nologin'
2021-06-07 23:15:05,512: DEBUG - + useradd --no-create-home --system --user-group mautrix_telegram --shell /usr/sbin/nologin
2021-06-07 23:15:05,804: DEBUG - + echo '[################+++.] > Configuring a systemd service...'
2021-06-07 23:15:05,806: INFO - [################+++.] > Configuring a systemd service...
2021-06-07 23:15:05,808: DEBUG - + ynh_add_systemd_config --service=mautrix_telegram
2021-06-07 23:15:05,882: DEBUG - + service=mautrix_telegram
2021-06-07 23:15:05,883: DEBUG - + template=systemd.service
2021-06-07 23:15:05,883: DEBUG - + others_var=
2021-06-07 23:15:05,884: DEBUG - + [[ -z '' ]]
2021-06-07 23:15:05,884: DEBUG - + ynh_add_config --template=/var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/systemd.service --destination=/etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:05,989: DEBUG - + '[' -f /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf//var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/systemd.service ']'
2021-06-07 23:15:05,990: DEBUG - + '[' -f /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/systemd.service ']'
2021-06-07 23:15:05,990: DEBUG - + template_path=/var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/systemd.service
2021-06-07 23:15:05,990: DEBUG - + ynh_backup_if_checksum_is_different --file=/etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,015: DEBUG - + local checksum_setting_name=checksum__etc_systemd_system_mautrix_telegram.service
2021-06-07 23:15:06,016: DEBUG - ++ ynh_app_setting_get --app=mautrix_telegram --key=checksum__etc_systemd_system_mautrix_telegram.service
2021-06-07 23:15:06,102: DEBUG - ++ [[ checksum__etc_systemd_system_mautrix_telegram.service =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:15:06,103: DEBUG - ++ ynh_app_setting get mautrix_telegram checksum__etc_systemd_system_mautrix_telegram.service
2021-06-07 23:15:06,270: DEBUG - + local checksum_value=
2021-06-07 23:15:06,271: DEBUG - + backup_file_checksum=
2021-06-07 23:15:06,272: DEBUG - + '[' -n '' ']'
2021-06-07 23:15:06,273: DEBUG - + touch /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,274: DEBUG - + chown root:root /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,285: DEBUG - + chmod 640 /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,288: DEBUG - + cp -f /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/systemd.service /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,293: DEBUG - + _ynh_apply_default_permissions /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,293: DEBUG - + local target=/etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,295: DEBUG - ++ jq -r .requirements.yunohost /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/manifest.json
2021-06-07 23:15:06,295: DEBUG - ++ tr -d '>= '
2021-06-07 23:15:06,308: DEBUG - + local ynh_requirement=4.0
2021-06-07 23:15:06,308: DEBUG - + '[' -z 4.0 ']'
2021-06-07 23:15:06,308: DEBUG - + '[' 4.0 == null ']'
2021-06-07 23:15:06,309: DEBUG - + dpkg --compare-versions 4.0 ge 4.2
2021-06-07 23:15:06,316: DEBUG - + ynh_replace_vars --file=/etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,342: DEBUG - + test -n ''
2021-06-07 23:15:06,342: DEBUG - + test -n mautrix_telegram
2021-06-07 23:15:06,343: DEBUG - + ynh_replace_string --match_string=__NAME__ --replace_string=mautrix_telegram --target_file=/etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,516: DEBUG - + local delimit=@
2021-06-07 23:15:06,516: DEBUG - + match_string=__NAME__
2021-06-07 23:15:06,517: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:06,517: DEBUG - + sed --in-place s@__NAME__@mautrix_telegram@g /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,521: DEBUG - + ynh_replace_string --match_string=__NAMETOCHANGE__ --replace_string=mautrix_telegram --target_file=/etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,697: DEBUG - + local delimit=@
2021-06-07 23:15:06,698: DEBUG - + match_string=__NAMETOCHANGE__
2021-06-07 23:15:06,699: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:06,699: DEBUG - + sed --in-place s@__NAMETOCHANGE__@mautrix_telegram@g /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,703: DEBUG - + ynh_replace_string --match_string=__USER__ --replace_string=mautrix_telegram --target_file=/etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,893: DEBUG - + local delimit=@
2021-06-07 23:15:06,894: DEBUG - + match_string=__USER__
2021-06-07 23:15:06,895: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:06,895: DEBUG - + sed --in-place s@__USER__@mautrix_telegram@g /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:06,902: DEBUG - + test -n /opt/yunohost/mautrix_telegram
2021-06-07 23:15:06,903: DEBUG - + ynh_replace_string --match_string=__FINALPATH__ --replace_string=/opt/yunohost/mautrix_telegram --target_file=/etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:07,080: DEBUG - + local delimit=@
2021-06-07 23:15:07,081: DEBUG - + match_string=__FINALPATH__
2021-06-07 23:15:07,081: DEBUG - + replace_string=/opt/yunohost/mautrix_telegram
2021-06-07 23:15:07,082: DEBUG - + sed --in-place s@__FINALPATH__@/opt/yunohost/mautrix_telegram@g /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:07,086: DEBUG - + test -n 7.3
2021-06-07 23:15:07,087: DEBUG - + ynh_replace_string --match_string=__PHPVERSION__ --replace_string=7.3 --target_file=/etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:07,268: DEBUG - + local delimit=@
2021-06-07 23:15:07,268: DEBUG - + match_string=__PHPVERSION__
2021-06-07 23:15:07,269: DEBUG - + replace_string=7.3
2021-06-07 23:15:07,269: DEBUG - + sed --in-place s@__PHPVERSION__@7.3@g /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:07,274: DEBUG - + test -n ''
2021-06-07 23:15:07,274: DEBUG - + uniques_vars=($(grep -oP '__[A-Z0-9]+?[A-Z0-9_]*?[A-Z0-9]*?__' $file | sort --unique | sed "s@__\([^.]*\)__@\L\1@g" ))
2021-06-07 23:15:07,276: DEBUG - ++ grep -oP '__[A-Z0-9]+?[A-Z0-9_]*?[A-Z0-9]*?__' /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:07,277: DEBUG - ++ sed 's@__\([^.]*\)__@\L\1@g'
2021-06-07 23:15:07,279: DEBUG - ++ sort --unique
2021-06-07 23:15:07,287: DEBUG - + local delimit=@
2021-06-07 23:15:07,287: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:07,287: DEBUG - + [[ -v app ]]
2021-06-07 23:15:07,288: DEBUG - + match_string=__APP__
2021-06-07 23:15:07,288: DEBUG - + match_string=__APP__
2021-06-07 23:15:07,289: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:07,289: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:07,290: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:07,290: DEBUG - + sed --in-place s@__APP__@mautrix_telegram@g /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:07,292: DEBUG - + ynh_store_file_checksum --file=/etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:07,317: DEBUG - + local checksum_setting_name=checksum__etc_systemd_system_mautrix_telegram.service
2021-06-07 23:15:07,320: DEBUG - ++ md5sum /etc/systemd/system/mautrix_telegram.service
2021-06-07 23:15:07,321: DEBUG - ++ cut '--delimiter= ' --fields=1
2021-06-07 23:15:07,326: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=checksum__etc_systemd_system_mautrix_telegram.service --value=99850eab551deb5a7d4362be6484b9e6
2021-06-07 23:15:07,507: DEBUG - + [[ checksum__etc_systemd_system_mautrix_telegram.service =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:15:07,508: DEBUG - + ynh_app_setting set mautrix_telegram checksum__etc_systemd_system_mautrix_telegram.service 99850eab551deb5a7d4362be6484b9e6
2021-06-07 23:15:07,675: DEBUG - + '[' -n '' ']'
2021-06-07 23:15:07,676: DEBUG - + unset backup_file_checksum
2021-06-07 23:15:07,676: DEBUG - + systemctl enable mautrix_telegram --quiet
2021-06-07 23:15:08,407: DEBUG - + systemctl daemon-reload
2021-06-07 23:15:09,263: DEBUG - + echo '[###################.] > Configuring Mautrix-Bridge...'
2021-06-07 23:15:09,264: DEBUG - + mautrix_config_path=/opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,265: DEBUG - + as_token='"This value is generated when generating the registration"'
2021-06-07 23:15:09,265: DEBUG - + hs_token='"This value is generated when generating the registration"'
2021-06-07 23:15:09,266: DEBUG - + write_bridge_config
2021-06-07 23:15:09,266: DEBUG - + domain=https://matrix.maindomain.tld
2021-06-07 23:15:09,267: DEBUG - + '[' local = local ']'
2021-06-07 23:15:09,267: DEBUG - + botusers=maindomain.tld
2021-06-07 23:15:09,268: DEBUG - + verify_server_ssl_certificates=true
2021-06-07 23:15:09,269: DEBUG - + matrix_server_supports_asmux=false
2021-06-07 23:15:09,269: DEBUG - + log_filename=/var/log/mautrix_telegram/mautrix_telegram.log
2021-06-07 23:15:09,270: DEBUG - + telegram_api_id=12345
2021-06-07 23:15:09,270: DEBUG - + telegram_api_hash=wefga132u57ejzww
2021-06-07 23:15:09,271: DEBUG - + telegram_bot_token=**********
2021-06-07 23:15:09,271: DEBUG - + log_level=error
2021-06-07 23:15:09,272: DEBUG - + ynh_add_config --template=config.yaml --destination=/opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,276: INFO - [###################.] > Configuring Mautrix-Bridge...
2021-06-07 23:15:09,350: DEBUG - + '[' -f /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/config.yaml ']'
2021-06-07 23:15:09,351: DEBUG - + template_path=/var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/config.yaml
2021-06-07 23:15:09,351: DEBUG - + ynh_backup_if_checksum_is_different --file=/opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,376: DEBUG - + local checksum_setting_name=checksum__opt_yunohost_mautrix_telegram_config.yaml
2021-06-07 23:15:09,377: DEBUG - ++ ynh_app_setting_get --app=mautrix_telegram --key=checksum__opt_yunohost_mautrix_telegram_config.yaml
2021-06-07 23:15:09,462: DEBUG - ++ [[ checksum__opt_yunohost_mautrix_telegram_config.yaml =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:15:09,463: DEBUG - ++ ynh_app_setting get mautrix_telegram checksum__opt_yunohost_mautrix_telegram_config.yaml
2021-06-07 23:15:09,625: DEBUG - + local checksum_value=
2021-06-07 23:15:09,626: DEBUG - + backup_file_checksum=
2021-06-07 23:15:09,626: DEBUG - + '[' -n '' ']'
2021-06-07 23:15:09,627: DEBUG - + touch /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,628: DEBUG - + chown root:root /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,631: DEBUG - + chmod 640 /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,634: DEBUG - + cp -f /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/conf/config.yaml /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,637: DEBUG - + _ynh_apply_default_permissions /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,638: DEBUG - + local target=/opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,639: DEBUG - ++ jq -r .requirements.yunohost /var/cache/yunohost/app_tmp_work_dirs/app_wcrj2q6v/manifest.json
2021-06-07 23:15:09,640: DEBUG - ++ tr -d '>= '
2021-06-07 23:15:09,651: DEBUG - + local ynh_requirement=4.0
2021-06-07 23:15:09,652: DEBUG - + '[' -z 4.0 ']'
2021-06-07 23:15:09,652: DEBUG - + '[' 4.0 == null ']'
2021-06-07 23:15:09,653: DEBUG - + dpkg --compare-versions 4.0 ge 4.2
2021-06-07 23:15:09,657: DEBUG - + ynh_replace_vars --file=/opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,682: DEBUG - + test -n ''
2021-06-07 23:15:09,683: DEBUG - + test -n mautrix_telegram
2021-06-07 23:15:09,683: DEBUG - + ynh_replace_string --match_string=__NAME__ --replace_string=mautrix_telegram --target_file=/opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,861: DEBUG - + local delimit=@
2021-06-07 23:15:09,861: DEBUG - + match_string=__NAME__
2021-06-07 23:15:09,862: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:09,862: DEBUG - + sed --in-place s@__NAME__@mautrix_telegram@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:09,867: DEBUG - + ynh_replace_string --match_string=__NAMETOCHANGE__ --replace_string=mautrix_telegram --target_file=/opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,046: DEBUG - + local delimit=@
2021-06-07 23:15:10,047: DEBUG - + match_string=__NAMETOCHANGE__
2021-06-07 23:15:10,048: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:10,048: DEBUG - + sed --in-place s@__NAMETOCHANGE__@mautrix_telegram@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,053: DEBUG - + ynh_replace_string --match_string=__USER__ --replace_string=mautrix_telegram --target_file=/opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,226: DEBUG - + local delimit=@
2021-06-07 23:15:10,227: DEBUG - + match_string=__USER__
2021-06-07 23:15:10,227: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:10,227: DEBUG - + sed --in-place s@__USER__@mautrix_telegram@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,231: DEBUG - + test -n /opt/yunohost/mautrix_telegram
2021-06-07 23:15:10,232: DEBUG - + ynh_replace_string --match_string=__FINALPATH__ --replace_string=/opt/yunohost/mautrix_telegram --target_file=/opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,413: DEBUG - + local delimit=@
2021-06-07 23:15:10,414: DEBUG - + match_string=__FINALPATH__
2021-06-07 23:15:10,415: DEBUG - + replace_string=/opt/yunohost/mautrix_telegram
2021-06-07 23:15:10,416: DEBUG - + sed --in-place s@__FINALPATH__@/opt/yunohost/mautrix_telegram@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,420: DEBUG - + test -n 7.3
2021-06-07 23:15:10,421: DEBUG - + ynh_replace_string --match_string=__PHPVERSION__ --replace_string=7.3 --target_file=/opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,600: DEBUG - + local delimit=@
2021-06-07 23:15:10,601: DEBUG - + match_string=__PHPVERSION__
2021-06-07 23:15:10,601: DEBUG - + replace_string=7.3
2021-06-07 23:15:10,602: DEBUG - + sed --in-place s@__PHPVERSION__@7.3@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,609: DEBUG - + test -n ''
2021-06-07 23:15:10,609: DEBUG - + uniques_vars=($(grep -oP '__[A-Z0-9]+?[A-Z0-9_]*?[A-Z0-9]*?__' $file | sort --unique | sed "s@__\([^.]*\)__@\L\1@g" ))
2021-06-07 23:15:10,611: DEBUG - ++ grep -oP '__[A-Z0-9]+?[A-Z0-9_]*?[A-Z0-9]*?__' /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,612: DEBUG - ++ sort --unique
2021-06-07 23:15:10,617: DEBUG - ++ sed 's@__\([^.]*\)__@\L\1@g'
2021-06-07 23:15:10,625: DEBUG - + local delimit=@
2021-06-07 23:15:10,625: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,626: DEBUG - + [[ -v as_token ]]
2021-06-07 23:15:10,626: DEBUG - + match_string=__AS_TOKEN__
2021-06-07 23:15:10,626: DEBUG - + match_string=__AS_TOKEN__
2021-06-07 23:15:10,627: DEBUG - + replace_string='"This value is generated when generating the registration"'
2021-06-07 23:15:10,627: DEBUG - + replace_string='"This value is generated when generating the registration"'
2021-06-07 23:15:10,628: DEBUG - + replace_string='"This value is generated when generating the registration"'
2021-06-07 23:15:10,628: DEBUG - + sed --in-place 's@__AS_TOKEN__@"This value is generated when generating the registration"@g' /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,629: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,630: DEBUG - + [[ -v botadmin ]]
2021-06-07 23:15:10,631: DEBUG - + match_string=__BOTADMIN__
2021-06-07 23:15:10,631: DEBUG - + match_string=__BOTADMIN__
2021-06-07 23:15:10,632: DEBUG - + replace_string=@arntest:maindomain.tld
2021-06-07 23:15:10,632: DEBUG - + replace_string=@arntest:maindomain.tld
2021-06-07 23:15:10,632: DEBUG - + replace_string='\@arntest:maindomain.tld'
2021-06-07 23:15:10,633: DEBUG - + sed --in-place 's@__BOTADMIN__@\@arntest:maindomain.tld@g' /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,635: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,636: DEBUG - + [[ -v botname ]]
2021-06-07 23:15:10,636: DEBUG - + match_string=__BOTNAME__
2021-06-07 23:15:10,636: DEBUG - + match_string=__BOTNAME__
2021-06-07 23:15:10,637: DEBUG - + replace_string=telegrambot
2021-06-07 23:15:10,637: DEBUG - + replace_string=telegrambot
2021-06-07 23:15:10,638: DEBUG - + replace_string=telegrambot
2021-06-07 23:15:10,638: DEBUG - + sed --in-place s@__BOTNAME__@telegrambot@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,641: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,642: DEBUG - + [[ -v botusers ]]
2021-06-07 23:15:10,642: DEBUG - + match_string=__BOTUSERS__
2021-06-07 23:15:10,643: DEBUG - + match_string=__BOTUSERS__
2021-06-07 23:15:10,643: DEBUG - + replace_string=maindomain.tld
2021-06-07 23:15:10,643: DEBUG - + replace_string=maindomain.tld
2021-06-07 23:15:10,644: DEBUG - + replace_string=maindomain.tld
2021-06-07 23:15:10,644: DEBUG - + sed --in-place s@__BOTUSERS__@maindomain.tld@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,646: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,647: DEBUG - + [[ -v domain ]]
2021-06-07 23:15:10,647: DEBUG - + match_string=__DOMAIN__
2021-06-07 23:15:10,648: DEBUG - + match_string=__DOMAIN__
2021-06-07 23:15:10,648: DEBUG - + replace_string=https://matrix.maindomain.tld
2021-06-07 23:15:10,649: DEBUG - + replace_string=https://matrix.maindomain.tld
2021-06-07 23:15:10,649: DEBUG - + replace_string=https://matrix.maindomain.tld
2021-06-07 23:15:10,649: DEBUG - + sed --in-place s@__DOMAIN__@https://matrix.maindomain.tld@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,652: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,652: DEBUG - + [[ -v hs_token ]]
2021-06-07 23:15:10,653: DEBUG - + match_string=__HS_TOKEN__
2021-06-07 23:15:10,653: DEBUG - + match_string=__HS_TOKEN__
2021-06-07 23:15:10,654: DEBUG - + replace_string='"This value is generated when generating the registration"'
2021-06-07 23:15:10,654: DEBUG - + replace_string='"This value is generated when generating the registration"'
2021-06-07 23:15:10,655: DEBUG - + replace_string='"This value is generated when generating the registration"'
2021-06-07 23:15:10,655: DEBUG - + sed --in-place 's@__HS_TOKEN__@"This value is generated when generating the registration"@g' /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,657: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,657: DEBUG - + [[ -v log_filename ]]
2021-06-07 23:15:10,658: DEBUG - + match_string=__LOG_FILENAME__
2021-06-07 23:15:10,658: DEBUG - + match_string=__LOG_FILENAME__
2021-06-07 23:15:10,659: DEBUG - + replace_string=/var/log/mautrix_telegram/mautrix_telegram.log
2021-06-07 23:15:10,659: DEBUG - + replace_string=/var/log/mautrix_telegram/mautrix_telegram.log
2021-06-07 23:15:10,659: DEBUG - + replace_string=/var/log/mautrix_telegram/mautrix_telegram.log
2021-06-07 23:15:10,660: DEBUG - + sed --in-place s@__LOG_FILENAME__@/var/log/mautrix_telegram/mautrix_telegram.log@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,662: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,663: DEBUG - + [[ -v matrix_server_supports_asmux ]]
2021-06-07 23:15:10,663: DEBUG - + match_string=__MATRIX_SERVER_SUPPORTS_ASMUX__
2021-06-07 23:15:10,664: DEBUG - + match_string=__MATRIX_SERVER_SUPPORTS_ASMUX__
2021-06-07 23:15:10,664: DEBUG - + replace_string=false
2021-06-07 23:15:10,664: DEBUG - + replace_string=false
2021-06-07 23:15:10,665: DEBUG - + replace_string=false
2021-06-07 23:15:10,665: DEBUG - + sed --in-place s@__MATRIX_SERVER_SUPPORTS_ASMUX__@false@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,668: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,668: DEBUG - + [[ -v mautrix_bridge_db_name ]]
2021-06-07 23:15:10,669: DEBUG - + match_string=__MAUTRIX_BRIDGE_DB_NAME__
2021-06-07 23:15:10,669: DEBUG - + match_string=__MAUTRIX_BRIDGE_DB_NAME__
2021-06-07 23:15:10,670: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:10,670: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:10,670: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:10,671: DEBUG - + sed --in-place s@__MAUTRIX_BRIDGE_DB_NAME__@mautrix_telegram@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,673: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,674: DEBUG - + [[ -v mautrix_bridge_db_pwd ]]
2021-06-07 23:15:10,675: DEBUG - + match_string=__MAUTRIX_BRIDGE_DB_PWD__
2021-06-07 23:15:10,675: DEBUG - + match_string=__MAUTRIX_BRIDGE_DB_PWD__
2021-06-07 23:15:10,676: DEBUG - + replace_string=Gtr3HBWWfH4chSiW6pAf5vX3g0Az5g
2021-06-07 23:15:10,676: DEBUG - + replace_string=Gtr3HBWWfH4chSiW6pAf5vX3g0Az5g
2021-06-07 23:15:10,676: DEBUG - + replace_string=Gtr3HBWWfH4chSiW6pAf5vX3g0Az5g
2021-06-07 23:15:10,677: DEBUG - + sed --in-place s@__MAUTRIX_BRIDGE_DB_PWD__@Gtr3HBWWfH4chSiW6pAf5vX3g0Az5g@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,679: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,680: DEBUG - + [[ -v mautrix_bridge_user ]]
2021-06-07 23:15:10,680: DEBUG - + match_string=__MAUTRIX_BRIDGE_USER__
2021-06-07 23:15:10,680: DEBUG - + match_string=__MAUTRIX_BRIDGE_USER__
2021-06-07 23:15:10,681: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:10,681: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:10,682: DEBUG - + replace_string=mautrix_telegram
2021-06-07 23:15:10,682: DEBUG - + sed --in-place s@__MAUTRIX_BRIDGE_USER__@mautrix_telegram@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,685: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,686: DEBUG - + [[ -v port ]]
2021-06-07 23:15:10,686: DEBUG - + match_string=__PORT__
2021-06-07 23:15:10,687: DEBUG - + match_string=__PORT__
2021-06-07 23:15:10,687: DEBUG - + replace_string=29317
2021-06-07 23:15:10,688: DEBUG - + replace_string=29317
2021-06-07 23:15:10,688: DEBUG - + replace_string=29317
2021-06-07 23:15:10,688: DEBUG - + sed --in-place s@__PORT__@29317@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,692: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,693: DEBUG - + [[ -v server_name ]]
2021-06-07 23:15:10,693: DEBUG - + match_string=__SERVER_NAME__
2021-06-07 23:15:10,694: DEBUG - + match_string=__SERVER_NAME__
2021-06-07 23:15:10,694: DEBUG - + replace_string=maindomain.tld
2021-06-07 23:15:10,695: DEBUG - + replace_string=maindomain.tld
2021-06-07 23:15:10,695: DEBUG - + replace_string=maindomain.tld
2021-06-07 23:15:10,696: DEBUG - + sed --in-place s@__SERVER_NAME__@maindomain.tld@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,697: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,698: DEBUG - + [[ -v telegram_api_hash ]]
2021-06-07 23:15:10,698: DEBUG - + match_string=__TELEGRAM_API_HASH__
2021-06-07 23:15:10,698: DEBUG - + match_string=__TELEGRAM_API_HASH__
2021-06-07 23:15:10,699: DEBUG - + replace_string=wefga132u57ejzww
2021-06-07 23:15:10,699: DEBUG - + replace_string=wefga132u57ejzww
2021-06-07 23:15:10,700: DEBUG - + replace_string=wefga132u57ejzww
2021-06-07 23:15:10,700: DEBUG - + sed --in-place s@__TELEGRAM_API_HASH__@wefga132u57ejzww@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,703: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,704: DEBUG - + [[ -v telegram_api_id ]]
2021-06-07 23:15:10,704: DEBUG - + match_string=__TELEGRAM_API_ID__
2021-06-07 23:15:10,704: DEBUG - + match_string=__TELEGRAM_API_ID__
2021-06-07 23:15:10,705: DEBUG - + replace_string=12345
2021-06-07 23:15:10,705: DEBUG - + replace_string=12345
2021-06-07 23:15:10,706: DEBUG - + replace_string=12345
2021-06-07 23:15:10,706: DEBUG - + sed --in-place s@__TELEGRAM_API_ID__@12345@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,708: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,708: DEBUG - + [[ -v telegram_bot_token ]]
2021-06-07 23:15:10,709: DEBUG - + match_string=__TELEGRAM_BOT_TOKEN__
2021-06-07 23:15:10,709: DEBUG - + match_string=__TELEGRAM_BOT_TOKEN__
2021-06-07 23:15:10,710: DEBUG - + replace_string=**********
2021-06-07 23:15:10,710: DEBUG - + replace_string=**********
2021-06-07 23:15:10,711: DEBUG - + replace_string=**********
2021-06-07 23:15:10,711: DEBUG - + sed --in-place s@__TELEGRAM_BOT_TOKEN__@**********@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,714: DEBUG - + for one_var in "${uniques_vars[@]}"
2021-06-07 23:15:10,714: DEBUG - + [[ -v verify_server_ssl_certificates ]]
2021-06-07 23:15:10,715: DEBUG - + match_string=__VERIFY_SERVER_SSL_CERTIFICATES__
2021-06-07 23:15:10,715: DEBUG - + match_string=__VERIFY_SERVER_SSL_CERTIFICATES__
2021-06-07 23:15:10,715: DEBUG - + replace_string=true
2021-06-07 23:15:10,716: DEBUG - + replace_string=true
2021-06-07 23:15:10,716: DEBUG - + replace_string=true
2021-06-07 23:15:10,717: DEBUG - + sed --in-place s@__VERIFY_SERVER_SSL_CERTIFICATES__@true@g /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,719: DEBUG - + ynh_store_file_checksum --file=/opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,745: DEBUG - + local checksum_setting_name=checksum__opt_yunohost_mautrix_telegram_config.yaml
2021-06-07 23:15:10,747: DEBUG - ++ md5sum /opt/yunohost/mautrix_telegram/config.yaml
2021-06-07 23:15:10,748: DEBUG - ++ cut '--delimiter= ' --fields=1
2021-06-07 23:15:10,754: DEBUG - + ynh_app_setting_set --app=mautrix_telegram --key=checksum__opt_yunohost_mautrix_telegram_config.yaml --value=cd90271d742923510ad7ca8c77d8d8a6
2021-06-07 23:15:10,954: DEBUG - + [[ checksum__opt_yunohost_mautrix_telegram_config.yaml =~ (unprotected|protected|skipped)_ ]]
2021-06-07 23:15:10,956: DEBUG - + ynh_app_setting set mautrix_telegram checksum__opt_yunohost_mautrix_telegram_config.yaml cd90271d742923510ad7ca8c77d8d8a6
2021-06-07 23:15:11,128: DEBUG - + '[' -n '' ']'
2021-06-07 23:15:11,129: DEBUG - + unset backup_file_checksum
2021-06-07 23:15:11,130: DEBUG - + mkdir -p /var/log/mautrix_telegram
2021-06-07 23:15:11,135: DEBUG - + python3 -m venv /opt/yunohost/mautrix_telegram
2021-06-07 23:15:17,114: DEBUG - + /opt/yunohost/mautrix_telegram/bin/pip3 install --upgrade setuptools wheel
2021-06-07 23:15:22,228: DEBUG - Collecting setuptools
2021-06-07 23:15:23,621: DEBUG -   Using cached https://files.pythonhosted.org/packages/4e/78/56aa1b5f4d8ac548755ae767d84f0be54fdd9d404197a3d9e4659d272348/setuptools-57.0.0-py3-none-any.whl
2021-06-07 23:15:23,910: DEBUG - Collecting wheel
2021-06-07 23:15:24,123: DEBUG -   Using cached https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl
2021-06-07 23:15:24,297: DEBUG - Installing collected packages: setuptools, wheel
2021-06-07 23:15:24,298: DEBUG -   Found existing installation: setuptools 40.8.0
2021-06-07 23:15:24,469: DEBUG -     Uninstalling setuptools-40.8.0:
2021-06-07 23:15:24,599: DEBUG -       Successfully uninstalled setuptools-40.8.0
2021-06-07 23:15:25,897: DEBUG - Successfully installed setuptools-57.0.0 wheel-0.36.2
2021-06-07 23:15:26,108: DEBUG - + /opt/yunohost/mautrix_telegram/bin/pip3 install --upgrade '/opt/yunohost/mautrix_telegram/src/mautrix-telegram.tar.gz[postgres,speedups,qr_login]'
2021-06-07 23:15:29,749: DEBUG - Processing /opt/yunohost/mautrix_telegram/src/mautrix-telegram.tar.gz
2021-06-07 23:15:30,510: DEBUG -     Complete output from command python setup.py egg_info:
2021-06-07 23:15:30,511: DEBUG -     Traceback (most recent call last):
2021-06-07 23:15:30,511: DEBUG -       File "<string>", line 1, in <module>
2021-06-07 23:15:30,512: DEBUG -       File "/tmp/pip-req-build-95vaj7k6/setup.py", line 4, in <module>
2021-06-07 23:15:30,512: DEBUG -         from mautrix_telegram.get_version import git_tag, git_revision, version, linkified_version
2021-06-07 23:15:30,513: DEBUG -       File "/tmp/pip-req-build-95vaj7k6/mautrix_telegram/get_version.py", line 9, in <module>
2021-06-07 23:15:30,513: DEBUG -         "HOME": os.environ["HOME"],
2021-06-07 23:15:30,513: DEBUG -       File "/usr/lib/python3.7/os.py", line 678, in __getitem__
2021-06-07 23:15:30,514: DEBUG -         raise KeyError(key) from None
2021-06-07 23:15:30,514: DEBUG -     KeyError: 'HOME'
2021-06-07 23:15:30,515: DEBUG - 
2021-06-07 23:15:30,515: DEBUG -     ----------------------------------------
2021-06-07 23:15:30,535: WARNING - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-95vaj7k6/
2021-06-07 23:15:30,684: DEBUG - + ynh_exit_properly
2021-06-07 23:15:30,684: DEBUG - + local exit_code=1
2021-06-07 23:15:30,685: DEBUG - + rm -rf /var/cache/yunohost/download/
2021-06-07 23:15:30,689: DEBUG - + '[' 1 -eq 0 ']'
2021-06-07 23:15:30,689: DEBUG - + trap '' EXIT
2021-06-07 23:15:30,690: DEBUG - + set +o errexit
2021-06-07 23:15:30,690: DEBUG - + set +o nounset
2021-06-07 23:15:30,691: DEBUG - + sleep 0.5
2021-06-07 23:15:31,192: DEBUG - + type -t ynh_clean_setup
2021-06-07 23:15:31,193: DEBUG - + ynh_clean_setup
2021-06-07 23:15:31,194: DEBUG - + true
2021-06-07 23:15:31,194: DEBUG - + exit 1
2021-06-07 23:15:32,199: ERROR - Unable to install mautrix_telegram: An error occurred inside the app installation script