mirror of
https://github.com/YunoHost-Apps/libreerp_ynh.git
synced 2024-09-03 19:36:13 +02:00
[fix] Can't delete database
This commit is contained in:
parent
173d6b9478
commit
7d629eaa54
1 changed files with 4 additions and 1 deletions
|
@ -16,11 +16,11 @@ database=${domain//./-}
|
||||||
instance=$(ynh_app_setting_get "$app" instance)
|
instance=$(ynh_app_setting_get "$app" instance)
|
||||||
|
|
||||||
|
|
||||||
|
sudo yunohost service stop odoo
|
||||||
# If removing master instance, remove Odoo.
|
# If removing master instance, remove Odoo.
|
||||||
if [ "$instance" = "master" ]; then
|
if [ "$instance" = "master" ]; then
|
||||||
sudo rm -f /etc/apt/sources.list.d/odoo.list
|
sudo rm -f /etc/apt/sources.list.d/odoo.list
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo yunohost service stop odoo
|
|
||||||
ynh_package_remove odoo
|
ynh_package_remove odoo
|
||||||
ynh_package_remove wkhtmltopdf
|
ynh_package_remove wkhtmltopdf
|
||||||
sudo rm -f /etc/odoo/openerp-server.conf
|
sudo rm -f /etc/odoo/openerp-server.conf
|
||||||
|
@ -30,6 +30,9 @@ fi
|
||||||
# Remove database
|
# Remove database
|
||||||
sudo su -c "dropdb $database" postgres
|
sudo su -c "dropdb $database" postgres
|
||||||
|
|
||||||
|
if [ "$instance" = "slave" ]; then
|
||||||
|
sudo yunohost service start odoo
|
||||||
|
fi
|
||||||
# Remove NGINX conf
|
# Remove NGINX conf
|
||||||
sudo rm /etc/nginx/conf.d/$domain.d/$app.conf
|
sudo rm /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue