[IMP] Ubuntu 22.04 wkhtmltopdf

Added feature to install correct version of wkhtmltopdf for 64-bit Ubuntu. No 32-bit .deb package seems to be available, so 64-bit only. #TODO: automatically select the correct install command and source file based on detecting Ubuntu version.
pull/384/head
Ossi Mantylahti 3 years ago committed by GitHub
parent f2ade58ccd
commit cc1406c93e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
################################################################################ ################################################################################
# Script for installing Odoo on Ubuntu 16.04, 18.04 and 20.04 (could be used for other version too) # Script for installing Odoo on Ubuntu 16.04, 18.04, 20.04 and 22.04 (could be used for other version too)
# Author: Yenthe Van Ginneken # Author: Yenthe Van Ginneken
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# This script will install Odoo on your Ubuntu 16.04 server. It can install multiple Odoo instances # This script will install Odoo on your Ubuntu server. It can install multiple Odoo instances
# in one Ubuntu because of the different xmlrpc_ports # in one Ubuntu because of the different xmlrpc_ports
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Make a new file: # Make a new file:
@ -53,6 +53,11 @@ ADMIN_EMAIL="odoo@example.com"
WKHTMLTOX_X64="https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.$(lsb_release -c -s)_amd64.deb" WKHTMLTOX_X64="https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.$(lsb_release -c -s)_amd64.deb"
WKHTMLTOX_X32="https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.$(lsb_release -c -s)_i386.deb" WKHTMLTOX_X32="https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.$(lsb_release -c -s)_i386.deb"
## For Ubuntu 22.04 uncomment to replace the 64 bit download link above with following:
#WKHTMLTOX_X64="https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb"
#(No 32 bit version release seems to exist)
#-------------------------------------------------- #--------------------------------------------------
# Update Server # Update Server
#-------------------------------------------------- #--------------------------------------------------
@ -111,6 +116,9 @@ if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
fi fi
sudo wget $_url sudo wget $_url
sudo gdebi --n `basename $_url` sudo gdebi --n `basename $_url`
#For Ubuntu 22.04 replace the above line with
#sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
else else

Loading…
Cancel
Save