From fe3ad15f6be3172ece742f7e2b663ca6145bf915 Mon Sep 17 00:00:00 2001 From: Altanmur Date: Mon, 4 May 2020 14:40:10 +0800 Subject: [PATCH] [UPD] Choose install Postgresql --- odoo_install.sh | 15 ++++++++++----- odoo_install_debian.sh | 14 ++++++++++---- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/odoo_install.sh b/odoo_install.sh index 517a568..fb5271e 100644 --- a/odoo_install.sh +++ b/odoo_install.sh @@ -29,6 +29,8 @@ OE_VERSION="13.0" IS_ENTERPRISE="False" # Set this to True if you want to install Nginx! INSTALL_NGINX="False" +# Set this to True if you want to install Postgresql! +INSTALL_POSTGRESQL="True" # Set the superadmin password - if GENERATE_RANDOM_PASSWORD is set to "True" we will automatically generate a random password, otherwise we use this one OE_SUPERADMIN="admin" # Set to "True" to generate a random password, "False" to use the variable in OE_SUPERADMIN @@ -65,12 +67,15 @@ sudo apt-get upgrade -y #-------------------------------------------------- # Install PostgreSQL Server #-------------------------------------------------- -echo -e "\n---- Install PostgreSQL Server ----" -sudo apt-get install postgresql postgresql-server-dev-all -y - -echo -e "\n---- Creating the ODOO PostgreSQL User ----" -sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true +if [ $INSTALL_POSTGRESQL = "True" ]; then + echo -e "\n---- Install PostgreSQL Server ----" + sudo apt-get install postgresql postgresql-server-dev-all -y + echo -e "\n---- Creating the ODOO PostgreSQL User ----" + sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true +else + echo "Postgresql isn't installed due to the choice of the user!" +fi #-------------------------------------------------- # Install Dependencies #-------------------------------------------------- diff --git a/odoo_install_debian.sh b/odoo_install_debian.sh index 52c8e74..c38d50e 100644 --- a/odoo_install_debian.sh +++ b/odoo_install_debian.sh @@ -30,6 +30,8 @@ OE_VERSION="13.0" IS_ENTERPRISE="False" # Set this to True if you want to install Nginx! INSTALL_NGINX="False" +# Set this to True if you want to install Postgresql! +INSTALL_POSTGRESQL="True" # Set the superadmin password - if GENERATE_RANDOM_PASSWORD is set to "True" we will automatically generate a random password, otherwise we use this one OE_SUPERADMIN="admin" # Set to "True" to generate a random password, "False" to use the variable in OE_SUPERADMIN @@ -59,11 +61,15 @@ sudo apt-get upgrade -y #-------------------------------------------------- # Install PostgreSQL Server #-------------------------------------------------- -echo -e "\n---- Install PostgreSQL Server ----" -sudo apt-get install postgresql -y +if [ $INSTALL_POSTGRESQL = "True" ]; then + echo -e "\n---- Install PostgreSQL Server ----" + sudo apt-get install postgresql -y -echo -e "\n---- Creating the ODOO PostgreSQL User ----" -sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true + echo -e "\n---- Creating the ODOO PostgreSQL User ----" + sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true +else + echo "Postgresql isn't installed due to the choice of the user!" +fi #-------------------------------------------------- # Install Dependencies