From 7d629eaa54ec32c8b29ed738a48a07af8eb4999b Mon Sep 17 00:00:00 2001 From: ljf Date: Wed, 14 Dec 2016 11:04:44 +0100 Subject: [PATCH] [fix] Can't delete database --- scripts/remove | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 686b6dd..689737b 100644 --- a/scripts/remove +++ b/scripts/remove @@ -16,11 +16,11 @@ database=${domain//./-} instance=$(ynh_app_setting_get "$app" instance) +sudo yunohost service stop odoo # If removing master instance, remove Odoo. if [ "$instance" = "master" ]; then sudo rm -f /etc/apt/sources.list.d/odoo.list sudo apt-get update - sudo yunohost service stop odoo ynh_package_remove odoo ynh_package_remove wkhtmltopdf sudo rm -f /etc/odoo/openerp-server.conf @@ -30,6 +30,9 @@ fi # Remove database sudo su -c "dropdb $database" postgres +if [ "$instance" = "slave" ]; then + sudo yunohost service start odoo +fi # Remove NGINX conf sudo rm /etc/nginx/conf.d/$domain.d/$app.conf