Closed Gredin67 closed 2 years ago
!testme
> Reinstalling after removal.
Running: yunohost app install --force /app_folder -a "# mautrix_whatsapp manifest parameters&port=8449&synapsenumber=1&botname=signalbot&encryption=0&botadmin=package_checker&botusers=@johndoe:synapsedomain.tld&domain=sub.domain.tld&path=&admin=&is_public=&"
1410 INFO Installing mautrix_signal...
2711 INFO [....................] > Validating installation parameters...
2850 INFO [....................] > Finding an available port...
3284 INFO [+...................] > Storing installation settings...
5379 INFO [#++++++++++++++.....] > Installing dependencies...
53976 WARNING head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
61113 INFO '/etc/apt/trusted.gpg.d/mautrix_signal.asc' wasn't deleted because it doesn't exist.
65600 INFO [###############.....] > Creating a PostgreSQL database...
66599 WARNING The user mautrix_signal exists, please provide his password
68131 ERROR Unable to install mautrix_signal: An error occurred inside the app installation script
68136 INFO The operation 'Install the 'mautrix_signal' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20211028-032859-app_install-mautrix_signal' to get help
68172 WARNING Here's an extract of the logs before the crash. It might help debugging the error:
68172 INFO DEBUG - + db_name=mautrix_signal
68172 INFO DEBUG - + db_user=mautrix_signal
68173 INFO DEBUG - + ynh_app_setting_set --app=mautrix_signal --key=db_name --value=mautrix_signal
68173 INFO DEBUG - + [[ db_name =~ (unprotected|protected|skipped)_ ]]
68173 INFO DEBUG - + ynh_app_setting set mautrix_signal db_name mautrix_signal
68173 INFO DEBUG - + ynh_psql_test_if_first_run
68174 INFO DEBUG - + dpkg --list
68174 INFO DEBUG - + grep -q 'ii postgresql-11'
68174 INFO DEBUG - + '[' -e /etc/postgresql/11 ']'
68174 INFO DEBUG - + systemctl is-active postgresql@11-main -q
68174 INFO DEBUG - + systemctl is-enabled postgresql -q
68175 INFO DEBUG - + '[' '!' -f /etc/yunohost/psql ']'
68175 INFO DEBUG - + ynh_psql_setup_db --db_user=mautrix_signal --db_name=mautrix_signal
68175 INFO DEBUG - + db_pwd=
68175 INFO DEBUG - + ynh_psql_user_exists --user=mautrix_signal
68175 INFO DEBUG - + grep --quiet mautrix_signal
68176 INFO DEBUG - ++ cat /etc/yunohost/psql
68176 INFO DEBUG - + sudo --login --user=postgres PGUSER=postgres PGPASSWORD=********** psql -tAc 'SELECT rolname FROM pg_roles WHERE rolname='\''mautrix_signal'\'';'
68176 INFO DEBUG - + return 0
68176 INFO DEBUG - + '[' -z ']'
68176 INFO DEBUG - + ynh_die '--message=The user mautrix_signal exists, please provide his password'
Either we should better clean up during removal, or we should better handle that case during install. I'm leaning towards the former.
!testme
Linter rebased on master to prepare for #24