mirror of
https://github.com/YunoHost-Apps/mautrix_facebook_ynh.git
synced 2024-09-03 19:36:33 +02:00
better removal
This commit is contained in:
parent
e3602b31b4
commit
ea4051a0f4
1 changed files with 5 additions and 0 deletions
|
@ -23,6 +23,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
db_user=$db_name
|
db_user=$db_name
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
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_registration_path=$(ynh_app_setting_get --app=$app --key=synapse_registration_path)
|
||||||
|
synapse_db_name="matrix_$synapse_instance"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
|
@ -60,6 +61,10 @@ ynh_script_progression --message="Removing the PostgreSQL database..." --weight=
|
||||||
|
|
||||||
# Remove a database if it exists, along with the associated user
|
# 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_remove_db --db_user=$db_user --db_name=$db_name
|
||||||
|
ynh_psql_execute_as_root --database=$synapse_db_name --sql="DROP OWNED BY ""$app"";"
|
||||||
|
ynh_psql_execute_as_root --database=$synapse_db_name --sql="DROP USER ""$app"";"
|
||||||
|
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
|
# REMOVE APP MAIN DIR
|
||||||
|
|
Loading…
Add table
Reference in a new issue