This commit is contained in:
scith 2015-09-20 08:34:07 +02:00
parent dcc56bba1d
commit cf9cc8aaf8

View file

@ -1,10 +1,11 @@
#!/bin/bash #!/bin/bash
app=odoo app=odoo
domain=$(sudo yunohost app setting $app domain) domain=$(sudo yunohost app setting $app domain)
database=${domain//./-}
instance=$(sudo yunohost app setting $app instance) instance=$(sudo yunohost app setting $app instance)
# Remove database # Remove database
sudo -u postgres dropdb ${domain//./-} sudo -u postgres dropdb $database
# If removing master instance, remove Odoo. # If removing master instance, remove Odoo.
if [ "$instance" = "master" ]; then if [ "$instance" = "master" ]; then