mirror of
https://github.com/YunoHost-Apps/mautrix_telegram_ynh.git
synced 2024-09-03 19:45:55 +02:00
better removal
This commit is contained in:
parent
29780d21b1
commit
3aeca67af6
1 changed files with 3 additions and 0 deletions
|
@ -23,6 +23,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
db_user=$db_name
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
synapse_registration_path=$(ynh_app_setting_get --app=$app --key=synapse_registration_path)
|
||||
synapse_db_name="matrix_$synapse_instance"
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
|
@ -60,6 +61,8 @@ ynh_script_progression --message="Removing the PostgreSQL database..." --weight=
|
|||
|
||||
# Remove a database if it exists, along with the associated user
|
||||
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
ynh_psql_execute_as_root --database=$synapse_db_name --sql="DROP OWNED BY ""$botname"";"
|
||||
ynh_psql_execute_as_root --database=$synapse_db_name --sql="DROP USER ""$botname"";"
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
|
|
Loading…
Reference in a new issue