Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions odoo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,18 @@ sudo npm install -g less less-plugin-clean-css
#--------------------------------------------------

INSTALL_WKHTMLTOPDF_VERSION=`wkhtmltopdf --version`
WKHTMLTOPDF_VERSION="0.12.6-1"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.12.6-1 add support for 64-bit ARM

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`
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
OS_RELEASE=$(awk -F= '$1=="VERSION_CODENAME" { print $2 ;}' /etc/os-release)
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`
Expand Down Expand Up @@ -74,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 libjpeg-dev -y
pip install --upgrade pip

if [[ -f $OE_REPO/requirements.txt ]]; then
Expand Down
3 changes: 1 addition & 2 deletions run.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down