From b692e65cf63c235608ff9e3ef37ae9be24970a85 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 15 May 2025 08:21:47 +0200 Subject: [PATCH] remove odoo --- ct/odoo.sh | 71 -------------------------------- frontend/public/json/odoo.json | 40 ------------------ install/odoo-install.sh | 74 ---------------------------------- 3 files changed, 185 deletions(-) delete mode 100644 ct/odoo.sh delete mode 100644 frontend/public/json/odoo.json delete mode 100644 install/odoo-install.sh diff --git a/ct/odoo.sh b/ct/odoo.sh deleted file mode 100644 index d51dea12..00000000 --- a/ct/odoo.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/odoo/odoo - -APP="Odoo" -var_tags="${var_tags:-erp}" -var_disk="${var_disk:-6}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-2048}" -var_os="${var_os:-debian}" -var_version="${var_version:-12}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - - if [[ ! -f /etc/odoo/odoo.conf ]]; then - msg_error "No ${APP} Installation Found!" - exit 1 - fi - RELEASE=$(curl -fsSL https://nightly.odoo.com/ | grep -oE 'href="[0-9]+\.[0-9]+/nightly"' | head -n1 | cut -d'"' -f2 | cut -d/ -f1) - 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/" | - sort -V | - tail -n1) - - if [[ "${LATEST_VERSION}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - msg_info "Stopping ${APP} service" - systemctl stop odoo - msg_ok "Stopped ${APP}" - - msg_info "Updating ${APP} to ${LATEST_VERSION}" - curl -fsSL https://nightly.odoo.com/${RELEASE}/nightly/deb/odoo_${RELEASE}.latest_all.deb -o /opt/odoo.deb - $STD apt install -y /opt/odoo.deb - echo "$LATEST_VERSION" >/opt/${APP}_version.txt - msg_ok "Updated ${APP} to ${LATEST_VERSION}" - - msg_info "Starting ${APP} service" - systemctl start odoo - msg_ok "Started ${APP}" - - msg_info "Cleaning Up" - rm -f /opt/odoo.deb - msg_ok "Cleaned" - - msg_ok "Updated Successfully" - else - msg_ok "No update required. ${APP} is already at ${LATEST_VERSION}" - fi - exit -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" -echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8069${CL}" diff --git a/frontend/public/json/odoo.json b/frontend/public/json/odoo.json deleted file mode 100644 index 3c118045..00000000 --- a/frontend/public/json/odoo.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "Odoo", - "slug": "odoo", - "categories": [ - 25 - ], - "date_created": "2025-05-14", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 8069, - "documentation": "https://www.odoo.com/en_EN/page/docs", - "website": "https://www.odoo.com/", - "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/odoo.svg", - "config_path": "/etc/odoo/odoo.conf", - "description": "Odoo is a comprehensive open-source business platform made up of modular apps that cover key areas such as CRM, accounting, inventory, sales, project management, HR, helpdesk, and e-commerce. All modules are tightly integrated, allowing businesses to fully digitize and automate their workflows. Its modular design makes it suitable for both small companies and large enterprises, with flexibility to adapt to different industries. Odoo combines user-friendliness with powerful functionality, offering a unified solution for managing a wide range of business operations.", - "install_methods": [ - { - "type": "default", - "script": "ct/odoo.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 6, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": "admin", - "password": "admin" - }, - "notes": [ - { - "text": "Database Credentials: `cat ~/odoo.creds`", - "type": "info" - } - ] -} diff --git a/install/odoo-install.sh b/install/odoo-install.sh deleted file mode 100644 index cf75acf6..00000000 --- a/install/odoo-install.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/tteck/Proxmox/raw/main/LICENSE -# Source: https://github.com/odoo/odoo - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies" -$STD apt-get install -y \ - build-essential \ - make -msg_ok "Installed Dependencies" - -RELEASE=$(curl -fsSL https://nightly.odoo.com/ | grep -oE 'href="[0-9]+\.[0-9]+/nightly"' | head -n1 | cut -d'"' -f2 | cut -d/ -f1) -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/" | - sort -V | - tail -n1) - -msg_info "Setup Odoo $RELEASE" -curl -fsSL https://nightly.odoo.com/${RELEASE}/nightly/deb/odoo_${RELEASE}.latest_all.deb -o /opt/odoo.deb -$STD apt install -y /opt/odoo.deb -msg_ok "Setup Odoo $RELEASE" - -msg_info "Setup PostgreSQL Database" -DB_NAME="odoo" -DB_USER="odoo_usr" -DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" -$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;" -$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';" -$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;" -$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;" -$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" -{ - echo "Odoo-Credentials" - echo -e "Odoo Database User: $DB_USER" - echo -e "Odoo Database Password: $DB_PASS" - echo -e "Odoo Database Name: $DB_NAME" -} >>~/odoo.creds -msg_ok "Setup PostgreSQL" - -msg_info "Configuring Odoo" -sed -i \ - -e "s|^;*db_host *=.*|db_host = localhost|" \ - -e "s|^;*db_port *=.*|db_port = 5432|" \ - -e "s|^;*db_user *=.*|db_user = $DB_USER|" \ - -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 -systemctl restart odoo -echo "${LATEST_VERSION}" >/opt/${APPLICATION}_version.txt -msg_ok "Configured Odoo" - -msg_info "Restarting Odoo" - -msg_ok "Restarted Odoo" - -motd_ssh -customize - -msg_info "Cleaning up" -rm -f /opt/odoo.deb -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned"