diff --git a/scripts/install b/scripts/install index 5bdfae7..294b8b4 100644 --- a/scripts/install +++ b/scripts/install @@ -75,6 +75,7 @@ else sudo cp -R "$DESTDIR." /usr/ sudo rm -Rf $DESTDIR + ynh_psql_create_db $APPNAME $APPNAME "$dbpass" # Set admin password # TODO Support @ in password diff --git a/scripts/remove b/scripts/remove index 1854382..2c3725a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -21,9 +21,10 @@ sudo yunohost service stop odoo | true if [ "$instance" = "master" ]; then sudo rm -f /etc/apt/sources.list.d/odoo.list sudo apt-get update - ynh_package_remove odoo - sudo dpkg -P odoo sudo yunohost service remove odoo | true + ynh_package_remove odoo | true + sudo dpkg -P odoo | true + ynh_psql_drop_db $APPNAME | true fi # Remove database