From 089b9ceedbd57bd3dc05d39be72f336ee40d9a80 Mon Sep 17 00:00:00 2001 From: Carlitos Melgar Date: Mon, 27 Apr 2020 01:20:38 -0400 Subject: [PATCH] https://www.shellcheck.net/ recommended the backslash and Bash Formatting added these lines --- odoo_install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/odoo_install.sh b/odoo_install.sh index 4bf38dd..2595158 100644 --- a/odoo_install.sh +++ b/odoo_install.sh @@ -162,12 +162,15 @@ if [ $GENERATE_RANDOM_PASSWORD = "True" ]; then echo -e "\n---- Generating random admin password ----\n" OE_SUPERADMIN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1) fi + sudo su root -c "printf 'admin_passwd = ${OE_SUPERADMIN}\n' >> /etc/${OE_CONFIG}.conf" -if [ $OE_VERSION > "11.0" ];then + +if [ $OE_VERSION \> "11.0" ]; then sudo su root -c "printf 'http_port = ${OE_PORT}\n' >> /etc/${OE_CONFIG}.conf" else sudo su root -c "printf 'xmlrpc_port = ${OE_PORT}\n' >> /etc/${OE_CONFIG}.conf" fi + sudo su root -c "printf 'logfile = /var/log/${OE_USER}/${OE_CONFIG}.log\n' >> /etc/${OE_CONFIG}.conf" if [ $IS_ENTERPRISE = "True" ]; then @@ -175,6 +178,7 @@ if [ $IS_ENTERPRISE = "True" ]; then else sudo su root -c "printf 'addons_path=${OE_HOME_EXT}/addons,${OE_HOME}/custom/addons\n' >> /etc/${OE_CONFIG}.conf" fi + sudo chown $OE_USER:$OE_USER /etc/${OE_CONFIG}.conf sudo chmod 640 /etc/${OE_CONFIG}.conf