diff --git a/ct/jeedom.sh b/ct/jeedom.sh new file mode 100644 index 00000000..2c9586f4 --- /dev/null +++ b/ct/jeedom.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Mips +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://jeedom.com/ + +# App Default Values +APP="Jeedom" +# Name of the app (e.g. Google, Adventurelog, Apache-Guacamole" +var_tags="automation;smarthome" +# Tags for Proxmox VE, maximum 2 pcs., no spaces allowed, separated by a semicolon ; (e.g. database | adblock;dhcp) +var_cpu="2" +# Number of cores (1-X) (e.g. 4) - default are 2 +var_ram="2048" +# Amount of used RAM in MB (e.g. 2048 or 4096) +var_disk="16" +# Amount of used disk space in GB (e.g. 4 or 10) +var_os="debian" +# Default OS (e.g. debian, ubuntu, alpine) +var_version="11" +# Default OS version (e.g. 12 for debian, 24.04 for ubuntu, 3.20 for alpine) +var_unprivileged="1" +# 1 = unprivileged container, 0 = privileged container + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + # OS Check + if ! lsb_release -d | grep -q "Debian GNU/Linux"; then + msg_error "Wrong OS detected. Jeedom only supports Debian" + exit 1 + fi + + # Check if installation is present | -f for file, -d for folder + if [[ ! -f /var/www/html/core/config/version ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + msg_info "Updating OS" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "OS updated, you can now update Jeedom from the Web UI." + 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}${CL}" diff --git a/frontend/public/json/jeedom.json b/frontend/public/json/jeedom.json new file mode 100644 index 00000000..5d845a9c --- /dev/null +++ b/frontend/public/json/jeedom.json @@ -0,0 +1,54 @@ +{ + "name": "Jeedom", + "slug": "jeedom", + "categories": [ + 16 + ], + "date_created": "2025-03-06", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 80, + "documentation": "https://doc.jeedom.com", + "website": "https://jeedom.com/", + "logo": "https://jeedom.com/_next/image?url=%2Fassets%2Fimg%2Flogo.png&w=256&q=75", + "description": "De la maison individuelle aux infrastructures IOT\n\nJeedom: la solution sur mesure en open source", + "install_methods": [ + { + "type": "default", + "script": "ct/jeedom.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 16, + "os": "Debian", + "version": "11" + } + }, + { + "type": "default", + "script": "ct/jeedom.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 16, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "admin", + "password": "admin" + }, + "notes": [ + { + "text": "Use Debian 11 or 12 only", + "type": "warning" + }, + { + "text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.", + "type": "warning" + } + ] +} diff --git a/install/jeedom-install.sh b/install/jeedom-install.sh new file mode 100644 index 00000000..ff3ff2db --- /dev/null +++ b/install/jeedom-install.sh @@ -0,0 +1,111 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Mips +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://jeedom.com/ + +# Import Functions und Setup +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check + +# update_os # don't call this one because it is a bad idea to remove /usr/lib/python3.*/EXTERNALLY-MANAGED in this context +msg_info "Upgrade OS" +$STD apt-get update +$STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade +msg_ok "OS upgraded" + +# Installing Dependencies with the 3 core dependencies (curl;sudo;mc) +msg_info "Installing dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + lsb-release \ + grep \ + git +msg_ok "Dependencies installed" + +# OS Check +msg_info "Checking OS version" +if ! lsb_release -d | grep -q "Debian GNU/Linux"; then + msg_error "Wrong OS detected. Jeedom only supports Debian" + exit 1 +fi +msg_ok "OS check done" + +# Setup App +DEFAULT_BRANCH="master" +echo +while true; do + read -r -p "Enter branch to use (master, beta, alpha...) (Default: ${DEFAULT_BRANCH}): " BRANCH + BRANCH=${BRANCH:-$DEFAULT_BRANCH} + + if git ls-remote --heads https://github.com/jeedom/core.git "$BRANCH" | grep -q "$BRANCH"; then + break + else + echo "Branch '$BRANCH' does not exist. Please enter a valid branch." + fi +done + +msg_info "Downloading Jeedom installation script" +wget -q https://raw.githubusercontent.com/jeedom/core/"${BRANCH}"/install/install.sh +chmod +x install.sh +msg_ok "Installation script downloaded" + +msg_info "Install Jeedom main dependencies, please wait" +$STD ./install.sh -v "$BRANCH" -s 2 +msg_ok "Installed Jeedom main dependencies" + +msg_info "Install Database" +$STD ./install.sh -v "$BRANCH" -s 3 +msg_ok "Database installed" + +msg_info "Install Apache" +$STD ./install.sh -v "$BRANCH" -s 4 +msg_ok "Apache installed" + +msg_info "Install PHP and dependencies" +$STD ./install.sh -v "$BRANCH" -s 5 +msg_ok "PHP installed" + +msg_info "Download Jeedom core" +$STD ./install.sh -v "$BRANCH" -s 6 +msg_ok "Download done" + +msg_info "Database customisation" +$STD ./install.sh -v "$BRANCH" -s 7 +msg_ok "Database customisation done" + +msg_info "Jeedom customisation" +$STD ./install.sh -v "$BRANCH" -s 8 +msg_ok "Jeedom customisation done" + +msg_info "Configuring Jeedom" +$STD ./install.sh -v "$BRANCH" -s 9 +msg_ok "Jeedom configured" + +msg_info "Installing Jeedom" +$STD ./install.sh -v "$BRANCH" -s 10 +msg_ok "Jeedom installed" + +msg_info "Post installation" +$STD ./install.sh -v "$BRANCH" -s 11 +msg_ok "Post installation done" + +msg_info "Check installation" +$STD ./install.sh -v "$BRANCH" -s 12 +msg_ok "Installation checked, everything is successfuly installed. A reboot is recommended." + +motd_ssh +customize + +# Cleanup +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned"