From 50d922ec4acb18b0af7a5bac2e0408443b0a4b3c Mon Sep 17 00:00:00 2001 From: Mips2648 Date: Sat, 7 Jun 2025 13:55:45 +0200 Subject: [PATCH 01/10] add jeedom --- ct/jeedom.sh | 62 +++++++++++++++++ frontend/public/json/jeedom.json | 54 +++++++++++++++ install/jeedom-install.sh | 111 +++++++++++++++++++++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 ct/jeedom.sh create mode 100644 frontend/public/json/jeedom.json create mode 100644 install/jeedom-install.sh 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" From 392774b7918a1beda87d2b5e4329faaccdc77c9c Mon Sep 17 00:00:00 2001 From: Mips2648 Date: Sat, 7 Jun 2025 15:03:59 +0200 Subject: [PATCH 02/10] remove comments --- ct/jeedom.sh | 15 ++------------- install/jeedom-install.sh | 4 +--- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/ct/jeedom.sh b/ct/jeedom.sh index 2c9586f4..932cd3c8 100644 --- a/ct/jeedom.sh +++ b/ct/jeedom.sh @@ -1,27 +1,18 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG -# Author: Mips +# Author: Mips2648 # 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 @@ -33,13 +24,11 @@ function update_script() { 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 diff --git a/install/jeedom-install.sh b/install/jeedom-install.sh index ff3ff2db..9f7f13b9 100644 --- a/install/jeedom-install.sh +++ b/install/jeedom-install.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Copyright (c) 2021-2025 community-scripts ORG -# Author: Mips +# Author: Mips2648 # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://jeedom.com/ @@ -19,7 +19,6 @@ $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 \ @@ -30,7 +29,6 @@ $STD apt-get install -y \ 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" From dea29fd80b26aa0fba104100aa0c15efc1ab471e Mon Sep 17 00:00:00 2001 From: Mips2648 Date: Sat, 7 Jun 2025 15:13:57 +0200 Subject: [PATCH 03/10] remove comment --- install/jeedom-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/jeedom-install.sh b/install/jeedom-install.sh index 9f7f13b9..f08e0510 100644 --- a/install/jeedom-install.sh +++ b/install/jeedom-install.sh @@ -36,7 +36,6 @@ if ! lsb_release -d | grep -q "Debian GNU/Linux"; then fi msg_ok "OS check done" -# Setup App DEFAULT_BRANCH="master" echo while true; do @@ -102,7 +101,6 @@ msg_ok "Installation checked, everything is successfuly installed. A reboot is r motd_ssh customize -# Cleanup msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean From 745be2a16c56a8281200772e253c3aeef85314ad Mon Sep 17 00:00:00 2001 From: Mips2648 Date: Sat, 7 Jun 2025 15:14:08 +0200 Subject: [PATCH 04/10] translation --- frontend/public/json/jeedom.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/jeedom.json b/frontend/public/json/jeedom.json index 5d845a9c..c4c34d27 100644 --- a/frontend/public/json/jeedom.json +++ b/frontend/public/json/jeedom.json @@ -12,7 +12,7 @@ "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", + "description": "From individual homes to IoT infrastructures\n\nJeedom: the tailor-made open source solution", "install_methods": [ { "type": "default", From 44d6958fe86919297b0943e52ac80864dbb18ab4 Mon Sep 17 00:00:00 2001 From: Mips2648 Date: Sat, 7 Jun 2025 16:06:14 +0200 Subject: [PATCH 05/10] cleaning --- install/jeedom-install.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/install/jeedom-install.sh b/install/jeedom-install.sh index f08e0510..7ccddf0b 100644 --- a/install/jeedom-install.sh +++ b/install/jeedom-install.sh @@ -5,7 +5,6 @@ # 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 @@ -21,11 +20,7 @@ msg_ok "OS upgraded" msg_info "Installing dependencies" $STD apt-get install -y \ - curl \ - sudo \ - mc \ lsb-release \ - grep \ git msg_ok "Dependencies installed" From 5d7855ae0571f1f51c51b09da33a58012548dda7 Mon Sep 17 00:00:00 2001 From: Mips2648 Date: Mon, 9 Jun 2025 08:00:19 +0200 Subject: [PATCH 06/10] remove os check & update default var --- ct/jeedom.sh | 19 +++++++------------ install/jeedom-install.sh | 8 +------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/ct/jeedom.sh b/ct/jeedom.sh index 932cd3c8..b64d2685 100644 --- a/ct/jeedom.sh +++ b/ct/jeedom.sh @@ -6,13 +6,13 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # Source: https://jeedom.com/ APP="Jeedom" -var_tags="automation;smarthome" -var_cpu="2" -var_ram="2048" -var_disk="16" -var_os="debian" -var_version="11" -var_unprivileged="1" +var_tags="${var_tags:-automation;smarthome}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-16}" +var_os="${var_os:-debian}" +var_version="${var_version:-11}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables @@ -24,11 +24,6 @@ function update_script() { check_container_storage check_container_resources - if ! lsb_release -d | grep -q "Debian GNU/Linux"; then - msg_error "Wrong OS detected. Jeedom only supports Debian" - exit 1 - fi - if [[ ! -f /var/www/html/core/config/version ]]; then msg_error "No ${APP} Installation Found!" exit diff --git a/install/jeedom-install.sh b/install/jeedom-install.sh index 7ccddf0b..e8e7874c 100644 --- a/install/jeedom-install.sh +++ b/install/jeedom-install.sh @@ -5,6 +5,7 @@ # 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 @@ -24,13 +25,6 @@ $STD apt-get install -y \ git msg_ok "Dependencies installed" -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" - DEFAULT_BRANCH="master" echo while true; do From 5f11c71b6ead0d314915d2e0547a9665b9636968 Mon Sep 17 00:00:00 2001 From: Mips2648 Date: Mon, 9 Jun 2025 08:00:32 +0200 Subject: [PATCH 07/10] remove notes --- frontend/public/json/jeedom.json | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/frontend/public/json/jeedom.json b/frontend/public/json/jeedom.json index c4c34d27..cdd65e16 100644 --- a/frontend/public/json/jeedom.json +++ b/frontend/public/json/jeedom.json @@ -41,14 +41,5 @@ "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" - } - ] + "notes": [] } From 8c9146deff6c501827e51a292a004d86576fc3ad Mon Sep 17 00:00:00 2001 From: Mips2648 Date: Mon, 9 Jun 2025 08:10:31 +0200 Subject: [PATCH 08/10] revert to default update_os --- install/jeedom-install.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/install/jeedom-install.sh b/install/jeedom-install.sh index e8e7874c..4caea86c 100644 --- a/install/jeedom-install.sh +++ b/install/jeedom-install.sh @@ -12,12 +12,7 @@ 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" +update_os msg_info "Installing dependencies" $STD apt-get install -y \ From dd34e7641bf4cc46c48283de7f49943febd36d68 Mon Sep 17 00:00:00 2001 From: Mips2648 Date: Mon, 9 Jun 2025 08:11:19 +0200 Subject: [PATCH 09/10] remove comment --- install/jeedom-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/jeedom-install.sh b/install/jeedom-install.sh index 4caea86c..c9a736ab 100644 --- a/install/jeedom-install.sh +++ b/install/jeedom-install.sh @@ -5,7 +5,6 @@ # 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 From c4e15a3147fbd86fb4b4d1c204799a2365f1d8ae Mon Sep 17 00:00:00 2001 From: Mips2648 Date: Sat, 14 Jun 2025 10:41:35 +0200 Subject: [PATCH 10/10] add note on update --- frontend/public/json/jeedom.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/public/json/jeedom.json b/frontend/public/json/jeedom.json index cdd65e16..38fd42a5 100644 --- a/frontend/public/json/jeedom.json +++ b/frontend/public/json/jeedom.json @@ -41,5 +41,10 @@ "username": "admin", "password": "admin" }, - "notes": [] + "notes": [ + { + "text": "Only OS packages are updateable. To update Jeedom, please use the web interface.", + "type": "info" + } + ] }