[fix] Remove unused db

This commit is contained in:
ljf 2016-12-14 11:36:55 +01:00
parent 159acba1e8
commit 7bb3ab96a8
2 changed files with 1 additions and 8 deletions

View file

@ -41,8 +41,6 @@ else
echo "Installing odoo" echo "Installing odoo"
dbname=$APPNAME
dbuser=$APPNAME
# Generate random password # Generate random password
# Fix a bug on ynh_string_random https://github.com/YunoHost/yunohost/pull/205/commits/0d6cf499a0b858e7009245fd11a9210188047c13 # Fix a bug on ynh_string_random https://github.com/YunoHost/yunohost/pull/205/commits/0d6cf499a0b858e7009245fd11a9210188047c13
dbpass=$(ynh_string_random | sed "s/\[/e/g" | sed "s/\]/e/g") dbpass=$(ynh_string_random | sed "s/\[/e/g" | sed "s/\]/e/g")
@ -65,10 +63,7 @@ else
sudo apt-get update sudo apt-get update
# Initialize installation # Initialize installation
ynh_package_install postgresql ynh_package_install postgresql odoo
# This db may be unused
ynh_psql_create_db "$dbname" "$dbuser" "$dbpass"
ynh_package_install odoo
# Install wkhtmltopdf to print PDF reports # Install wkhtmltopdf to print PDF reports
ynh_package_install xfonts-75dpi xfonts-base wkhtmltopdf ynh_package_install xfonts-75dpi xfonts-base wkhtmltopdf

View file

@ -25,8 +25,6 @@ if [ "$instance" = "master" ]; then
ynh_package_remove wkhtmltopdf ynh_package_remove wkhtmltopdf
sudo rm -f /etc/odoo/openerp-server.conf sudo rm -f /etc/odoo/openerp-server.conf
sudo yunohost service remove odoo sudo yunohost service remove odoo
ynh_psql_drop_db $APPNAME
ynh_psql_drop_user $APPNAME
fi fi
# Remove database # Remove database