1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pleroma_ynh.git synced 2024-09-03 20:15:59 +02:00

Fix remove when there is still connections

This commit is contained in:
yalh76 2019-02-03 00:14:19 +01:00
parent c2456158ba
commit f84b24b856

View file

@ -52,6 +52,9 @@ ynh_remove_systemd_config
# REMOVE THE POSTGRESQL DATABASE
#=================================================
ynh_psql_execute_as_root "\connect $db_name
SELECT pg_terminate_backend (pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = '$db_name';"
# Remove a database if it exists, along with the associated user
ynh_psql_remove_db "$db_name" "$app"