From 39a1c34a2bd841f993f2274ed78437b2a7ee77a9 Mon Sep 17 00:00:00 2001 From: Fran Date: Mon, 5 Jul 2021 15:51:46 +0200 Subject: [PATCH 1/8] Use elfi --- run.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/run.sh b/run.sh index a1870c8..1294323 100644 --- a/run.sh +++ b/run.sh @@ -80,8 +80,7 @@ echo "Odoo Logs: $OE_LOG_PATH/odoo-server.log" echo "Odoo Master Password: $OE_SUPERADMIN" if [ $WEB_SERVER = "nginx" ]; then echo "Nginx Odoo Site: /etc/nginx/sites-available/$OE_WEBSERV_CONF" -fi -if [ $WEB_SERVER = "apache2" ]; then +elif [ $WEB_SERVER = "apache2" ]; then echo "Apache Odoo Site: /etc/apache2/sites-available/$OE_WEBSERV_CONF" fi if [ $HTTP_PROTOCOL = "https" ] || [ $INSTALL_CERTIFICATE = "True" ]; then From 6ecb0afacff64559362e61374ee1614fef6c3026 Mon Sep 17 00:00:00 2001 From: Fran Date: Mon, 5 Jul 2021 16:07:36 +0200 Subject: [PATCH 2/8] -bash: lsb_release: orden no encontrada --- odoo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo.sh b/odoo.sh index bd28720..c1fc43e 100644 --- a/odoo.sh +++ b/odoo.sh @@ -40,7 +40,7 @@ INSTALL_WKHTMLTOPDF_VERSION=`wkhtmltopdf --version` if [ $INSTALL_WKHTMLTOPDF = "True" ] && [ -z "$INSTALL_WKHTMLTOPDF_VERSION" ]; then echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO $OE_VERSION ----" - OS_RELEASE=`lsb_release -sc` + OS_RELEASE=$(awk -F= '$1=="VERSION_CODENAME" { print $2 ;}' /etc/os-release) if [ "`getconf LONG_BIT`" == "64" ];then _url=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1."$OS_RELEASE"_amd64.deb else From b9acef7643083409f9814ac7302d44d2fe57980a Mon Sep 17 00:00:00 2001 From: Fran Date: Mon, 5 Jul 2021 16:23:16 +0200 Subject: [PATCH 3/8] Add arm64 Wkhtmltopdf --- odoo.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/odoo.sh b/odoo.sh index c1fc43e..21437ff 100644 --- a/odoo.sh +++ b/odoo.sh @@ -37,14 +37,18 @@ sudo npm install -g less less-plugin-clean-css #-------------------------------------------------- INSTALL_WKHTMLTOPDF_VERSION=`wkhtmltopdf --version` +WKHTMLTOPDF_VERSION="0.12.6-1" if [ $INSTALL_WKHTMLTOPDF = "True" ] && [ -z "$INSTALL_WKHTMLTOPDF_VERSION" ]; then echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO $OE_VERSION ----" OS_RELEASE=$(awk -F= '$1=="VERSION_CODENAME" { print $2 ;}' /etc/os-release) - if [ "`getconf LONG_BIT`" == "64" ];then - _url=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1."$OS_RELEASE"_amd64.deb - else - _url=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1."$OS_RELEASE"_i386.deb + ARCHITECTURE=$(arch) + if [ "$ARCHITECTURE" == "amd64" ];then + _url=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/$WKHTMLTOPDF_VERSION/wkhtmltox_"$WKHTMLTOPDF_VERSION"."$OS_RELEASE"_amd64.deb + elif [ "$ARCHITECTURE" == "i386" ];then + _url=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/$WKHTMLTOPDF_VERSION/wkhtmltox_"$WKHTMLTOPDF_VERSION"."$OS_RELEASE"_i386.deb + elif [ "$ARCHITECTURE" == "aarch64" ];then + _url=https://github.com/wkhtmltopdf/packaging/releases/download/$WKHTMLTOPDF_VERSION/wkhtmltox_"$WKHTMLTOPDF_VERSION"."$OS_RELEASE"_arm64.deb fi wget $_url sudo dpkg -i `basename $_url` From 2b85d5dc057d7c9329cece6329c97483334ce6c0 Mon Sep 17 00:00:00 2001 From: Fran Date: Mon, 5 Jul 2021 18:06:14 +0200 Subject: [PATCH 4/8] add libffi-dev package --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 1294323..f77015a 100644 --- a/run.sh +++ b/run.sh @@ -42,7 +42,7 @@ echo -e "\n---- Update Server ----" sudo apt-get update sudo apt-get upgrade -y -sudo apt-get install git wget build-essential dnsutils lsb-release software-properties-common sudo -y +sudo apt-get install git wget build-essential dnsutils lsb-release software-properties-common sudo libffi-dev -y source db.sh From 63898c97cfc1afcc08bba84c07f93e8598b0d722 Mon Sep 17 00:00:00 2001 From: Fran Date: Mon, 5 Jul 2021 18:24:54 +0200 Subject: [PATCH 5/8] mv libffi-dev --- odoo.sh | 2 +- run.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/odoo.sh b/odoo.sh index 21437ff..bc314f3 100644 --- a/odoo.sh +++ b/odoo.sh @@ -78,7 +78,7 @@ if [ ! -d "$OE_INSTALL_DIR/env" ]; then fi source $OE_INSTALL_DIR/env/bin/activate -sudo apt-get install libicu-dev libpq-dev libxml2-dev libxslt1-dev libsasl2-dev libldap2-dev libssl-dev zlib1g-dev -y +sudo apt-get install libicu-dev libpq-dev libxml2-dev libxslt1-dev libsasl2-dev libldap2-dev libssl-dev zlib1g-dev libffi-dev -y pip install --upgrade pip if [[ -f $OE_REPO/requirements.txt ]]; then diff --git a/run.sh b/run.sh index f77015a..1294323 100644 --- a/run.sh +++ b/run.sh @@ -42,7 +42,7 @@ echo -e "\n---- Update Server ----" sudo apt-get update sudo apt-get upgrade -y -sudo apt-get install git wget build-essential dnsutils lsb-release software-properties-common sudo libffi-dev -y +sudo apt-get install git wget build-essential dnsutils lsb-release software-properties-common sudo -y source db.sh From 7352d07d303f8dc701b21b20b54ded8b5f66bd19 Mon Sep 17 00:00:00 2001 From: Fran Date: Mon, 5 Jul 2021 18:43:14 +0200 Subject: [PATCH 6/8] Make the script executable --- run.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 run.sh diff --git a/run.sh b/run.sh old mode 100644 new mode 100755 From 982f8f5f069b139b397b4164998e0721d1f7cecc Mon Sep 17 00:00:00 2001 From: Fran Date: Mon, 5 Jul 2021 19:24:37 +0200 Subject: [PATCH 7/8] required dependency when compiling Pillow from source --- odoo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo.sh b/odoo.sh index bc314f3..2e62474 100644 --- a/odoo.sh +++ b/odoo.sh @@ -78,7 +78,7 @@ if [ ! -d "$OE_INSTALL_DIR/env" ]; then fi source $OE_INSTALL_DIR/env/bin/activate -sudo apt-get install libicu-dev libpq-dev libxml2-dev libxslt1-dev libsasl2-dev libldap2-dev libssl-dev zlib1g-dev libffi-dev -y +sudo apt-get install libicu-dev libpq-dev libxml2-dev libxslt1-dev libsasl2-dev libldap2-dev libssl-dev zlib1g-dev libffi-dev libjpeg-dev -y pip install --upgrade pip if [[ -f $OE_REPO/requirements.txt ]]; then From 94ff9a0028790b2cd54a4da958be625ec4f638d2 Mon Sep 17 00:00:00 2001 From: Fran Date: Tue, 6 Jul 2021 18:26:53 +0200 Subject: [PATCH 8/8] =?UTF-8?q?logrotate.sh:=20l=C3=ADnea=2012:=20/etc/log?= =?UTF-8?q?rotate.d/odoo:=20Permission=20denied?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logrotate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logrotate.sh b/logrotate.sh index faffbed..2e4f5a4 100644 --- a/logrotate.sh +++ b/logrotate.sh @@ -9,7 +9,7 @@ echo -e "Install logrotate" #-------------------------------------------------- sudo apt-get install -y logrotate -cat < /etc/logrotate.d/odoo +cat << EOF | sudo tee -a /etc/logrotate.d/odoo #Path odoo logs $OE_LOG_PATH/*.log { rotate 5