mirror of
https://github.com/YunoHost-Apps/libreerp_ynh.git
synced 2024-09-03 19:36:13 +02:00
24 lines
No EOL
649 B
Bash
24 lines
No EOL
649 B
Bash
#!/bin/bash
|
|
app=odoo
|
|
domain=$(sudo yunohost app setting $app domain)
|
|
instance=$(sudo yunohost app setting $app instance)
|
|
|
|
# If removing master instance, remove Odoo. Else, remove database only
|
|
if [ "$instance" = "master" ]; then
|
|
# Remove Odoo
|
|
sudo yunohost service stop odoo
|
|
sudo yunohost service stop postgresql
|
|
sudo apt-get remove odoo -y
|
|
sudo apt-get remove wkhtmltopdf -y
|
|
sudo yunohost service remove odoo
|
|
sudo yunohost service remove postgresql
|
|
else
|
|
# Remove database: TO BE DONE
|
|
fi
|
|
|
|
# Remove NGINX conf
|
|
sudo rm /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
# Reload
|
|
sudo service nginx reload
|
|
sudo yunohost app ssowatconf |