From dd4224772566527ed063b779418adab561139345 Mon Sep 17 00:00:00 2001 From: Marcel Walter Date: Sat, 25 Oct 2025 23:25:51 +0200 Subject: [PATCH] changed odoo to v13 and postgres to v13.16 and use branch odoo-13 in paths --- ct/odoo.sh | 4 +++- install/odoo-install.sh | 8 +++++--- misc/alpine-install.func | 6 +++--- misc/api.func | 2 +- misc/build.func | 22 +++++++++++----------- misc/core.func | 4 ++-- misc/create_lxc.sh | 4 ++-- misc/install.func | 8 ++++---- 8 files changed, 31 insertions(+), 27 deletions(-) diff --git a/ct/odoo.sh b/ct/odoo.sh index bae58a041..cf35827b8 100644 --- a/ct/odoo.sh +++ b/ct/odoo.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/build.func) +source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -36,6 +36,8 @@ function update_script() { fi RELEASE=$(curl -fsSL https://nightly.odoo.com/ | grep -oE 'href="[0-9]+\.[0-9]+/nightly"' | head -n1 | cut -d'"' -f2 | cut -d/ -f1) + msg_info "Skipping installation of recent v${RELEASE} and installing v13.0 instead" + RELEASE="13.0" LATEST_VERSION=$(curl -fsSL "https://nightly.odoo.com/${RELEASE}/nightly/deb/" | grep -oP "odoo_${RELEASE}\.\d+_all\.deb" | sed -E "s/odoo_(${RELEASE}\.[0-9]+)_all\.deb/\1/" | diff --git a/install/odoo-install.sh b/install/odoo-install.sh index a13bee800..a15eef2b0 100644 --- a/install/odoo-install.sh +++ b/install/odoo-install.sh @@ -19,9 +19,11 @@ curl -fsSL "http://archive.ubuntu.com/ubuntu/pool/universe/l/lxml-html-clean/pyt $STD dpkg -i /opt/python3-lxml-html-clean.deb msg_ok "Installed Dependencies" -PG_VERSION="18" setup_postgresql +PG_VERSION="13.16" setup_postgresql -RELEASE=$(curl -fsSL https://nightly.odoo.com/ | grep -oE 'href="[0-9]+\.[0-9]+/nightly"' | head -n1 | cut -d'"' -f2 | cut -d/ -f1) +RELEASE="$(curl -fsSL https://nightly.odoo.com/ | grep -oE 'href="[0-9]+\.[0-9]+/nightly"' | head -n1 | cut -d'"' -f2 | cut -d/ -f1)" +msg_info "Skipping installation of recent v${RELEASE} and installing v13.0 instead" +RELEASE="13.0" LATEST_VERSION=$(curl -fsSL "https://nightly.odoo.com/${RELEASE}/nightly/deb/" | grep -oP "odoo_${RELEASE}\.\d+_all\.deb" | sed -E "s/odoo_(${RELEASE}\.[0-9]+)_all\.deb/\1/" | @@ -58,7 +60,7 @@ sed -i \ -e "s|^;*db_password *=.*|db_password = $DB_PASS|" \ /etc/odoo/odoo.conf $STD sudo -u odoo odoo -c /etc/odoo/odoo.conf -d odoo -i base --stop-after-init -echo "${LATEST_VERSION}" >/opt/${APPLICATION}_version.txt +echo "${LATEST_VERSION}" >/opt/"${APPLICATION}"_version.txt msg_ok "Configured Odoo" msg_info "Restarting Odoo" diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 2ead1e3de..7da59fa72 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -6,7 +6,7 @@ if ! command -v curl >/dev/null 2>&1; then apk update && apk add curl >/dev/null 2>&1 fi -source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/core.func) +source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/core.func) load_functions # This function enables IPv6 if it's not disabled and sets verbose mode @@ -82,7 +82,7 @@ network_check() { update_os() { msg_info "Updating Container OS" $STD apk -U upgrade - source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/tools.func) + source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/tools.func) msg_ok "Updated Container OS" } @@ -151,7 +151,7 @@ EOF msg_ok "Customized Container" fi - echo "bash -c \"\$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/ct/${app}.sh)\"" >/usr/bin/update + echo "bash -c \"\$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then diff --git a/misc/api.func b/misc/api.func index c59ca565e..c9c6ba50e 100644 --- a/misc/api.func +++ b/misc/api.func @@ -1,6 +1,6 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: michelroegl-brunner -# License: MIT | https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/LICENSE +# License: MIT | https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/LICENSE post_to_api() { diff --git a/misc/build.func b/misc/build.func index 7b051f2eb..9024d10b8 100644 --- a/misc/build.func +++ b/misc/build.func @@ -15,13 +15,13 @@ variables() { CT_TYPE=${var_unprivileged:-$CT_TYPE} } -source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/api.func) +source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/api.func) if command -v curl >/dev/null 2>&1; then - source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/core.func) + source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/core.func) load_functions elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/core.func) + source <(wget -qO- https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/core.func) load_functions fi # This function enables error handling in the script by setting options and defining a trap for the ERR signal. @@ -32,7 +32,7 @@ catch_errors() { # This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. error_handler() { - source /dev/stdin <<<$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/api.func) + source /dev/stdin <<<$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/api.func) printf "\e[?25h" local exit_code="$?" local line_number="$1" @@ -980,7 +980,7 @@ install_script() { header_info echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" METHOD="config_file" - source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/config-file.func) + source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/config-file.func) config_file break ;; @@ -1051,7 +1051,7 @@ check_container_storage() { } start() { - source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/tools.func) + source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/tools.func) if command -v pveversion >/dev/null 2>&1; then install_script else @@ -1112,9 +1112,9 @@ build_container() { TEMP_DIR=$(mktemp -d) pushd "$TEMP_DIR" >/dev/null if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/alpine-install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/install.func)" fi export DIAGNOSTICS="$DIAGNOSTICS" @@ -1149,7 +1149,7 @@ build_container() { $PW " # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/create_lxc.sh)" $? + bash -c "$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/create_lxc.sh)" $? LXC_CONFIG="/etc/pve/lxc/${CTID}.conf" @@ -1342,7 +1342,7 @@ EOF' fi msg_ok "Customized LXC Container" - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/install/${var_install}.sh)" } # This function sets the description of the container. @@ -1354,7 +1354,7 @@ description() { cat < - Logo + Logo

${APP} LXC

diff --git a/misc/core.func b/misc/core.func index 7080597e8..fb8d718c6 100644 --- a/misc/core.func +++ b/misc/core.func @@ -1,5 +1,5 @@ # Copyright (c) 2021-2025 community-scripts ORG -# License: MIT | https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/LICENSE +# License: MIT | https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/LICENSE # ------------------------------------------------------------------------------ # Loads core utility groups once (colors, formatting, icons, defaults). @@ -163,7 +163,7 @@ silent() { get_header() { local app_name=$(echo "${APP,,}" | tr -d ' ') local app_type=${APP_TYPE:-ct} - local header_url="https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/${app_type}/headers/${app_name}" + local header_url="https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/${app_type}/headers/${app_name}" local local_header_path="/usr/local/community-scripts/headers/${app_type}/${app_name}" mkdir -p "$(dirname "$local_header_path")" diff --git a/misc/create_lxc.sh b/misc/create_lxc.sh index ed4bdec6f..d03819787 100644 --- a/misc/create_lxc.sh +++ b/misc/create_lxc.sh @@ -9,11 +9,11 @@ # if [ "$VERBOSE" == "yes" ]; then set -x; fi if command -v curl >/dev/null 2>&1; then - source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/core.func) + source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/core.func) load_functions #echo "(create-lxc.sh) Loaded core.func via curl" elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/core.func) + source <(wget -qO- https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/core.func) load_functions #echo "(create-lxc.sh) Loaded core.func via wget" fi diff --git a/misc/install.func b/misc/install.func index 862e1b107..8e90254fd 100644 --- a/misc/install.func +++ b/misc/install.func @@ -9,7 +9,7 @@ if ! command -v curl >/dev/null 2>&1; then apt-get update >/dev/null 2>&1 apt-get install -y curl >/dev/null 2>&1 fi -source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/core.func) +source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/core.func) load_functions # This function enables IPv6 if it's not disabled and sets verbose mode verb_ip6() { @@ -29,7 +29,7 @@ catch_errors() { # This function handles errors error_handler() { - source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/api.func) + source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/api.func) printf "\e[?25h" local exit_code="$?" local line_number="$1" @@ -147,7 +147,7 @@ EOF rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Container OS" - source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/misc/tools.func) + source <(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/misc/tools.func) } # This function modifies the message of the day (motd) and SSH settings @@ -197,7 +197,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi - echo "bash -c \"\$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/main/ct/${app}.sh)\"" >/usr/bin/update + echo "bash -c \"\$(curl -fsSL https://gitea.lan.hobbyhimmel.de/MarcelW/ProxmoxVE-CommunityScripts/raw/branch/odoo-13/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then