aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoryalh76 <yalh@yahoo.com>2019-03-20 03:44:43 +0100
committeryalh76 <yalh@yahoo.com>2019-03-20 03:44:43 +0100
commit9d3b44450b36a14aa37ea9046f4a77574c3fdb15 (patch)
treebcfaca9633b54c946f6ac2cf4eb84b57560ad3e3 /scripts
parent2c7bff77eb0ae2af35009a183e1816513e25f34e (diff)
downloadmastodon_ynh-9d3b44450b36a14aa37ea9046f4a77574c3fdb15.tar.gz
mastodon_ynh-9d3b44450b36a14aa37ea9046f4a77574c3fdb15.tar.bz2
mastodon_ynh-9d3b44450b36a14aa37ea9046f4a77574c3fdb15.zip
Update remove
Diffstat (limited to 'scripts')
-rw-r--r--scripts/remove3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/remove b/scripts/remove
index 4acf266..af11b31 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -60,6 +60,9 @@ ynh_remove_systemd_config "$app-streaming"
#=================================================
ynh_print_info "Removing 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';"
+
# delete postgresql database & user
ynh_psql_remove_db $db_name $db_name