From 5692b95720c795eace7e49012fc5b79550b49e6d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 24 Mar 2025 19:34:48 +0000 Subject: [PATCH 0001/1614] Deleted files for issue: FileFlows --- ct/fileflows.sh | 73 ----------------------------- frontend/public/json/fileflows.json | 39 --------------- install/fileflows-install.sh | 72 ---------------------------- 3 files changed, 184 deletions(-) delete mode 100644 ct/fileflows.sh delete mode 100644 frontend/public/json/fileflows.json delete mode 100644 install/fileflows-install.sh diff --git a/ct/fileflows.sh b/ct/fileflows.sh deleted file mode 100644 index 5adc7c6..0000000 --- a/ct/fileflows.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: kkroboth -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://fileflows.com/ - -APP="FileFlows" -var_tags="media;automation" -var_cpu="2" -var_ram="2048" -var_disk="8" -var_os="debian" -var_version="12" -var_unprivileged="1" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - - if [[ ! -d /opt/fileflows ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - update_available=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable) - if [[ "${update_available}" == "true" ]]; then - msg_info "Stopping $APP" - systemctl stop fileflows - msg_ok "Stopped $APP" - - msg_info "Creating Backup" - backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz" - tar -czf $backup_filename -C /opt/fileflows Data - msg_ok "Backup Created" - - msg_info "Updating $APP to latest version" - temp_file=$(mktemp) - curl -fsSL https://fileflows.com/downloads/zip -o $temp_file - unzip -oq -d /opt/fileflows $temp_file - msg_ok "Updated $APP to latest version" - - msg_info "Starting $APP" - systemctl start fileflows - msg_ok "Started $APP" - - msg_info "Cleaning Up" - rm -rf $temp_file - rm -rf $backup_filename - msg_ok "Cleanup Completed" - - msg_ok "Update Successful" - 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}:19200${CL}" diff --git a/frontend/public/json/fileflows.json b/frontend/public/json/fileflows.json deleted file mode 100644 index d3b301c..0000000 --- a/frontend/public/json/fileflows.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "FileFlows", - "slug": "fileflows", - "categories": [ - 13 - ], - "date_created": "2025-03-07", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 19200, - "documentation": "https://fileflows.com/docs", - "website": "https://fileflows.com/", - "logo": "https://raw.githubusercontent.com/revenz/FileFlows/refs/heads/develop/icon.png", - "description": "FileFlows is a powerful, open-source tool for automating media file processing workflows, including encoding, decoding, and media management. It offers an intuitive GUI and extensive plugin support, making it ideal for tasks like video transcoding, organizing, and managing large media libraries.", - "install_methods": [ - { - "type": "default", - "script": "ct/fileflows.sh", - "resources": { - "cpu": 2, - "ram": 2, - "hdd": 8, - "os": "Debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "With Privileged/Unprivileged Hardware Acceleration Support", - "type": "info" - } - ] -} diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh deleted file mode 100644 index 72ce0f3..0000000 --- a/install/fileflows-install.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: kkroboth -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://fileflows.com/ - -# Import Functions und Setup -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 \ - curl \ - sudo \ - mc \ - ffmpeg -msg_ok "Installed Dependencies" - -read -r -p "Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? " prompt -if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - msg_info "Installing Intel Hardware Acceleration (non-free)" - cat </etc/apt/sources.list.d/non-free.list - -deb http://deb.debian.org/debian bookworm non-free non-free-firmware -deb-src http://deb.debian.org/debian bookworm non-free non-free-firmware - -deb http://deb.debian.org/debian-security bookworm-security non-free non-free-firmware -deb-src http://deb.debian.org/debian-security bookworm-security non-free non-free-firmware - -deb http://deb.debian.org/debian bookworm-updates non-free non-free-firmware -deb-src http://deb.debian.org/debian bookworm-updates non-free non-free-firmware -EOF - $STD apt-get update - $STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} -else - msg_info "Installing Intel Hardware Acceleration" - $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} -fi -msg_ok "Installed and Set Up Intel Hardware Acceleration" - -msg_info "Installing ASP.NET Core Runtime" -curl -fsSL https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -o packages-microsoft-prod.deb -$STD dpkg -i packages-microsoft-prod.deb -rm -rf packages-microsoft-prod.deb -$STD apt-get update -$STD apt-get install -y aspnetcore-runtime-8.0 -msg_ok "Installed ASP.NET Core Runtime" - -msg_info "Setup ${APPLICATION}" -$STD ln -svf /usr/bin/ffmpeg /usr/local/bin/ffmpeg -$STD ln -svf /usr/bin/ffprobe /usr/local/bin/ffprobe -temp_file=$(mktemp) -curl -fsSL https://fileflows.com/downloads/zip -o $temp_file -unzip -q -d /opt/fileflows $temp_file -(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true) -systemctl enable -q --now fileflows.service -msg_ok "Setup ${APPLICATION}" - -motd_ssh -customize - -msg_info "Cleaning up" -rm -f $temp_file -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" From 9bc2a9435b8bf070ce9e89192ddb545fc3107ac8 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 24 Mar 2025 22:33:54 +0100 Subject: [PATCH 0002/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index a36f6de..696f368 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -59,8 +59,9 @@ msg_info "Add ruby-build" mkdir -p ~/.rbenv/plugins cd ~/.rbenv/plugins RUBY_BUILD_RELEASE=$(curl -s https://api.github.com/repos/rbenv/ruby-build/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -s "https://github.com/rbenv/ruby-build/archive/refs/tags/${RUBY_BUILD_RELEASE}.zip" -o ruby-build.zip +curl -fsSL "https://github.com/rbenv/ruby-build/archive/refs/tags/${RUBY_BUILD_RELEASE}.zip" -o ruby-build.zip unzip ruby-build.zip +mv ruby-build-*/* ~/.rbenv/plugins echo "${RUBY_BUILD_RELEASE}" >~/.rbenv/plugins/RUBY_BUILD_version.txt msg_ok "Added ruby-build" @@ -168,6 +169,7 @@ customize msg_info "Cleaning up" rm -rf "/opt/manyfold.zip" rm -rf "~/.rbenv/plugins/ruby-build.zip" +rm -rf "~/.rbenv/plugins/ruby-build-*/*" $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From 9feba442772b5c2db420c47cce5def2e3c401f13 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Mon, 24 Mar 2025 23:20:16 +0100 Subject: [PATCH 0003/1614] revert --- install/fileflows-install.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 12689d3..87d21ec 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -36,19 +36,10 @@ deb http://deb.debian.org/debian bookworm-updates non-free non-free-firmware deb-src http://deb.debian.org/debian bookworm-updates non-free non-free-firmware EOF $STD apt-get update - $STD apt-get install -y \ - intel-media-va-driver-non-free \ - ocl-icd-libopencl1 \ - intel-opencl-icd \ - vainfo,intel-gpu-tools + $STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} else msg_info "Installing Intel Hardware Acceleration" - $STD apt-get install -y \ - va-driver-all \ - ocl-icd-libopencl1 \ - intel-opencl-icd \ - vainfo \ - intel-gpu-tools + $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} fi msg_ok "Installed and Set Up Intel Hardware Acceleration" From f498c8970453f6384fd7c7d8d25b99b9665ca85f Mon Sep 17 00:00:00 2001 From: tremor021 Date: Mon, 24 Mar 2025 23:21:41 +0100 Subject: [PATCH 0004/1614] revert --- frontend/public/json/fileflows.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/fileflows.json b/frontend/public/json/fileflows.json index 96b4c2a..d3b301c 100644 --- a/frontend/public/json/fileflows.json +++ b/frontend/public/json/fileflows.json @@ -19,7 +19,7 @@ "script": "ct/fileflows.sh", "resources": { "cpu": 2, - "ram": 2048, + "ram": 2, "hdd": 8, "os": "Debian", "version": "12" From 5672b3a25c8011f6693a14cfb598ea61151eef4a Mon Sep 17 00:00:00 2001 From: tremor021 Date: Mon, 24 Mar 2025 23:23:35 +0100 Subject: [PATCH 0005/1614] revert --- install/fileflows-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 87d21ec..cbb2df9 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -2,9 +2,10 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: kkroboth -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # Source: https://fileflows.com/ +# Import Functions und Setup source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 From 8d090cda1cf6d242f390bf0643bc6477ad7cbea4 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Mon, 24 Mar 2025 23:25:39 +0100 Subject: [PATCH 0006/1614] revert --- install/fileflows-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index cbb2df9..72ce0f3 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -6,7 +6,7 @@ # Source: https://fileflows.com/ # Import Functions und Setup -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors From 54ca06407ce98d57c996d904c2fb9f46b8c2f199 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 09:10:42 +0100 Subject: [PATCH 0007/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index 696f368..0fb2fb4 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -58,10 +58,10 @@ msg_ok "Installed Node.js/Yarn" msg_info "Add ruby-build" mkdir -p ~/.rbenv/plugins cd ~/.rbenv/plugins -RUBY_BUILD_RELEASE=$(curl -s https://api.github.com/repos/rbenv/ruby-build/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/rbenv/ruby-build/archive/refs/tags/${RUBY_BUILD_RELEASE}.zip" -o ruby-build.zip +RUBY_BUILD_RELEASE=$(curl -s https://api.github.com/repos/rbenv/ruby-build/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +curl -fsSL "https://github.com/rbenv/ruby-build/archive/refs/tags/v${RUBY_BUILD_RELEASE}.zip" -o ruby-build.zip unzip ruby-build.zip -mv ruby-build-*/* ~/.rbenv/plugins +mv ruby-build-* ~/.rbenv/plugins/ruby-build echo "${RUBY_BUILD_RELEASE}" >~/.rbenv/plugins/RUBY_BUILD_version.txt msg_ok "Added ruby-build" @@ -169,7 +169,6 @@ customize msg_info "Cleaning up" rm -rf "/opt/manyfold.zip" rm -rf "~/.rbenv/plugins/ruby-build.zip" -rm -rf "~/.rbenv/plugins/ruby-build-*/*" $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From e8c3d030f3939f528ec46d9efcc28bfa58d45034 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 09:20:31 +0100 Subject: [PATCH 0008/1614] extend gitea --- ct/alpine-gitea.sh | 7 ++++--- install/alpine-gitea-install.sh | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 66cb7db..8622b25 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -21,15 +21,16 @@ catch_errors function update_script() { msg_info "Updating Alpine Packages" - apk update && apk upgrade + $STD apk update + $STD apk upgrade msg_ok "Updated Alpine Packages" msg_info "Updating Gitea" - apk upgrade gitea + $STD apk upgrade gitea msg_ok "Updated Gitea" msg_info "Restarting Gitea" - rc-service gitea restart + $STD rc-service gitea restart msg_ok "Restarted Gitea" } diff --git a/install/alpine-gitea-install.sh b/install/alpine-gitea-install.sh index c5a4fe4..6db3c22 100644 --- a/install/alpine-gitea-install.sh +++ b/install/alpine-gitea-install.sh @@ -25,15 +25,15 @@ $STD apk add \ msg_ok "Installed Dependencies" msg_info "Installing Gitea" -apk add --no-cache gitea +$STD apk add --no-cache gitea msg_ok "Installed Gitea" msg_info "Enabling Gitea Service" -rc-update add gitea default +$STD rc-update add gitea default msg_ok "Enabled Gitea Service" msg_info "Starting Gitea" -service gitea start +$STD service gitea start msg_ok "Started Gitea" motd_ssh From 2aa4b1aa16fa966d8b50181623dff3c83fbddae8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 09:33:04 +0100 Subject: [PATCH 0009/1614] fixes --- ct/alpine-gitea.sh | 7 +++++-- install/alpine-install.sh | 2 +- misc/alpine-install.func | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 8622b25..a671f01 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -20,11 +20,14 @@ color catch_errors function update_script() { + header_info msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade + $STD apk update && apk upgrade msg_ok "Updated Alpine Packages" + echo "DEBUG: CT_TYPE before update_script=${CT_TYPE:-UNDEFINED}" + echo "DEBUG: var_unprivileged=${var_unprivileged:-UNDEFINED}" + msg_info "Updating Gitea" $STD apk upgrade gitea msg_ok "Updated Gitea" diff --git a/install/alpine-install.sh b/install/alpine-install.sh index 03027ab..2916be1 100644 --- a/install/alpine-install.sh +++ b/install/alpine-install.sh @@ -4,8 +4,8 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 0ecbc9c..2092193 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -192,4 +192,6 @@ customize() { bash -c "passwd -d root" >/dev/null 2>&1 msg_ok "Customized Container" fi + echo "bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update + chmod +x /usr/bin/update } From 4c3f2f0c0a4b3deb5e081d1c5850a17646dfd4cf Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 09:35:40 +0100 Subject: [PATCH 0010/1614] Update build.func --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index dea9e32..aa42ddd 100644 --- a/misc/build.func +++ b/misc/build.func @@ -12,6 +12,7 @@ variables() { DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. + CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an environment variable for the container type. } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) From 5fa42600af84b419a5d88b5f2cbb9d49a5dd8af7 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 10:28:59 +0100 Subject: [PATCH 0011/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 39 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index 0fb2fb4..41dce2f 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -93,27 +93,28 @@ $STD corepack prepare $YARN_VERSION --activate $STD corepack use $YARN_VERSION $STD yarn install cat </opt/.env -APP_VERSION=${RELEASE} -GUID=1002 -PUID=1001 -PUBLIC_HOSTNAME=subdomain.somehost.org -PUBLIC_PORT=5000 -SECRET_KEY_BASE=$(bundle exec rails secret) -REDIS_URL=redis://127.0.0.1:6379/1 -DATABASE_ADAPTER=postgresql -DATABASE_HOST=127.0.0.1 -DATABASE_USER=${DB_USER} -DATABASE_PASSWORD=${DB_PASS} -DATABASE_NAME=${DB_NAME} -DATABASE_CONNECTION_POOL=16 -MULTIUSER=enabled -HTTPS_ONLY=false -RAILS_ENV=production +export APP_VERSION=${RELEASE} +export GUID=1002 +export PUID=1001 +export PUBLIC_HOSTNAME=subdomain.somehost.org +export PUBLIC_PORT=5000 +export SECRET_KEY_BASE=$(bundle exec rails secret) +export REDIS_URL=redis://127.0.0.1:6379/1 +export DATABASE_ADAPTER=postgresql +export DATABASE_HOST=127.0.0.1 +export DATABASE_USER=${DB_USER} +export DATABASE_PASSWORD=${DB_PASS} +export DATABASE_NAME=${DB_NAME} +export DATABASE_CONNECTION_POOL=16 +export MULTIUSER=enabled +export HTTPS_ONLY=false +export RAILS_ENV=production EOF chown manyfold:manyfold /opt/.env -$STD source /opt/.env && bin/rails credentials:edit -$STD source /opt/.env && bin/rails db:migrate -$STD source /opt/.env && bin/rails assets:precompile +source /opt/.env +$STD bin/rails credentials:edit +$STD bin/rails db:migrate +$STD bin/rails assets:precompile echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed manyfold" From d3e63f17dd5c292e54117a16d2216b6f4d5fbd01 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 10:38:16 +0100 Subject: [PATCH 0012/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index 41dce2f..685e671 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -60,7 +60,7 @@ mkdir -p ~/.rbenv/plugins cd ~/.rbenv/plugins RUBY_BUILD_RELEASE=$(curl -s https://api.github.com/repos/rbenv/ruby-build/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL "https://github.com/rbenv/ruby-build/archive/refs/tags/v${RUBY_BUILD_RELEASE}.zip" -o ruby-build.zip -unzip ruby-build.zip +unzip -q ruby-build.zip mv ruby-build-* ~/.rbenv/plugins/ruby-build echo "${RUBY_BUILD_RELEASE}" >~/.rbenv/plugins/RUBY_BUILD_version.txt msg_ok "Added ruby-build" From 52a57f749f133778152be95c2a76502e66b9434e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 11:04:24 +0100 Subject: [PATCH 0013/1614] add polaris --- ct/polaris.sh | 40 ++++++++++++++++++++++ install/polaris-install.sh | 69 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 ct/polaris.sh create mode 100644 install/polaris-install.sh diff --git a/ct/polaris.sh b/ct/polaris.sh new file mode 100644 index 0000000..23ebf4a --- /dev/null +++ b/ct/polaris.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/agersant/polaris + +APP="Polaris" +var_tags="music" +var_cpu="3" +var_ram="2048" +var_disk="7" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/polaris ]]; then + msg_error "No Installation Found!" + exit + fi +} + +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}meilisearch: http://${IP}:5050${CL}" diff --git a/install/polaris-install.sh b/install/polaris-install.sh new file mode 100644 index 0000000..76577e3 --- /dev/null +++ b/install/polaris-install.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# 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/agersant/polaris + +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 \ + make \ + git \ + build-essential \ + binutils \ + pkg-config \ + libsqlite3-dev \ + libssl-dev +msg_ok "Installed Dependencies" + +msg_info "Installing Rust" +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal +echo 'export PATH=~/.cargo/bin:$PATH' >>~/.bashrc +export PATH=~/.cargo/bin:$PATH +msg_ok "Installed Rust" + +msg_info "Downloading and Installing Polaris" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/agersant/polaris/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/agersant/polaris/archive/refs/tags/${RELEASE}.tar.gz" +tar -xzf ${RELEASE}.tar.gz +mv polaris-${RELEASE} /opt/polaris +cd /opt/polaris +$STD cargo build --release +msg_ok "Installed Polaris" + +msg_info "Creating Service" +cat </etc/systemd/system/polaris.service +[Unit] +Description=Polaris Music Server +After=network.target + +[Service] +Type=simple +Environment=PATH=$PATH +WorkingDirectory=/opt/polaris +ExecStart=/opt/polaris/target/release/polaris +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now polaris +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/${RELEASE}.tar.gz +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 14e2dcfea8fb2f31628c06527751b056c890fd4e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 25 Mar 2025 10:04:40 +0000 Subject: [PATCH 0014/1614] Update .app files --- ct/headers/polaris | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/polaris diff --git a/ct/headers/polaris b/ct/headers/polaris new file mode 100644 index 0000000..3a9143c --- /dev/null +++ b/ct/headers/polaris @@ -0,0 +1,6 @@ + ____ __ _ + / __ \____ / /___ ______(_)____ + / /_/ / __ \/ / __ `/ ___/ / ___/ + / ____/ /_/ / / /_/ / / / (__ ) +/_/ \____/_/\__,_/_/ /_/____/ + From 411528b4e898ffaf594cb677eb9fe3916f709510 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 11:32:05 +0100 Subject: [PATCH 0015/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index 685e671..d83b6a8 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -98,7 +98,6 @@ export GUID=1002 export PUID=1001 export PUBLIC_HOSTNAME=subdomain.somehost.org export PUBLIC_PORT=5000 -export SECRET_KEY_BASE=$(bundle exec rails secret) export REDIS_URL=redis://127.0.0.1:6379/1 export DATABASE_ADAPTER=postgresql export DATABASE_HOST=127.0.0.1 From 9112c766b5f00d0e2c987507ca7e9b92330681c3 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 11:32:44 +0100 Subject: [PATCH 0016/1614] Update manyfold.sh --- ct/manyfold.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/manyfold.sh b/ct/manyfold.sh index 991e78b..d2d434b 100644 --- a/ct/manyfold.sh +++ b/ct/manyfold.sh @@ -7,8 +7,8 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ APP="Manyfold" var_tags="network" -var_cpu="2" -var_ram="1024" +var_cpu="4" +var_ram="4096" var_disk="15" var_os="debian" var_version="12" From d040dfdca92de1c5c807ccedf4b42d93aca6cc53 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 11:48:08 +0100 Subject: [PATCH 0017/1614] add fumadocs --- ct/fumadocs.sh | 40 ++++++++++++++++++++++ install/fumadocs-install.sh | 66 +++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 ct/fumadocs.sh create mode 100644 install/fumadocs-install.sh diff --git a/ct/fumadocs.sh b/ct/fumadocs.sh new file mode 100644 index 0000000..d0f6221 --- /dev/null +++ b/ct/fumadocs.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/fuma-nama/fumadoc + +APP="Fumadocs" +var_tags="documentation" +var_cpu="3" +var_ram="2048" +var_disk="7" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/fumadocs ]]; then + msg_error "No Installation Found!" + exit + fi +} + +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}meilisearch: http://${IP}:5050${CL}" diff --git a/install/fumadocs-install.sh b/install/fumadocs-install.sh new file mode 100644 index 0000000..c89194e --- /dev/null +++ b/install/fumadocs-install.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE + +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 \ + gnupg \ + ca-certificates +msg_ok "Installed Dependencies" + +msg_info "Installing Node.js" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g bun +msg_ok "Installed Node.js" + +msg_info "Installing Fumadocs" +temp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/fuma-nama/fumadocs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +export NODE_OPTIONS="--max-old-space-size=2048" +wget -q https://github.com/fuma-nama/fumadocs/archive/refs/tags/${RELEASE}.tar.gz -O $temp_file +tar zxf $temp_file +mv fumadocs-* "${PWD}/fumadocs" +cd /opt/fumadocs +$STD bun install +bun create fumadocs-app +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Fumadocs" + +msg_info "Creating Service" +cat </etc/systemd/system/fumadocs.service +[Unit] +Description=Fumadocs Documentation Server +After=network.target + +[Service] +WorkingDirectory=/opt/fumadocs +ExecStart=/usr/bin/bun run dev +Restart=always + +[Install] +WantedBy=multi-user.target +msg_ok "Created Service" +EOF + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 4c0d96afdd841454742ed46b23c832f6ac7ccf41 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 25 Mar 2025 10:48:40 +0000 Subject: [PATCH 0018/1614] Update .app files --- ct/headers/fumadocs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/fumadocs diff --git a/ct/headers/fumadocs b/ct/headers/fumadocs new file mode 100644 index 0000000..ff96d5c --- /dev/null +++ b/ct/headers/fumadocs @@ -0,0 +1,6 @@ + ______ __ + / ____/_ ______ ___ ____ _____/ /___ __________ + / /_ / / / / __ `__ \/ __ `/ __ / __ \/ ___/ ___/ + / __/ / /_/ / / / / / / /_/ / /_/ / /_/ / /__(__ ) +/_/ \__,_/_/ /_/ /_/\__,_/\__,_/\____/\___/____/ + From 7cc01ade9c3ac2793755c769a4a38641a9122190 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 12:11:51 +0100 Subject: [PATCH 0019/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 41 ++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index d83b6a8..53108d0 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -69,7 +69,28 @@ msg_info "Adding manyfold user" useradd -m -s /usr/bin/bash manyfold msg_ok "Added manyfold user" +msg_info "Setting .env file" +cat </opt/.env +export APP_VERSION=${RELEASE} +export GUID=1002 +export PUID=1001 +export PUBLIC_HOSTNAME=subdomain.somehost.org +export PUBLIC_PORT=5000 +export REDIS_URL=redis://127.0.0.1:6379/1 +export DATABASE_ADAPTER=postgresql +export DATABASE_HOST=127.0.0.1 +export DATABASE_USER=${DB_USER} +export DATABASE_PASSWORD=${DB_PASS} +export DATABASE_NAME=${DB_NAME} +export DATABASE_CONNECTION_POOL=16 +export MULTIUSER=enabled +export HTTPS_ONLY=false +export RAILS_ENV=production +EOF +msg_ok ".env file setup" + msg_info "Installing Manyfold" +source /opt/.env RELEASE=$(curl -s https://api.github.com/repos/manyfold3d/manyfold/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') cd /opt curl -fsSL "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip" -o manyfold.zip @@ -91,26 +112,8 @@ $STD npm install --global corepack corepack enable $STD corepack prepare $YARN_VERSION --activate $STD corepack use $YARN_VERSION -$STD yarn install -cat </opt/.env -export APP_VERSION=${RELEASE} -export GUID=1002 -export PUID=1001 -export PUBLIC_HOSTNAME=subdomain.somehost.org -export PUBLIC_PORT=5000 -export REDIS_URL=redis://127.0.0.1:6379/1 -export DATABASE_ADAPTER=postgresql -export DATABASE_HOST=127.0.0.1 -export DATABASE_USER=${DB_USER} -export DATABASE_PASSWORD=${DB_PASS} -export DATABASE_NAME=${DB_NAME} -export DATABASE_CONNECTION_POOL=16 -export MULTIUSER=enabled -export HTTPS_ONLY=false -export RAILS_ENV=production -EOF chown manyfold:manyfold /opt/.env -source /opt/.env +rm /opt/manyfold/config/credentials.yml.enc $STD bin/rails credentials:edit $STD bin/rails db:migrate $STD bin/rails assets:precompile From a717704cc62ed0b5959dff6032c95f73e557045d Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 12:24:46 +0100 Subject: [PATCH 0020/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index 53108d0..fc16d63 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -45,6 +45,17 @@ echo "Manyfold Database Name: $DB_NAME" } >> ~/manyfold.creds msg_ok "Set up PostgreSQL" +msg_info "Downloading Manyfold" +RELEASE=$(curl -s https://api.github.com/repos/manyfold3d/manyfold/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +cd /opt +curl -fsSL "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip" -o manyfold.zip +unzip -q manyfold.zip +mv /opt/manyfold-${RELEASE}/ /opt/manyfold +RUBY_VERSION=$(cat .ruby-version) +YARN_VERSION=$(grep '"packageManager":' package.json | sed -E 's/.*"(yarn@[0-9\.]+)".*/\1/') +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Downloaded Manyfold" + msg_info "Setting up Node.js/Yarn" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg @@ -65,6 +76,13 @@ mv ruby-build-* ~/.rbenv/plugins/ruby-build echo "${RUBY_BUILD_RELEASE}" >~/.rbenv/plugins/RUBY_BUILD_version.txt msg_ok "Added ruby-build" +msg_info "Installing ruby version" +$STD rbenv install $RUBY_VERSION +echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc +echo 'eval "$(rbenv init -)"' >> ~/.bashrc +source ~/.bashrc +msg_ok "Installed ruby" + msg_info "Adding manyfold user" useradd -m -s /usr/bin/bash manyfold msg_ok "Added manyfold user" @@ -91,20 +109,9 @@ msg_ok ".env file setup" msg_info "Installing Manyfold" source /opt/.env -RELEASE=$(curl -s https://api.github.com/repos/manyfold3d/manyfold/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -cd /opt -curl -fsSL "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip" -o manyfold.zip -unzip -q manyfold.zip -mv /opt/manyfold-${RELEASE}/ /opt/manyfold cd /opt/manyfold chown -R manyfold:manyfold /opt/manyfold -RUBY_VERSION=$(cat .ruby-version) -YARN_VERSION=$(grep '"packageManager":' package.json | sed -E 's/.*"(yarn@[0-9\.]+)".*/\1/') $STD gem install bundler -$STD rbenv install $RUBY_VERSION -echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc -echo 'eval "$(rbenv init -)"' >> ~/.bashrc -source ~/.bashrc $STD rbenv global $RUBY_VERSION $STD bundle install $STD gem install sidekiq @@ -117,7 +124,6 @@ rm /opt/manyfold/config/credentials.yml.enc $STD bin/rails credentials:edit $STD bin/rails db:migrate $STD bin/rails assets:precompile -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed manyfold" msg_info "Creating Service" From 635b5b7132befd13b1ca40f5c58c44d0d7c5e58e Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 12:28:36 +0100 Subject: [PATCH 0021/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index fc16d63..4ef2e8e 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -51,8 +51,8 @@ cd /opt curl -fsSL "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip" -o manyfold.zip unzip -q manyfold.zip mv /opt/manyfold-${RELEASE}/ /opt/manyfold -RUBY_VERSION=$(cat .ruby-version) -YARN_VERSION=$(grep '"packageManager":' package.json | sed -E 's/.*"(yarn@[0-9\.]+)".*/\1/') +RUBY_VERSION=$(cat /opt/manyfold.ruby-version) +YARN_VERSION=$(grep '"packageManager":' /opt/manyfold/package.json | sed -E 's/.*"(yarn@[0-9\.]+)".*/\1/') echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Downloaded Manyfold" From e7fb73a4f61568077aa70352346a7eed484b06d1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 12:33:41 +0100 Subject: [PATCH 0022/1614] add jsons --- frontend/public/json/fumadocs.json | 34 ++++++++++++++++++++++++++++++ frontend/public/json/polaris.json | 34 ++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 frontend/public/json/fumadocs.json create mode 100644 frontend/public/json/polaris.json diff --git a/frontend/public/json/fumadocs.json b/frontend/public/json/fumadocs.json new file mode 100644 index 0000000..59d73df --- /dev/null +++ b/frontend/public/json/fumadocs.json @@ -0,0 +1,34 @@ +{ + "name": "Fumadocs", + "slug": "fumadocs", + "categories": [ + 10 + ], + "date_created": "2025-03-25", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 3000, + "documentation": "https://fumadocs.vercel.app/docs/ui", + "website": "https://fumadocs.vercel.app/", + "logo": "https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/dev/documents/logo.png", + "description": "Fumadocs is a flexible and high-performance framework for creating well-structured documentation websites using Next.js. It allows developers to write content and transform it into structured data. Fumadocs supports various content sources, including MDX and Content Collections, and integrates search solutions like Orama and Algolia. It also provides interactive components to enhance the user experience.", + "install_methods": [ + { + "type": "default", + "script": "ct/fumadocs.sh", + "resources": { + "cpu": 3, + "ram": 2048, + "hdd": 7, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file diff --git a/frontend/public/json/polaris.json b/frontend/public/json/polaris.json new file mode 100644 index 0000000..d63a432 --- /dev/null +++ b/frontend/public/json/polaris.json @@ -0,0 +1,34 @@ +{ + "name": "Polaris", + "slug": "polaris", + "categories": [ + 13 + ], + "date_created": "2025-03-25", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 80, + "documentation": "https://github.com/agersant/polaris/blob/master/docs/SETUP.md", + "website": "https://github.com/agersant/polaris", + "logo": "https://raw.githubusercontent.com/agersant/polaris/refs/heads/master/res/branding/logo/sticker_print.svg", + "description": "Polaris is a self-hosted music streaming server that allows you to enjoy your personal music collection from any computer or mobile device. It is a free and open-source application with no premium version. Polaris is highly performant and responsive, supporting large music libraries with over 100,000 tracks. It features an intuitive user interface and supports various audio formats, including FLAC, MP3, MP4, OGG, and WAV. There is an Android client available through the Google Play Store, F-Droid, or GitHub Releases.", + "install_methods": [ + { + "type": "default", + "script": "ct/polaris.sh", + "resources": { + "cpu": 3, + "ram": 2048, + "hdd": 7, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file From 5d83b281dce20d90d57bd1c7732426d65429d03e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 12:51:06 +0100 Subject: [PATCH 0023/1614] Update debian-install.sh --- install/debian-install.sh | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/install/debian-install.sh b/install/debian-install.sh index 2f33c00..9b7aa8f 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -14,9 +14,42 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y python3 +$STD apt-get install -y lsb-release msg_ok "Installed Dependencies" +msg_info "Setup DISTRO env" +DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" +echo $DISTRO +msg_ok "Setup DISTRO" + +msg_info "Setting up PostgreSQL Repository" +curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg +echo "deb https://apt.postgresql.org/pub/repos/apt ${DISTRO}-pgdg main" >/etc/apt/sources.list.d/pgdg.list +apt-get update +apt-get install -y postgresql +msg_ok "Set up PostgreSQL Repository" + +msg_info "Setting up Matrix Server" +curl -fsSL https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg -o /usr/share/keyrings/matrix-org-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian ${VERSION} main" >/etc/apt/sources.list.d/matrix-org.list +apt-get update +apt-get install -y matrix-synapse-py3 +msg_info "Set up Matrix Server" + +msg_info "Setup EVCC" +curl -fsSL https://dl.evcc.io/public/evcc/stable/gpg.EAD5D0E07B0EC0FD.key | gpg --dearmor -o /etc/apt/keyrings/evcc-stable.gpg +echo "deb [signed-by=/etc/apt/keyrings/evcc-stable.gpg] https://dl.evcc.io/public/evcc/stable/deb/debian ${VERSION} main" >/etc/apt/sources.list.d/evcc-stable.list +apt-get update +apt-get install -y evcc +msg_ok "Setup EVCC" + +msg_info "Setup PHP" +curl -fsSL https://packages.sury.org/php/apt.gpg -o /usr/share/keyrings/deb.sury.org-php.gpg +echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ ${VERSION} main" >/etc/apt/sources.list.d/php.list +apt-get update +apt-get install -y php +msg_ok "Setup PHP" + motd_ssh customize From bcb66a36145088c1a2efd3a059e5b575524ca23f Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:04:14 +0100 Subject: [PATCH 0024/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index 4ef2e8e..1a18ed1 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -51,7 +51,7 @@ cd /opt curl -fsSL "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip" -o manyfold.zip unzip -q manyfold.zip mv /opt/manyfold-${RELEASE}/ /opt/manyfold -RUBY_VERSION=$(cat /opt/manyfold.ruby-version) +RUBY_VERSION=$(cat /opt/manyfold/.ruby-version) YARN_VERSION=$(grep '"packageManager":' /opt/manyfold/package.json | sed -E 's/.*"(yarn@[0-9\.]+)".*/\1/') echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Downloaded Manyfold" From d230107837208c858580f2ab5567ced6e2e4c006 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:15:23 +0100 Subject: [PATCH 0025/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index 1a18ed1..5c22c5f 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -76,12 +76,12 @@ mv ruby-build-* ~/.rbenv/plugins/ruby-build echo "${RUBY_BUILD_RELEASE}" >~/.rbenv/plugins/RUBY_BUILD_version.txt msg_ok "Added ruby-build" -msg_info "Installing ruby version" +msg_info "Installing ruby ${RUBY_VERSION}" $STD rbenv install $RUBY_VERSION echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc source ~/.bashrc -msg_ok "Installed ruby" +msg_ok "Installed ruby ${RUBY_VERSION}" msg_info "Adding manyfold user" useradd -m -s /usr/bin/bash manyfold From 2f93d5b12785518e26c5cfebc1a7fab980b63ea7 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:17:09 +0100 Subject: [PATCH 0026/1614] Update debian-install.sh --- install/debian-install.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/install/debian-install.sh b/install/debian-install.sh index 9b7aa8f..f844242 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -50,6 +50,34 @@ apt-get update apt-get install -y php msg_ok "Setup PHP" +msg_info "Adding Adoptium repository" +curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /etc/apt/trusted.gpg.d/adoptium.gpg +echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb ${VERSION} main" > /etc/apt/sources.list.d/adoptium.list +apt-get update +apt-get install -y temurin-11-jdk +msg_ok "Adoptium installed" + +msg_info "Adding Nginx repository" +curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /usr/share/keyrings/nginx-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian ${VERSION} nginx" > /etc/apt/sources.list.d/nginx.list +apt-get update +apt-get install -y nginx=1.26.3* +msg_ok "Nginx installed" + +msg_info "Adding MongoDB repository" +curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg +echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian ${VERSION}/mongodb-org/7.0 main" > /etc/apt/sources.list.d/mongodb-org-7.0.list +apt-get update +apt-get install -y mongodb-org +msg_ok "MongoDB installed" + +msg_info "Adding SFTPGo repository" +curl -fsSL https://ftp.osuosl.org/pub/sftpgo/apt/gpg.key | gpg --dearmor -o /usr/share/keyrings/sftpgo-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/sftpgo-archive-keyring.gpg] https://ftp.osuosl.org/pub/sftpgo/apt ${VERSION} main" > /etc/apt/sources.list.d/sftpgo.list +apt-get update +apt-get install -y sftpgo +msg_ok "SFTPGo installed" + motd_ssh customize From 962461e91c6952849c660d985a826cfbd3f6d80b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:19:15 +0100 Subject: [PATCH 0027/1614] cleanup --- ct/qbittorrent.sh | 70 --------------------------- frontend/public/json/qbittorrent.json | 34 ------------- install/cosmos-install.sh | 1 - install/qbittorrent-install.sh | 67 ------------------------- 4 files changed, 172 deletions(-) delete mode 100644 ct/qbittorrent.sh delete mode 100644 frontend/public/json/qbittorrent.json delete mode 100644 install/cosmos-install.sh delete mode 100644 install/qbittorrent-install.sh diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh deleted file mode 100644 index a9f3f3f..0000000 --- a/ct/qbittorrent.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: tteck (tteckster) | Co-Author: Slaviša Arežina (tremor021) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.qbittorrent.org/ - -APP="qBittorrent" -var_tags="torrent" -var_cpu="2" -var_ram="2048" -var_disk="8" -var_os="debian" -var_version="12" -var_unprivileged="1" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -f /etc/systemd/system/qbittorrent-nox.service ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - if [[ ! -f /opt/${APP}_version.txt ]]; then - touch /opt/${APP}_version.txt - mkdir -p $HOME/.config/qBittorrent/ - mkdir -p /opt/qbittorrent/ - mv /.config/qBittorrent $HOME/.config/ - $STD apt-get remove --purge -y qbittorrent-nox - sed -i 's@ExecStart=/usr/bin/qbittorrent-nox@ExecStart=/opt/qbittorrent/qbittorrent-nox@g' /etc/systemd/system/qbittorrent-nox.service - systemctl daemon-reload - fi - FULLRELEASE=$(curl -s https://api.github.com/repos/userdocs/qbittorrent-nox-static/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - RELEASE=$(echo $FULLRELEASE | cut -c 9-13) - if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - msg_info "Stopping Service" - systemctl stop qbittorrent-nox - msg_ok "Stopped Service" - - msg_info "Updating ${APP} to v${RELEASE}" - rm -f /opt/qbittorrent/qbittorrent-nox - curl -fsSL "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox" -o /opt/qbittorrent/qbittorrent-nox - chmod +x /opt/qbittorrent/qbittorrent-nox - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Updated $APP to v${RELEASE}" - - msg_info "Starting Service" - systemctl start qbittorrent-nox - msg_ok "Started Service" - msg_ok "Updated Successfully" - else - msg_ok "No update required. ${APP} is already at v${RELEASE}" - 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}:8090${CL}" diff --git a/frontend/public/json/qbittorrent.json b/frontend/public/json/qbittorrent.json deleted file mode 100644 index 77c0367..0000000 --- a/frontend/public/json/qbittorrent.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "qBittorrent", - "slug": "qbittorrent", - "categories": [ - 11 - ], - "date_created": "2024-05-02", - "type": "ct", - "updateable": false, - "privileged": false, - "interface_port": 8090, - "documentation": null, - "website": "https://www.qbittorrent.org/", - "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/qbittorrent.svg", - "description": "qBittorrent offers a user-friendly interface that allows users to search for and download torrent files easily. It also supports magnet links, which allow users to start downloading files without the need for a torrent file.", - "install_methods": [ - { - "type": "default", - "script": "ct/qbittorrent.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 8, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": "admin", - "password": "changeme" - }, - "notes": [] -} \ No newline at end of file diff --git a/install/cosmos-install.sh b/install/cosmos-install.sh deleted file mode 100644 index 8b13789..0000000 --- a/install/cosmos-install.sh +++ /dev/null @@ -1 +0,0 @@ - diff --git a/install/qbittorrent-install.sh b/install/qbittorrent-install.sh deleted file mode 100644 index aae43e4..0000000 --- a/install/qbittorrent-install.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: tteck (tteckster) | Co-Author: Slaviša Arežina (tremor021) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.qbittorrent.org/ - -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 \ - curl \ - sudo \ - mc -msg_ok "Installed Dependencies" - -msg_info "Setup qBittorrent-nox" -FULLRELEASE=$(curl -s https://api.github.com/repos/userdocs/qbittorrent-nox-static/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -RELEASE=$(echo $FULLRELEASE | cut -c 9-13) -mkdir -p /opt/qbittorrent -curl -fsSL "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox" -o /opt/qbittorrent/qbittorrent-nox -chmod +x /opt/qbittorrent/qbittorrent-nox -mkdir -p $HOME/.config/qBittorrent/ -cat <$HOME/.config/qBittorrent/qBittorrent.conf -[LegalNotice] -Accepted=true - -[Preferences] -WebUI\Password_PBKDF2="@ByteArray(amjeuVrF3xRbgzqWQmes5A==:XK3/Ra9jUmqUc4RwzCtrhrkQIcYczBl90DJw2rT8DFVTss4nxpoRhvyxhCf87ahVE3SzD8K9lyPdpyUCfmVsUg==)" -WebUI\Port=8090 -WebUI\UseUPnP=false -WebUI\Username=admin -EOF -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -msg_ok "Setup qBittorrent-nox" - -msg_info "Creating Service" -cat </etc/systemd/system/qbittorrent-nox.service -[Unit] -Description=qBittorrent client -After=network.target - -[Service] -Type=simple -User=root -ExecStart=/opt/qbittorrent/qbittorrent-nox -Restart=always - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now qbittorrent-nox -msg_ok "Created Service" - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" From dbd0f4d89cfc91dcdd918ddc131459953fcf57c0 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 25 Mar 2025 12:19:35 +0000 Subject: [PATCH 0028/1614] Update .app files --- ct/headers/fileflows | 6 ------ ct/headers/qbittorrent | 6 ------ 2 files changed, 12 deletions(-) delete mode 100644 ct/headers/fileflows delete mode 100644 ct/headers/qbittorrent diff --git a/ct/headers/fileflows b/ct/headers/fileflows deleted file mode 100644 index 2f25cf3..0000000 --- a/ct/headers/fileflows +++ /dev/null @@ -1,6 +0,0 @@ - _______ __ ________ - / ____(_) /__ / ____/ /___ _ _______ - / /_ / / / _ \/ /_ / / __ \ | /| / / ___/ - / __/ / / / __/ __/ / / /_/ / |/ |/ (__ ) -/_/ /_/_/\___/_/ /_/\____/|__/|__/____/ - diff --git a/ct/headers/qbittorrent b/ct/headers/qbittorrent deleted file mode 100644 index c00ae7c..0000000 --- a/ct/headers/qbittorrent +++ /dev/null @@ -1,6 +0,0 @@ - ____ _ __ __ __ - ____ _/ __ )(_) /_/ /_____ _____________ ____ / /_ - / __ `/ __ / / __/ __/ __ \/ ___/ ___/ _ \/ __ \/ __/ -/ /_/ / /_/ / / /_/ /_/ /_/ / / / / / __/ / / / /_ -\__, /_____/_/\__/\__/\____/_/ /_/ \___/_/ /_/\__/ - /_/ From 83f871123c4cd68c68b5182731543f59314bbc84 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:21:46 +0100 Subject: [PATCH 0029/1614] Update debian-install.sh --- install/debian-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/debian-install.sh b/install/debian-install.sh index f844242..290a6bb 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -14,13 +14,12 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y lsb-release +$STD apt-get install -y gnupg2 msg_ok "Installed Dependencies" msg_info "Setup DISTRO env" DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" -echo $DISTRO -msg_ok "Setup DISTRO" +msg_ok "Setup $DISTRO" msg_info "Setting up PostgreSQL Repository" curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg From 931d62ab4759a8c88f213f3204ac2dbc6b8040cd Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:22:13 +0100 Subject: [PATCH 0030/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index 5c22c5f..9141db5 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -89,21 +89,21 @@ msg_ok "Added manyfold user" msg_info "Setting .env file" cat </opt/.env -export APP_VERSION=${RELEASE} -export GUID=1002 -export PUID=1001 -export PUBLIC_HOSTNAME=subdomain.somehost.org -export PUBLIC_PORT=5000 -export REDIS_URL=redis://127.0.0.1:6379/1 -export DATABASE_ADAPTER=postgresql -export DATABASE_HOST=127.0.0.1 -export DATABASE_USER=${DB_USER} -export DATABASE_PASSWORD=${DB_PASS} -export DATABASE_NAME=${DB_NAME} -export DATABASE_CONNECTION_POOL=16 -export MULTIUSER=enabled -export HTTPS_ONLY=false -export RAILS_ENV=production +APP_VERSION=${RELEASE} +GUID=1002 +PUID=1001 +PUBLIC_HOSTNAME=subdomain.somehost.org +PUBLIC_PORT=5000 +REDIS_URL=redis://127.0.0.1:6379/1 +DATABASE_ADAPTER=postgresql +DATABASE_HOST=127.0.0.1 +DATABASE_USER=${DB_USER} +DATABASE_PASSWORD=${DB_PASS} +DATABASE_NAME=${DB_NAME} +DATABASE_CONNECTION_POOL=16 +MULTIUSER=enabled +HTTPS_ONLY=false +RAILS_ENV=production EOF msg_ok ".env file setup" From 52af88a308515f77518703fc780c5f5b2e143572 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:27:02 +0100 Subject: [PATCH 0031/1614] Update debian-install.sh --- install/debian-install.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/install/debian-install.sh b/install/debian-install.sh index 290a6bb..56514ad 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -18,63 +18,63 @@ $STD apt-get install -y gnupg2 msg_ok "Installed Dependencies" msg_info "Setup DISTRO env" -DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" +DISTRO="$(awk -F'=' '/^DISTRO_CODENAME=/{ print $NF }' /etc/os-release)" msg_ok "Setup $DISTRO" msg_info "Setting up PostgreSQL Repository" curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg echo "deb https://apt.postgresql.org/pub/repos/apt ${DISTRO}-pgdg main" >/etc/apt/sources.list.d/pgdg.list apt-get update -apt-get install -y postgresql +$STD apt-get install -y postgresql msg_ok "Set up PostgreSQL Repository" msg_info "Setting up Matrix Server" curl -fsSL https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg -o /usr/share/keyrings/matrix-org-archive-keyring.gpg -echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian ${VERSION} main" >/etc/apt/sources.list.d/matrix-org.list +echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian ${DISTRO} main" >/etc/apt/sources.list.d/matrix-org.list apt-get update -apt-get install -y matrix-synapse-py3 +$STD apt-get install -y matrix-synapse-py3 msg_info "Set up Matrix Server" msg_info "Setup EVCC" curl -fsSL https://dl.evcc.io/public/evcc/stable/gpg.EAD5D0E07B0EC0FD.key | gpg --dearmor -o /etc/apt/keyrings/evcc-stable.gpg -echo "deb [signed-by=/etc/apt/keyrings/evcc-stable.gpg] https://dl.evcc.io/public/evcc/stable/deb/debian ${VERSION} main" >/etc/apt/sources.list.d/evcc-stable.list +echo "deb [signed-by=/etc/apt/keyrings/evcc-stable.gpg] https://dl.evcc.io/public/evcc/stable/deb/debian ${DISTRO} main" >/etc/apt/sources.list.d/evcc-stable.list apt-get update -apt-get install -y evcc +$STD apt-get install -y evcc msg_ok "Setup EVCC" msg_info "Setup PHP" curl -fsSL https://packages.sury.org/php/apt.gpg -o /usr/share/keyrings/deb.sury.org-php.gpg -echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ ${VERSION} main" >/etc/apt/sources.list.d/php.list +echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ ${DISTRO} main" >/etc/apt/sources.list.d/php.list apt-get update -apt-get install -y php +$STD apt-get install -y php msg_ok "Setup PHP" msg_info "Adding Adoptium repository" curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /etc/apt/trusted.gpg.d/adoptium.gpg -echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb ${VERSION} main" > /etc/apt/sources.list.d/adoptium.list +echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb ${DISTRO} main" > /etc/apt/sources.list.d/adoptium.list apt-get update -apt-get install -y temurin-11-jdk +$STD apt-get install -y temurin-11-jdk msg_ok "Adoptium installed" msg_info "Adding Nginx repository" curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /usr/share/keyrings/nginx-archive-keyring.gpg -echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian ${VERSION} nginx" > /etc/apt/sources.list.d/nginx.list +echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian ${DISTRO} nginx" > /etc/apt/sources.list.d/nginx.list apt-get update -apt-get install -y nginx=1.26.3* +$STD apt-get install -y nginx=1.26.3* msg_ok "Nginx installed" msg_info "Adding MongoDB repository" curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg -echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian ${VERSION}/mongodb-org/7.0 main" > /etc/apt/sources.list.d/mongodb-org-7.0.list +echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian ${DISTRO}/mongodb-org/7.0 main" > /etc/apt/sources.list.d/mongodb-org-7.0.list apt-get update -apt-get install -y mongodb-org +$STD apt-get install -y mongodb-org msg_ok "MongoDB installed" msg_info "Adding SFTPGo repository" curl -fsSL https://ftp.osuosl.org/pub/sftpgo/apt/gpg.key | gpg --dearmor -o /usr/share/keyrings/sftpgo-archive-keyring.gpg -echo "deb [signed-by=/usr/share/keyrings/sftpgo-archive-keyring.gpg] https://ftp.osuosl.org/pub/sftpgo/apt ${VERSION} main" > /etc/apt/sources.list.d/sftpgo.list +echo "deb [signed-by=/usr/share/keyrings/sftpgo-archive-keyring.gpg] https://ftp.osuosl.org/pub/sftpgo/apt ${DISTRO} main" > /etc/apt/sources.list.d/sftpgo.list apt-get update -apt-get install -y sftpgo +$STD apt-get install -y sftpgo msg_ok "SFTPGo installed" motd_ssh From 35e9451d4f127353e96b48e11b6b27c69be9edd1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:33:56 +0100 Subject: [PATCH 0032/1614] Update debian-install.sh --- install/debian-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/debian-install.sh b/install/debian-install.sh index 56514ad..c4f6465 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -19,7 +19,9 @@ msg_ok "Installed Dependencies" msg_info "Setup DISTRO env" DISTRO="$(awk -F'=' '/^DISTRO_CODENAME=/{ print $NF }' /etc/os-release)" -msg_ok "Setup $DISTRO" +msg_ok "Setup DISTRO" + +echo -e $DISTRO msg_info "Setting up PostgreSQL Repository" curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg From 3d57e0b1fecd0de3ded65392eb3e33219fc281b2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:39:47 +0100 Subject: [PATCH 0033/1614] Update debian-install.sh --- install/debian-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/debian-install.sh b/install/debian-install.sh index c4f6465..b5797b0 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -18,7 +18,7 @@ $STD apt-get install -y gnupg2 msg_ok "Installed Dependencies" msg_info "Setup DISTRO env" -DISTRO="$(awk -F'=' '/^DISTRO_CODENAME=/{ print $NF }' /etc/os-release)" +DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" msg_ok "Setup DISTRO" echo -e $DISTRO From 216be658966796dc8605db559a840f944b8a496e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:49:06 +0100 Subject: [PATCH 0034/1614] Update alpine-wireguard-install.sh --- install/alpine-wireguard-install.sh | 47 +++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index 8cf435b..88301ec 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -20,13 +20,56 @@ $STD apk add \ openssh \ nano \ mc \ - gpg - + gpg \ + git \ + python3 \ + py3-pip \ + iptables \ + supervisor msg_ok "Installed Dependencies" msg_info "Installing WireGuard" apk add --no-cache wireguard-tools msg_ok "Installed WireGuard" +read -rp "Do you want to install WGDashboard? (y/N): " INSTALL_WGD +if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then + msg_info "Installing WGDashboard" + git clone -q https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard + cd /etc/wgdashboard/src || exit + chmod u+x wgd.sh + $STD ./wgd.sh install + echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf + sysctl -p /etc/sysctl.conf + msg_ok "Installed WGDashboard" + + msg_info "Create Example Config for WGDashboard" + private_key=$(wg genkey) + cat </etc/wireguard/wg0.conf +[Interface] +PrivateKey = ${private_key} +Address = 10.0.0.1/24 +SaveConfig = true +PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; +PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; +ListenPort = 51820 +EOF + msg_ok "Created Example Config for WGDashboard" + + msg_info "Creating Supervisor Service for WGDashboard" + cat </etc/supervisor.d/wg-dashboard.ini +[program:wg-dashboard] +command=/etc/wgdashboard/src/wgd.sh start +autostart=true +autorestart=true +stderr_logfile=/var/log/wg-dashboard.err.log +stdout_logfile=/var/log/wg-dashboard.out.log +EOF + + rc-service supervisor restart + rc-update add supervisor default + msg_ok "Created Supervisor Service for WGDashboard" +fi + motd_ssh customize From 79f6b41af533b3986a912acad87559c72a9f5890 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:56:40 +0100 Subject: [PATCH 0035/1614] Update alpine-wireguard-install.sh --- install/alpine-wireguard-install.sh | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index 88301ec..b515c18 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -21,9 +21,6 @@ $STD apk add \ nano \ mc \ gpg \ - git \ - python3 \ - py3-pip \ iptables \ supervisor msg_ok "Installed Dependencies" @@ -34,6 +31,17 @@ msg_ok "Installed WireGuard" read -rp "Do you want to install WGDashboard? (y/N): " INSTALL_WGD if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then + msg_info "Installing additional dependencies for WGDashboard" + apk add --no-cache \ + python3 \ + py3-pip \ + git \ + sudo \ + musl-dev \ + linux-headers \ + gcc \ + python3-dev + msg_ok "Installed additional dependencies for WGDashboard" msg_info "Installing WGDashboard" git clone -q https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard cd /etc/wgdashboard/src || exit @@ -56,8 +64,10 @@ ListenPort = 51820 EOF msg_ok "Created Example Config for WGDashboard" - msg_info "Creating Supervisor Service for WGDashboard" - cat </etc/supervisor.d/wg-dashboard.ini +msg_info "Creating Supervisor Service for WGDashboard" +mkdir -p /etc/supervisord.d/ + +cat < /etc/supervisord.d/wg-dashboard.ini [program:wg-dashboard] command=/etc/wgdashboard/src/wgd.sh start autostart=true @@ -66,9 +76,10 @@ stderr_logfile=/var/log/wg-dashboard.err.log stdout_logfile=/var/log/wg-dashboard.out.log EOF - rc-service supervisor restart - rc-update add supervisor default - msg_ok "Created Supervisor Service for WGDashboard" +rc-service supervisor restart +rc-update add supervisor default +msg_ok "Created Supervisor Service for WGDashboard" + fi motd_ssh From bb2caff99bbb94086596b031ae8315418cebf334 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:57:36 +0100 Subject: [PATCH 0036/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index 9141db5..f6015d4 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -103,12 +103,12 @@ DATABASE_NAME=${DB_NAME} DATABASE_CONNECTION_POOL=16 MULTIUSER=enabled HTTPS_ONLY=false -RAILS_ENV=production EOF msg_ok ".env file setup" msg_info "Installing Manyfold" source /opt/.env +export RAILS_ENV=production cd /opt/manyfold chown -R manyfold:manyfold /opt/manyfold $STD gem install bundler From 9b258d04b6d241091808710f22eece9f93b7b99d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:57:51 +0100 Subject: [PATCH 0037/1614] Update alpine-wireguard.sh --- ct/alpine-wireguard.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/alpine-wireguard.sh b/ct/alpine-wireguard.sh index 316965f..c38f7ab 100644 --- a/ct/alpine-wireguard.sh +++ b/ct/alpine-wireguard.sh @@ -33,3 +33,6 @@ build_container description msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} WGDashboard Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:10086${CL}" From e659b4495a264aa4c2f0fb952c6d84e5e411f30c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:03:57 +0100 Subject: [PATCH 0038/1614] Update alpine-wireguard-install.sh --- install/alpine-wireguard-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index b515c18..f5ef142 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -26,13 +26,13 @@ $STD apk add \ msg_ok "Installed Dependencies" msg_info "Installing WireGuard" -apk add --no-cache wireguard-tools +$STD apk add --no-cache wireguard-tools msg_ok "Installed WireGuard" read -rp "Do you want to install WGDashboard? (y/N): " INSTALL_WGD if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then msg_info "Installing additional dependencies for WGDashboard" - apk add --no-cache \ + $STD apk add --no-cache \ python3 \ py3-pip \ git \ From cf3601b4ab5850e9ba7c18f54aaeca735050dd66 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:04:20 +0100 Subject: [PATCH 0039/1614] Update alpine-wireguard-install.sh --- install/alpine-wireguard-install.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index f5ef142..5a338e2 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -64,10 +64,10 @@ ListenPort = 51820 EOF msg_ok "Created Example Config for WGDashboard" -msg_info "Creating Supervisor Service for WGDashboard" -mkdir -p /etc/supervisord.d/ + msg_info "Creating Supervisor Service for WGDashboard" + mkdir -p /etc/supervisord.d/ -cat < /etc/supervisord.d/wg-dashboard.ini + cat < /etc/supervisord.d/wg-dashboard.ini [program:wg-dashboard] command=/etc/wgdashboard/src/wgd.sh start autostart=true @@ -76,9 +76,19 @@ stderr_logfile=/var/log/wg-dashboard.err.log stdout_logfile=/var/log/wg-dashboard.out.log EOF -rc-service supervisor restart -rc-update add supervisor default -msg_ok "Created Supervisor Service for WGDashboard" + if [[ ! -f /etc/supervisord.conf ]]; then + cat < /etc/supervisord.conf +[supervisord] +nodaemon=true + +[include] +files = /etc/supervisord.d/*.ini +EOF + fi + + msg_info "Starting Supervisor Daemon" + nohup supervisord -c /etc/supervisord.conf &>/dev/null & + msg_ok "Started Supervisor Daemon" fi From 2655b386b62d39fcd4d1c972c8f5eabf22b084df Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:06:25 +0100 Subject: [PATCH 0040/1614] Update alpine-wireguard-install.sh --- install/alpine-wireguard-install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index 5a338e2..d59e9a9 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -22,11 +22,16 @@ $STD apk add \ mc \ gpg \ iptables \ - supervisor + supervisor \ + openrc msg_ok "Installed Dependencies" msg_info "Installing WireGuard" $STD apk add --no-cache wireguard-tools +if [[ ! -L /etc/init.d/wg-quick.wg0 ]]; then + ln -s /etc/init.d/wg-quick /etc/init.d/wg-quick.wg0 +fi +rc-update add wg-quick.wg0 default msg_ok "Installed WireGuard" read -rp "Do you want to install WGDashboard? (y/N): " INSTALL_WGD From 169abf4afce9e26843993b078c06d829919daf45 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:19:37 +0100 Subject: [PATCH 0041/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index f6015d4..6263a28 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -89,20 +89,21 @@ msg_ok "Added manyfold user" msg_info "Setting .env file" cat </opt/.env -APP_VERSION=${RELEASE} -GUID=1002 -PUID=1001 -PUBLIC_HOSTNAME=subdomain.somehost.org -PUBLIC_PORT=5000 -REDIS_URL=redis://127.0.0.1:6379/1 -DATABASE_ADAPTER=postgresql -DATABASE_HOST=127.0.0.1 -DATABASE_USER=${DB_USER} -DATABASE_PASSWORD=${DB_PASS} -DATABASE_NAME=${DB_NAME} -DATABASE_CONNECTION_POOL=16 -MULTIUSER=enabled -HTTPS_ONLY=false +export APP_VERSION=${RELEASE} +export GUID=1002 +export PUID=1001 +export PUBLIC_HOSTNAME=subdomain.somehost.org +export PUBLIC_PORT=5000 +export REDIS_URL=redis://127.0.0.1:6379/1 +export DATABASE_ADAPTER=postgresql +export DATABASE_HOST=127.0.0.1 +export DATABASE_USER=${DB_USER} +export DATABASE_PASSWORD=${DB_PASS} +export DATABASE_NAME=${DB_NAME} +export DATABASE_CONNECTION_POOL=16 +export MULTIUSER=enabled +export HTTPS_ONLY=false +export RAILS_ENV=production EOF msg_ok ".env file setup" From 98d7ccb810e8c4e48e3b6b9a1935500cd2b105f5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:20:39 +0100 Subject: [PATCH 0042/1614] Update alpine-wireguard-install.sh --- install/alpine-wireguard-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index d59e9a9..c1d1b3d 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -31,7 +31,8 @@ $STD apk add --no-cache wireguard-tools if [[ ! -L /etc/init.d/wg-quick.wg0 ]]; then ln -s /etc/init.d/wg-quick /etc/init.d/wg-quick.wg0 fi -rc-update add wg-quick.wg0 default +$STD rc-update add wg-quick.wg0 default +$STD rc-service wg-quick.wg0 start msg_ok "Installed WireGuard" read -rp "Do you want to install WGDashboard? (y/N): " INSTALL_WGD From d6cb38f2d9cbfb01a6dd45958cef5922cd3a9101 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:20:51 +0100 Subject: [PATCH 0043/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index 6263a28..5c22c5f 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -109,7 +109,6 @@ msg_ok ".env file setup" msg_info "Installing Manyfold" source /opt/.env -export RAILS_ENV=production cd /opt/manyfold chown -R manyfold:manyfold /opt/manyfold $STD gem install bundler From bd79ac8f9d95f52d84ed47618c8ab71c197e66ac Mon Sep 17 00:00:00 2001 From: vhsdream Date: Tue, 25 Mar 2025 09:23:07 -0400 Subject: [PATCH 0044/1614] Remove outdated and deferred Calibre-Web Automated --- ct/calibre-web-automated.sh | 84 ------- .../public/json/calibre-web-automated.json | 43 ---- install/calibre-web-automated-install.sh | 205 ------------------ 3 files changed, 332 deletions(-) delete mode 100644 ct/calibre-web-automated.sh delete mode 100644 frontend/public/json/calibre-web-automated.json delete mode 100644 install/calibre-web-automated-install.sh diff --git a/ct/calibre-web-automated.sh b/ct/calibre-web-automated.sh deleted file mode 100644 index 1fe9576..0000000 --- a/ct/calibre-web-automated.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: vhsdream -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/crocodilestick/Calibre-Web-Automated - -APP="Calibre-Web-Automated" -var_tags="eBook" -var_cpu="2" -var_ram="2048" -var_disk="4" -var_os="debian" -var_version="12" -var_unprivileged="1" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - - if [[ ! -d /opt/cwa ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - RELEASE=$(curl -s https://api.github.com/repos/crocodilestick/Calibre-Web-Automated/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - msg_info "Stopping $APP" - systemctl stop cps cwa-autolibrary cwa-ingester cwa-change-detector cwa-autozip.timer - msg_ok "Stopped $APP" - - msg_info "Creating Backup" - $STD tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /opt/cwa /opt/calibre-web/metadata.db - msg_ok "Backup Created" - - msg_info "Updating $APP to v${RELEASE}" - cd /opt/kepubify - rm -rf kepubify-linux-64bit - curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit - chmod +x kepubify-linux-64bit - cd /opt/calibre-web - $STD pip install --upgrade calibreweb[goodreads,metadata,kobo] - cd /opt/cwa - $STD git stash --all - $STD git pull - $STD pip install -r requirements.txt - curl -fsSL https://gist.githubusercontent.com/vhsdream/2e81afeff139c5746db1ede88c01cc7b/raw/51238206e87aec6c0abeccce85dec9f2b0c89000/proxmox-lxc.patch -o /opt/cwa.patch # not for production - $STD git apply --whitespace=fix /opt/cwa.patch # not for production - cp -r /opt/cwa/root/app/calibre-web/cps/* /usr/local/lib/python3*/dist-packages/calibreweb/cps - cd scripts - chmod +x check-cwa-services.sh ingest-service.sh change-detector.sh - msg_ok "Updated $APP to v${RELEASE}" - - msg_info "Starting $APP" - systemctl start cps cwa-autolibrary cwa-ingester cwa-change-detector cwa-autozip.timer - msg_ok "Started $APP" - - msg_info "Cleaning Up" - rm -rf /opt/cwa.patch - rm -rf "/opt/${APP}_backup_$(date +%F).tar.gz" - msg_ok "Cleanup Completed" - - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Update Successful" - else - msg_ok "No update required. ${APP} is already at v${RELEASE}" - 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}:8083${CL}" diff --git a/frontend/public/json/calibre-web-automated.json b/frontend/public/json/calibre-web-automated.json deleted file mode 100644 index 0fb22ab..0000000 --- a/frontend/public/json/calibre-web-automated.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "Calibre-Web-Automated", - "slug": "calibre-web-automated", - "categories": [ - 11 - ], - "date_created": "2025-03-02", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 8083, - "documentation": null, - "website": "https://github.com/crocodilestick/Calibre-Web-Automated", - "logo": "https://sasquatters.com/media/2017/04/Calibre-web-banner-768x512.jpg", - "description": "Calibre-Web but automated and with Calibre features! Fully automate and simplify your eBook set up!", - "install_methods": [ - { - "type": "default", - "script": "ct/calibre-web-automated.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 4, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": "admin", - "password": "admin123" - }, - "notes": [ - { - "text": "This LXC is not interchangeable with the Calibre-Web LXC", - "type": "warning" - }, - { - "text": "Options enabled by default: Kobo sync; Goodreads author info; metadata extaction from epub, fb2, pdf; cover extraction from cbr, cbz, cbt files", - "type": "info" - } - ] -} diff --git a/install/calibre-web-automated-install.sh b/install/calibre-web-automated-install.sh deleted file mode 100644 index b8d88ed..0000000 --- a/install/calibre-web-automated-install.sh +++ /dev/null @@ -1,205 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: vhsdream -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/crocodilestick/Calibre-Web-Automated - -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 \ - curl \ - sudo \ - mc \ - build-essential \ - imagemagick \ - git \ - libldap2-dev \ - libsasl2-dev \ - ghostscript \ - libldap-2.5-0 \ - libmagic1 \ - libsasl2-2 \ - libxi6 \ - libxslt1.1 \ - python3-pip \ - python3-venv \ - xdg-utils \ - inotify-tools \ - sqlite3 -msg_ok "Installed Dependencies" - -msg_info "Installing Kepubify" -mkdir -p /opt/kepubify -cd /opt/kepubify -curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit &>/dev/null -chmod +x kepubify-linux-64bit -msg_ok "Installed Kepubify" - -msg_info "Installing Calibre-Web (Patience)" -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -mkdir -p /opt/calibre-web -$STD apt-get install -y calibre -$STD curl -fsSL -o /opt/calibre-web/metadata.db https://github.com/janeczku/calibre-web/raw/master/library/metadata.db -$STD pip install calibreweb[goodreads,metadata,kobo] -$STD pip install jsonschema -msg_ok "Installed Calibre-Web" - -msg_info "Creating Calibre-Web Service" -cat </etc/systemd/system/cps.service -[Unit] -Description=Calibre-Web Server -After=network.target - -[Service] -Type=simple -WorkingDirectory=/opt/calibre-web -ExecStart=/usr/local/bin/cps -TimeoutStopSec=20 -KillMode=process -Restart=on-failure - -[Install] -WantedBy=multi-user.target -EOF -msg_ok "Service file created" - -msg_info "Starting and then stopping Calibre-Web Service" -systemctl start cps && sleep 5 && systemctl stop cps -msg_ok "Calibre-Web Service successfully cycled" - -msg_info "Setup ${APPLICATION}" -RELEASE=$(curl -s https://api.github.com/repos/crocodilestick/Calibre-Web-Automated/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -$STD git clone https://github.com/crocodilestick/Calibre-Web-Automated.git /opt/cwa --single-branch -cd /opt/cwa -$STD git checkout V${RELEASE} -$STD pip install -r requirements.txt -curl -fsSL https://gist.githubusercontent.com/vhsdream/2e81afeff139c5746db1ede88c01cc7b/raw/51238206e87aec6c0abeccce85dec9f2b0c89000/proxmox-lxc.patch -o /opt/cwa.patch # not for production -$STD git apply --whitespace=fix /opt/cwa.patch # not for production -cd scripts -chmod +x check-cwa-services.sh ingest-service.sh change-detector.sh -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -msg_ok "Setup ${APPLICATION}" - -msg_info "Creating necessary files & directories" -mkdir -p /opt/cwa-book-ingest -mkdir -p /var/lib/cwa/{metadata_change_logs,metadata_temp,processed_books,log_archive,.cwa_conversion_tmp} -mkdir -p /var/lib/cwa/processed_books/{converted,imported,failed,fixed_originals} -touch /var/lib/cwa/convert-library.log -msg_ok "Directories & files created" - -msg_info "Copying patched Calibre-Web files into local Python lib folder" -cp -r /opt/cwa/root/app/calibre-web/cps/* /usr/local/lib/python3*/dist-packages/calibreweb/cps -msg_ok "Files copied" - -msg_info "Creating Services and Timers" -cat </etc/systemd/system/cwa-autolibrary.service -[Unit] -Description=Calibre-Web Automated Auto-Library Service -After=network.target cps.service - -[Service] -Type=simple -WorkingDirectory=/opt/cwa -ExecStart=/usr/bin/python3 /opt/cwa/scripts/auto_library.py -TimeoutStopSec=10 -KillMode=process -Restart=on-failure - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/cwa-ingester.service -[Unit] -Description=Calibre-Web Automated Ingest Service -After=network.target cps.service cwa-autolibrary.service - -[Service] -Type=simple -WorkingDirectory=/opt/cwa -ExecStart=/usr/bin/bash -c /opt/cwa/scripts/ingest-service.sh -TimeoutStopSec=10 -KillMode=mixed -Restart=on-failure - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/cwa-change-detector.service -[Unit] -Description=Calibre-Web Automated Metadata Change Detector Service -After=network.target cps.service cwa-autolibrary.service - -[Service] -Type=simple -WorkingDirectory=/opt/cwa -ExecStart=/usr/bin/bash -c /opt/cwa/scripts/change-detector.sh -TimeoutStopSec=10 -KillMode=mixed -Restart=on-failure - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/cwa.target -[Unit] -Description=Calibre-Web Automated Services -After=network-online.target -Wants=cps.service cwa-autolibrary.service cwa-ingester.service cwa-change-detector.service cwa-autozip.timer - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/cwa-autozip.service -[Unit] -Description=Calibre-Web Automated Nightly Auto-Zip Backup Service -After=network.target cps.service - -[Service] -Type=simple -WorkingDirectory=/var/lib/cwa/processed_books -ExecStart=/usr/bin/python3 /opt/cwa/scripts/auto_zip.py -Restart=on-failure - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/cwa-autozip.timer -[Unit] -Description=Calibre-Web Automated Nightly Auto-Zip Backup Timer -RefuseManualStart=no -RefuseManualStop=no - -[Timer] -Persistent=true -# run every day at 11:59PM -OnCalendar=*-*-* 23:59:00 -Unit=cwa-autozip.service - -[Install] -WantedBy=timers.target -EOF -systemctl enable -q --now cwa.target -msg_ok "Created Services and Timers" - -motd_ssh -customize - -# Cleanup -msg_info "Cleaning up" -rm -rf /opt/cwa.patch -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" From cc96a2b37af1033e91cb47034b3c6505c3d623d3 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 25 Mar 2025 13:23:22 +0000 Subject: [PATCH 0045/1614] Update .app files --- ct/headers/calibre-web-automated | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/calibre-web-automated diff --git a/ct/headers/calibre-web-automated b/ct/headers/calibre-web-automated deleted file mode 100644 index ef3172a..0000000 --- a/ct/headers/calibre-web-automated +++ /dev/null @@ -1,6 +0,0 @@ - ______ ___ __ _ __ __ ___ __ __ __ - / ____/___ _/ (_) /_ ________ | | / /__ / /_ / | __ __/ /_____ ____ ___ ____ _/ /____ ____/ / - / / / __ `/ / / __ \/ ___/ _ \_____| | /| / / _ \/ __ \______/ /| |/ / / / __/ __ \/ __ `__ \/ __ `/ __/ _ \/ __ / -/ /___/ /_/ / / / /_/ / / / __/_____/ |/ |/ / __/ /_/ /_____/ ___ / /_/ / /_/ /_/ / / / / / / /_/ / /_/ __/ /_/ / -\____/\__,_/_/_/_.___/_/ \___/ |__/|__/\___/_.___/ /_/ |_\__,_/\__/\____/_/ /_/ /_/\__,_/\__/\___/\__,_/ - From 19353faa0a4c5495639ed9acbeccafa9eb1251ab Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:28:52 +0100 Subject: [PATCH 0046/1614] Update manyfold-install.sh --- install/manyfold-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/manyfold-install.sh b/install/manyfold-install.sh index 5c22c5f..5bb5ff6 100644 --- a/install/manyfold-install.sh +++ b/install/manyfold-install.sh @@ -137,8 +137,7 @@ Type=simple User=root Group=root WorkingDirectory=/opt/manyfold -EnvironmentFile=/opt/.env -ExecStart=/usr/bin/bash -lc '/opt/manyfold/bin/rails server -b 127.0.0.1 --port 5000 --environment production' +ExecStart=/usr/bin/bash -lc 'source /opt/.env && /opt/manyfold/bin/rails server -b 127.0.0.1 --port 5000 --environment production' TimeoutSec=30 RestartSec=15s Restart=always From 66a4e8250f65dddab15727a9e89fd24b322d9e5c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:34:07 +0100 Subject: [PATCH 0047/1614] Update alpine-wireguard-install.sh --- install/alpine-wireguard-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index c1d1b3d..cfa804e 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -31,7 +31,6 @@ $STD apk add --no-cache wireguard-tools if [[ ! -L /etc/init.d/wg-quick.wg0 ]]; then ln -s /etc/init.d/wg-quick /etc/init.d/wg-quick.wg0 fi -$STD rc-update add wg-quick.wg0 default $STD rc-service wg-quick.wg0 start msg_ok "Installed WireGuard" From 630521e846b836b1457cfc758107bf36064f922b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:40:24 +0100 Subject: [PATCH 0048/1614] Update alpine-wireguard-install.sh --- install/alpine-wireguard-install.sh | 48 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index cfa804e..50c3c3c 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -69,33 +69,31 @@ ListenPort = 51820 EOF msg_ok "Created Example Config for WGDashboard" - msg_info "Creating Supervisor Service for WGDashboard" - mkdir -p /etc/supervisord.d/ + msg_info "Creating Service for WGDashboard" +cat < /etc/init.d/wg-dashboard +#!/sbin/openrc-run - cat < /etc/supervisord.d/wg-dashboard.ini -[program:wg-dashboard] -command=/etc/wgdashboard/src/wgd.sh start -autostart=true -autorestart=true -stderr_logfile=/var/log/wg-dashboard.err.log -stdout_logfile=/var/log/wg-dashboard.out.log +description="WireGuard Dashboard Service" + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting WGDashboard" + cd /etc/wgdashboard/src/ || exit 1 + ./wgd.sh start & + eend $? +} + +stop() { + ebegin "Stopping WGDashboard" + pkill -f "wgd.sh" + eend $? +} EOF - - if [[ ! -f /etc/supervisord.conf ]]; then - cat < /etc/supervisord.conf -[supervisord] -nodaemon=true - -[include] -files = /etc/supervisord.d/*.ini -EOF - fi - - msg_info "Starting Supervisor Daemon" - nohup supervisord -c /etc/supervisord.conf &>/dev/null & - msg_ok "Started Supervisor Daemon" - -fi +msg_ok "Created Service for WGDashboard" motd_ssh customize From cc547ab864cc262d6418083908a1971abc0b2654 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:40:34 +0100 Subject: [PATCH 0049/1614] Update alpine-wireguard-install.sh --- install/alpine-wireguard-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index 50c3c3c..fdc8546 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -22,7 +22,6 @@ $STD apk add \ mc \ gpg \ iptables \ - supervisor \ openrc msg_ok "Installed Dependencies" From 4f1090ef8de85ff96de09d4b8e481f4f929f1d5a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:59:17 +0100 Subject: [PATCH 0050/1614] Update alpine-wireguard-install.sh --- install/alpine-wireguard-install.sh | 37 ++++++++++++++++------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index fdc8546..5470b25 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -30,7 +30,17 @@ $STD apk add --no-cache wireguard-tools if [[ ! -L /etc/init.d/wg-quick.wg0 ]]; then ln -s /etc/init.d/wg-quick /etc/init.d/wg-quick.wg0 fi -$STD rc-service wg-quick.wg0 start + +private_key=$(wg genkey) +cat </etc/wireguard/wg0.conf +[Interface] +PrivateKey = ${private_key} +Address = 10.0.0.1/24 +SaveConfig = true +PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; +PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; +ListenPort = 51820 +EOF msg_ok "Installed WireGuard" read -rp "Do you want to install WGDashboard? (y/N): " INSTALL_WGD @@ -51,25 +61,12 @@ if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then cd /etc/wgdashboard/src || exit chmod u+x wgd.sh $STD ./wgd.sh install - echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf + echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf sysctl -p /etc/sysctl.conf msg_ok "Installed WGDashboard" - msg_info "Create Example Config for WGDashboard" - private_key=$(wg genkey) - cat </etc/wireguard/wg0.conf -[Interface] -PrivateKey = ${private_key} -Address = 10.0.0.1/24 -SaveConfig = true -PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; -PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; -ListenPort = 51820 -EOF - msg_ok "Created Example Config for WGDashboard" - msg_info "Creating Service for WGDashboard" -cat < /etc/init.d/wg-dashboard + cat </etc/init.d/wg-dashboard #!/sbin/openrc-run description="WireGuard Dashboard Service" @@ -92,7 +89,13 @@ stop() { eend $? } EOF -msg_ok "Created Service for WGDashboard" + msg_ok "Created Service for WGDashboard" +fi + +msg_info "Starting Services" +rc-update add wg-quick.wg0 default +rc-service wg-quick.wg0 start +msg_ok "Started Services" motd_ssh customize From da02d6664f4efc41967ec9c7450b2931dc05d3a4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:18:46 +0100 Subject: [PATCH 0051/1614] fix alpine update_script --- misc/build.func | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index aa42ddd..bcc4b1f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1367,9 +1367,10 @@ start() { fi SPINNER_PID="" install_script - fi - - if ! command -v pveversion >/dev/null 2>&1; then + else + if [ -f /etc/alpine-release ]; then + update_script + else CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ "Support/Update functions for ${APP} LXC. Choose an option:" \ 12 60 3 \ From 34bc95849387610b6bbd92f67c8d008c5e3f63eb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:19:46 +0100 Subject: [PATCH 0052/1614] Update build.func --- misc/build.func | 2413 ++++++++++++++++++++++++----------------------- 1 file changed, 1207 insertions(+), 1206 deletions(-) diff --git a/misc/build.func b/misc/build.func index bcc4b1f..067e7dc 100644 --- a/misc/build.func +++ b/misc/build.func @@ -5,854 +5,854 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE variables() { - NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. - var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. - INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern. - PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase - DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. - METHOD="default" # sets the METHOD variable to "default", used for the API call. - RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. - CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an environment variable for the container type. + NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. + var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. + INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern. + PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase + DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. + METHOD="default" # sets the METHOD variable to "default", used for the API call. + RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. + CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an environment variable for the container type. } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { - # Colors - YW=$(echo "\033[33m") - YWB=$(echo "\033[93m") - BL=$(echo "\033[36m") - RD=$(echo "\033[01;31m") - BGN=$(echo "\033[4;92m") - GN=$(echo "\033[1;92m") - DGN=$(echo "\033[32m") + # Colors + YW=$(echo "\033[33m") + YWB=$(echo "\033[93m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") - # Formatting - CL=$(echo "\033[m") - UL=$(echo "\033[4m") - BOLD=$(echo "\033[1m") - BFR="\\r\\033[K" - HOLD=" " - TAB=" " + # Formatting + CL=$(echo "\033[m") + UL=$(echo "\033[4m") + BOLD=$(echo "\033[1m") + BFR="\\r\\033[K" + HOLD=" " + TAB=" " - # Icons - CM="${TAB}✔️${TAB}${CL}" - CROSS="${TAB}✖️${TAB}${CL}" - INFO="${TAB}💡${TAB}${CL}" - OS="${TAB}🖥️${TAB}${CL}" - OSVERSION="${TAB}🌟${TAB}${CL}" - CONTAINERTYPE="${TAB}📦${TAB}${CL}" - DISKSIZE="${TAB}💾${TAB}${CL}" - CPUCORE="${TAB}🧠${TAB}${CL}" - RAMSIZE="${TAB}🛠️${TAB}${CL}" - SEARCH="${TAB}🔍${TAB}${CL}" - VERIFYPW="${TAB}🔐${TAB}${CL}" - CONTAINERID="${TAB}🆔${TAB}${CL}" - HOSTNAME="${TAB}🏠${TAB}${CL}" - BRIDGE="${TAB}🌉${TAB}${CL}" - NETWORK="${TAB}📡${TAB}${CL}" - GATEWAY="${TAB}🌐${TAB}${CL}" - DISABLEIPV6="${TAB}🚫${TAB}${CL}" - DEFAULT="${TAB}⚙️${TAB}${CL}" - MACADDRESS="${TAB}🔗${TAB}${CL}" - VLANTAG="${TAB}🏷️${TAB}${CL}" - ROOTSSH="${TAB}🔑${TAB}${CL}" - CREATING="${TAB}🚀${TAB}${CL}" - ADVANCED="${TAB}🧩${TAB}${CL}" - CIFS="${TAB}🔌${TAB}${CL}" - FUSE="${TAB}🔧${TAB}${CL}" - NFS="${TAB}📂${TAB}${CL}" + # Icons + CM="${TAB}✔️${TAB}${CL}" + CROSS="${TAB}✖️${TAB}${CL}" + INFO="${TAB}💡${TAB}${CL}" + OS="${TAB}🖥️${TAB}${CL}" + OSVERSION="${TAB}🌟${TAB}${CL}" + CONTAINERTYPE="${TAB}📦${TAB}${CL}" + DISKSIZE="${TAB}💾${TAB}${CL}" + CPUCORE="${TAB}🧠${TAB}${CL}" + RAMSIZE="${TAB}🛠️${TAB}${CL}" + SEARCH="${TAB}🔍${TAB}${CL}" + VERIFYPW="${TAB}🔐${TAB}${CL}" + CONTAINERID="${TAB}🆔${TAB}${CL}" + HOSTNAME="${TAB}🏠${TAB}${CL}" + BRIDGE="${TAB}🌉${TAB}${CL}" + NETWORK="${TAB}📡${TAB}${CL}" + GATEWAY="${TAB}🌐${TAB}${CL}" + DISABLEIPV6="${TAB}🚫${TAB}${CL}" + DEFAULT="${TAB}⚙️${TAB}${CL}" + MACADDRESS="${TAB}🔗${TAB}${CL}" + VLANTAG="${TAB}🏷️${TAB}${CL}" + ROOTSSH="${TAB}🔑${TAB}${CL}" + CREATING="${TAB}🚀${TAB}${CL}" + ADVANCED="${TAB}🧩${TAB}${CL}" + CIFS="${TAB}🔌${TAB}${CL}" + FUSE="${TAB}🔧${TAB}${CL}" + NFS="${TAB}📂${TAB}${CL}" } # This function enables error handling in the script by setting options and defining a trap for the ERR signal. catch_errors() { - set -Eeuo pipefail - trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } # 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://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi - printf "\e[?25h" - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_description="$(get_error_description "$exit_code")" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" - post_update_to_api "failed" "$exit_code" "$error_description" - echo -e "\n$error_message\n" + source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi + printf "\e[?25h" + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_description="$(get_error_description "$exit_code")" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" + post_update_to_api "failed" "$exit_code" "$error_description" + echo -e "\n$error_message\n" } # This function displays an informational message with logging support. start_spinner() { - local msg="$1" - local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') - local spin_i=0 - local interval=0.1 - local term_width=$(tput cols) + local msg="$1" + local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') + local spin_i=0 + local interval=0.1 + local term_width=$(tput cols) - { - while [ "${SPINNER_ACTIVE:-1}" -eq 1 ]; do - printf "\r\e[2K${frames[spin_i]} ${YW}%b${CL}" "$msg" >&2 - spin_i=$(((spin_i + 1) % ${#frames[@]})) - sleep "$interval" - done - } & + { + while [ "${SPINNER_ACTIVE:-1}" -eq 1 ]; do + printf "\r\e[2K${frames[spin_i]} ${YW}%b${CL}" "$msg" >&2 + spin_i=$(((spin_i + 1) % ${#frames[@]})) + sleep "$interval" + done + } & - SPINNER_PID=$! + SPINNER_PID=$! } msg_info() { - local msg="$1" - if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then - return - fi + local msg="$1" + if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then + return + fi - SPINNER_ACTIVE=1 - start_spinner "$msg" + SPINNER_ACTIVE=1 + start_spinner "$msg" } msg_ok() { - if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill "$SPINNER_PID" >/dev/null 2>&1 - wait "$SPINNER_PID" 2>/dev/null || true - fi + if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill "$SPINNER_PID" >/dev/null 2>&1 + wait "$SPINNER_PID" 2>/dev/null || true + fi - local msg="$1" - printf "\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 - unset SPINNER_PID - SPINNER_ACTIVE=0 + local msg="$1" + printf "\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 + unset SPINNER_PID + SPINNER_ACTIVE=0 - log_message "OK" "$msg" + log_message "OK" "$msg" } msg_error() { - if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill "$SPINNER_PID" >/dev/null 2>&1 - wait "$SPINNER_PID" 2>/dev/null || true - fi + if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill "$SPINNER_PID" >/dev/null 2>&1 + wait "$SPINNER_PID" 2>/dev/null || true + fi - local msg="$1" - printf "\r\e[2K${CROSS}${RD}%b${CL}\n" "$msg" >&2 - unset SPINNER_PID - SPINNER_ACTIVE=0 - log_message "ERROR" "$msg" + local msg="$1" + printf "\r\e[2K${CROSS}${RD}%b${CL}\n" "$msg" >&2 + unset SPINNER_PID + SPINNER_ACTIVE=0 + log_message "ERROR" "$msg" } log_message() { - local level="$1" - local message="$2" - local timestamp - local logdate - timestamp=$(date '+%Y-%m-%d %H:%M:%S') - logdate=$(date '+%Y-%m-%d') + local level="$1" + local message="$2" + local timestamp + local logdate + timestamp=$(date '+%Y-%m-%d %H:%M:%S') + logdate=$(date '+%Y-%m-%d') - LOGDIR="/usr/local/community-scripts/logs" - mkdir -p "$LOGDIR" + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" - LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log" - echo "$timestamp - $level: $message" >>"$LOGFILE" + LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log" + echo "$timestamp - $level: $message" >>"$LOGFILE" } # Check if the shell is using bash shell_check() { - if [[ "$(basename "$SHELL")" != "bash" ]]; then - clear - msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell." - echo -e "\nExiting..." - sleep 2 - exit - fi + if [[ "$(basename "$SHELL")" != "bash" ]]; then + clear + msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell." + echo -e "\nExiting..." + sleep 2 + exit + fi } # Run as root only root_check() { - if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then - clear - msg_error "Please run this script as root." - echo -e "\nExiting..." - sleep 2 - exit - fi + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi } # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { - if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then - msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" - echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." - echo -e "Exiting..." - sleep 2 - exit - fi + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then + msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." + echo -e "Exiting..." + sleep 2 + exit + fi } # When a node is running tens of containers, it's possible to exceed the kernel's cryptographic key storage allocations. # These are tuneable, so verify if the currently deployment is approaching the limits, advise the user on how to tune the limits, and exit the script. # https://cleveruptime.com/docs/files/proc-key-users | https://docs.kernel.org/security/keys/core.html maxkeys_check() { - # Read kernel parameters - per_user_maxkeys=$(cat /proc/sys/kernel/keys/maxkeys 2>/dev/null || echo 0) - per_user_maxbytes=$(cat /proc/sys/kernel/keys/maxbytes 2>/dev/null || echo 0) + # Read kernel parameters + per_user_maxkeys=$(cat /proc/sys/kernel/keys/maxkeys 2>/dev/null || echo 0) + per_user_maxbytes=$(cat /proc/sys/kernel/keys/maxbytes 2>/dev/null || echo 0) - # Exit if kernel parameters are unavailable - if [[ "$per_user_maxkeys" -eq 0 || "$per_user_maxbytes" -eq 0 ]]; then - echo -e "${CROSS}${RD} Error: Unable to read kernel parameters. Ensure proper permissions.${CL}" - exit 1 - fi + # Exit if kernel parameters are unavailable + if [[ "$per_user_maxkeys" -eq 0 || "$per_user_maxbytes" -eq 0 ]]; then + echo -e "${CROSS}${RD} Error: Unable to read kernel parameters. Ensure proper permissions.${CL}" + exit 1 + fi - # Fetch key usage for user ID 100000 (typical for containers) - used_lxc_keys=$(awk '/100000:/ {print $2}' /proc/key-users 2>/dev/null || echo 0) - used_lxc_bytes=$(awk '/100000:/ {split($5, a, "/"); print a[1]}' /proc/key-users 2>/dev/null || echo 0) + # Fetch key usage for user ID 100000 (typical for containers) + used_lxc_keys=$(awk '/100000:/ {print $2}' /proc/key-users 2>/dev/null || echo 0) + used_lxc_bytes=$(awk '/100000:/ {split($5, a, "/"); print a[1]}' /proc/key-users 2>/dev/null || echo 0) - # Calculate thresholds and suggested new limits - threshold_keys=$((per_user_maxkeys - 100)) - threshold_bytes=$((per_user_maxbytes - 1000)) - new_limit_keys=$((per_user_maxkeys * 2)) - new_limit_bytes=$((per_user_maxbytes * 2)) + # Calculate thresholds and suggested new limits + threshold_keys=$((per_user_maxkeys - 100)) + threshold_bytes=$((per_user_maxbytes - 1000)) + new_limit_keys=$((per_user_maxkeys * 2)) + new_limit_bytes=$((per_user_maxbytes * 2)) - # Check if key or byte usage is near limits - failure=0 - if [[ "$used_lxc_keys" -gt "$threshold_keys" ]]; then - echo -e "${CROSS}${RD} Warning: Key usage is near the limit (${used_lxc_keys}/${per_user_maxkeys}).${CL}" - echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxkeys=${new_limit_keys}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." - failure=1 - fi - if [[ "$used_lxc_bytes" -gt "$threshold_bytes" ]]; then - echo -e "${CROSS}${RD} Warning: Key byte usage is near the limit (${used_lxc_bytes}/${per_user_maxbytes}).${CL}" - echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxbytes=${new_limit_bytes}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." - failure=1 - fi + # Check if key or byte usage is near limits + failure=0 + if [[ "$used_lxc_keys" -gt "$threshold_keys" ]]; then + echo -e "${CROSS}${RD} Warning: Key usage is near the limit (${used_lxc_keys}/${per_user_maxkeys}).${CL}" + echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxkeys=${new_limit_keys}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." + failure=1 + fi + if [[ "$used_lxc_bytes" -gt "$threshold_bytes" ]]; then + echo -e "${CROSS}${RD} Warning: Key byte usage is near the limit (${used_lxc_bytes}/${per_user_maxbytes}).${CL}" + echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxbytes=${new_limit_bytes}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." + failure=1 + fi - # Provide next steps if issues are detected - if [[ "$failure" -eq 1 ]]; then - echo -e "${INFO} To apply changes, run: ${BOLD}service procps force-reload${CL}" - exit 1 - fi + # Provide next steps if issues are detected + if [[ "$failure" -eq 1 ]]; then + echo -e "${INFO} To apply changes, run: ${BOLD}service procps force-reload${CL}" + exit 1 + fi - echo -e "${CM}${GN} All kernel key limits are within safe thresholds.${CL}" + echo -e "${CM}${GN} All kernel key limits are within safe thresholds.${CL}" } # This function checks the system architecture and exits if it's not "amd64". arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" - echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" - echo -e "Exiting..." - sleep 2 - exit - fi + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" + echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" + echo -e "Exiting..." + sleep 2 + exit + fi } # Function to get the current IP address based on the distribution get_current_ip() { - if [ -f /etc/os-release ]; then - # Check for Debian/Ubuntu (uses hostname -I) - if grep -qE 'ID=debian|ID=ubuntu' /etc/os-release; then - CURRENT_IP=$(hostname -I | awk '{print $1}') - # Check for Alpine (uses ip command) - elif grep -q 'ID=alpine' /etc/os-release; then - CURRENT_IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1) - else - CURRENT_IP="Unknown" + if [ -f /etc/os-release ]; then + # Check for Debian/Ubuntu (uses hostname -I) + if grep -qE 'ID=debian|ID=ubuntu' /etc/os-release; then + CURRENT_IP=$(hostname -I | awk '{print $1}') + # Check for Alpine (uses ip command) + elif grep -q 'ID=alpine' /etc/os-release; then + CURRENT_IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1) + else + CURRENT_IP="Unknown" + fi fi - fi - echo "$CURRENT_IP" + echo "$CURRENT_IP" } # Function to update the IP address in the MOTD file update_motd_ip() { - MOTD_FILE="/etc/motd" + MOTD_FILE="/etc/motd" - if [ -f "$MOTD_FILE" ]; then - # Remove existing IP Address lines to prevent duplication - sed -i '/IP Address:/d' "$MOTD_FILE" + if [ -f "$MOTD_FILE" ]; then + # Remove existing IP Address lines to prevent duplication + sed -i '/IP Address:/d' "$MOTD_FILE" - IP=$(get_current_ip) - # Add the new IP address - echo -e "${TAB}${NETWORK}${YW} IP Address: ${GN}${IP}${CL}" >>"$MOTD_FILE" - fi + IP=$(get_current_ip) + # Add the new IP address + echo -e "${TAB}${NETWORK}${YW} IP Address: ${GN}${IP}${CL}" >>"$MOTD_FILE" + fi } # Function to download & save header files get_header() { - local app_name=$(echo ${APP,,} | tr -d ' ') - local header_url="https://github.com/community-scripts/ProxmoxVED/raw/main/ct/headers/${app_name}" - local local_header_path="/usr/local/community-scripts/headers/${app_name}" + local app_name=$(echo ${APP,,} | tr -d ' ') + local header_url="https://github.com/community-scripts/ProxmoxVED/raw/main/ct/headers/${app_name}" + local local_header_path="/usr/local/community-scripts/headers/${app_name}" - mkdir -p "/usr/local/community-scripts/headers" + mkdir -p "/usr/local/community-scripts/headers" - # Check if local file already present - if [ ! -f "$local_header_path" ]; then - curl -fsSL "$header_url" -o "$local_header_path" - if [ $? -ne 0 ]; then - echo -e "${WARN}${BOLD}${YLW}Failed to download header for ${app_name}. No header will be displayed.${CL}" - return 1 + # Check if local file already present + if [ ! -f "$local_header_path" ]; then + curl -fsSL "$header_url" -o "$local_header_path" + if [ $? -ne 0 ]; then + echo -e "${WARN}${BOLD}${YLW}Failed to download header for ${app_name}. No header will be displayed.${CL}" + return 1 + fi fi - fi - cat "$local_header_path" + cat "$local_header_path" } # This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node. header_info() { - local app_name=$(echo ${APP,,} | tr -d ' ') - local header_content + local app_name=$(echo ${APP,,} | tr -d ' ') + local header_content - # Download & save Header-File locally - header_content=$(get_header "$app_name") - if [ $? -ne 0 ]; then - # Fallback: Doesn't show Header - return 0 - fi + # Download & save Header-File locally + header_content=$(get_header "$app_name") + if [ $? -ne 0 ]; then + # Fallback: Doesn't show Header + return 0 + fi - # Show ASCII-Header - term_width=$(tput cols 2>/dev/null || echo 120) - clear - echo "$header_content" + # Show ASCII-Header + term_width=$(tput cols 2>/dev/null || echo 120) + clear + echo "$header_content" } # This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit. ssh_check() { - if [ -n "${SSH_CLIENT:+x}" ]; then - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's advisable to utilize the Proxmox shell rather than SSH, as there may be potential complications with variable retrieval. Proceed using SSH?" 10 72; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Proceed using SSH" "You've chosen to proceed using SSH. If any issues arise, please run the script in the Proxmox shell before creating a repository issue." 10 72 - else - clear - echo "Exiting due to SSH usage. Please consider using the Proxmox shell." - exit + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's advisable to utilize the Proxmox shell rather than SSH, as there may be potential complications with variable retrieval. Proceed using SSH?" 10 72; then + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Proceed using SSH" "You've chosen to proceed using SSH. If any issues arise, please run the script in the Proxmox shell before creating a repository issue." 10 72 + else + clear + echo "Exiting due to SSH usage. Please consider using the Proxmox shell." + exit + fi fi - fi } base_settings() { - # Default Settings - CT_TYPE="1" - DISK_SIZE="4" - CORE_COUNT="1" - RAM_SIZE="1024" - VERBOSE="${1:-no}" - PW="" - CT_ID=$NEXTID - HN=$NSAPP - BRG="vmbr0" - NET="dhcp" - IPv6="dhcp" - IPv6GW="" - GATE="" - APT_CACHER="" - APT_CACHER_IP="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - SSH_AUTHORIZED_KEY="" - TAGS="community-script-dev;" - ENABLE_NFS="no" - ENABLE_CIFS="no" - ENABLE_FUSE="no" + # Default Settings + CT_TYPE="1" + DISK_SIZE="4" + CORE_COUNT="1" + RAM_SIZE="1024" + VERBOSE="${1:-no}" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + BRG="vmbr0" + NET="dhcp" + IPv6="dhcp" + IPv6GW="" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + SSH_AUTHORIZED_KEY="" + TAGS="community-script-dev;" + ENABLE_NFS="no" + ENABLE_CIFS="no" + ENABLE_FUSE="no" - # Override default settings with variables from ct script - CT_TYPE=${var_unprivileged:-$CT_TYPE} - DISK_SIZE=${var_disk:-$DISK_SIZE} - CORE_COUNT=${var_cpu:-$CORE_COUNT} - RAM_SIZE=${var_ram:-$RAM_SIZE} - VERB=${var_verbose:-$VERBOSE} - TAGS="${TAGS}${var_tags:-}" - ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} + # Override default settings with variables from ct script + CT_TYPE=${var_unprivileged:-$CT_TYPE} + DISK_SIZE=${var_disk:-$DISK_SIZE} + CORE_COUNT=${var_cpu:-$CORE_COUNT} + RAM_SIZE=${var_ram:-$RAM_SIZE} + VERB=${var_verbose:-$VERBOSE} + TAGS="${TAGS}${var_tags:-}" + ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} - # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts - if [ -z "$var_os" ]; then - var_os="debian" - fi - if [ -z "$var_version" ]; then - var_version="12" - fi + # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts + if [ -z "$var_os" ]; then + var_os="debian" + fi + if [ -z "$var_version" ]; then + var_version="12" + fi } # This function displays the default values for various settings. echo_default() { - # Convert CT_TYPE to description - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi + # Convert CT_TYPE to description + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi - # Output the selected values with icons - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}" - if [ "$VERB" == "yes" ]; then - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}" - fi - echo -e "${CREATING}${BOLD}${BL}Creating a ${APP} LXC using the above default settings${CL}" - echo -e " " + # Output the selected values with icons + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}" + if [ "$VERB" == "yes" ]; then + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}" + fi + echo -e "${CREATING}${BOLD}${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e " " } # This function is called when the user decides to exit the script. It clears the screen and displays an exit message. exit_script() { - clear - echo -e "\n${CROSS}${RD}User exited script${CL}\n" - exit + clear + echo -e "\n${CROSS}${RD}User exited script${CL}\n" + exit } # This function allows the user to configure advanced settings for the script. advanced_settings() { - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 - if [ "$var_os" != "alpine" ]; then - var_default_os="${var_os}" - var_os="" - while [ -z "$var_os" ]; do - if [ "$var_default_os" == "debian" ]; then - if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" ON \ - "ubuntu" "" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_os" ]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - fi - else - exit_script - fi - fi - if [ "$var_default_os" == "ubuntu" ]; then - if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" OFF \ - "ubuntu" "" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_os" ]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - fi - else - exit_script - fi - fi - done - fi - - if [ "$var_os" == "debian" ]; then - var_default_version="${var_version}" - var_version="" - while [ -z "$var_version" ]; do - if [ "$var_default_version" == "11" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ - "11" "Bullseye" ON \ - "12" "Bookworm" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - if [ "$var_default_version" == "12" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ - "11" "Bullseye" OFF \ - "12" "Bookworm" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - done - fi - - if [ "$var_os" == "ubuntu" ]; then - var_default_version="${var_version}" - var_version="" - while [ -z "$var_version" ]; do - if [ "$var_default_version" == "20.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - elif [ "$var_default_version" == "22.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" ON \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - elif [ "$var_default_version" == "24.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" ON \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - else - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - done - fi - # Setting Default Tag for Advanced Settings - TAGS="community-script-dev;${var_tags:-}" - CT_DEFAULT_TYPE="${CT_TYPE}" - CT_TYPE="" - while [ -z "$CT_TYPE" ]; do - if [ "$CT_DEFAULT_TYPE" == "1" ]; then - if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$CT_TYPE" ]; then - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - fi - else - exit_script - fi - fi - if [ "$CT_DEFAULT_TYPE" == "0" ]; then - if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$CT_TYPE" ]; then - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - fi - else - exit_script - fi - fi - done - - while true; do - if PW1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [[ ! -z "$PW1" ]]; then - if [[ "$PW1" == *" "* ]]; then - whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 - elif [ ${#PW1} -lt 5 ]; then - whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 - else - if PW2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then - if [[ "$PW1" == "$PW2" ]]; then - PW="-password $PW1" - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" - break - else - whiptail --msgbox "Passwords do not match. Please try again." 8 58 + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 + if [ "$var_os" != "alpine" ]; then + var_default_os="${var_os}" + var_os="" + while [ -z "$var_os" ]; do + if [ "$var_default_os" == "debian" ]; then + if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + "debian" "" ON \ + "ubuntu" "" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_os" ]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + fi + else + exit_script + fi + fi + if [ "$var_default_os" == "ubuntu" ]; then + if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + "debian" "" OFF \ + "ubuntu" "" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_os" ]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + fi + else + exit_script + fi + fi + done + fi + + if [ "$var_os" == "debian" ]; then + var_default_version="${var_version}" + var_version="" + while [ -z "$var_version" ]; do + if [ "$var_default_version" == "11" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ + "11" "Bullseye" ON \ + "12" "Bookworm" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + fi + if [ "$var_default_version" == "12" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ + "11" "Bullseye" OFF \ + "12" "Bookworm" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + fi + done + fi + + if [ "$var_os" == "ubuntu" ]; then + var_default_version="${var_version}" + var_version="" + while [ -z "$var_version" ]; do + if [ "$var_default_version" == "20.04" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" ON \ + "22.04" "Jammy" OFF \ + "24.04" "Noble" OFF \ + "24.10" "Oracular" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + elif [ "$var_default_version" == "22.04" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" ON \ + "24.04" "Noble" OFF \ + "24.10" "Oracular" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + elif [ "$var_default_version" == "24.04" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" OFF \ + "24.04" "Noble" ON \ + "24.10" "Oracular" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + else + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" OFF \ + "24.04" "Noble" OFF \ + "24.10" "Oracular" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + fi + done + fi + # Setting Default Tag for Advanced Settings + TAGS="community-script-dev;${var_tags:-}" + CT_DEFAULT_TYPE="${CT_TYPE}" + CT_TYPE="" + while [ -z "$CT_TYPE" ]; do + if [ "$CT_DEFAULT_TYPE" == "1" ]; then + if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$CT_TYPE" ]; then + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + fi + else + exit_script fi - else - exit_script - fi fi - else - PW1="Automatic Login" - PW="" - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}" - break - fi - else - exit_script - fi - done - - if CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi - else - exit - fi - - if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" - else - exit_script - fi - - if DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" - fi - else - exit_script - fi - - if CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" - fi - else - exit_script - fi - - if RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - else - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - fi - else - exit_script - fi - - if BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" - else - echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" - fi - else - exit_script - fi - - while true; do - NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) - exit_status=$? - if [ $exit_status -eq 0 ]; then - if [ "$NET" = "dhcp" ]; then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" - break - else - if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" - break - else - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 + if [ "$CT_DEFAULT_TYPE" == "0" ]; then + if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$CT_TYPE" ]; then + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + fi + else + exit_script + fi fi - fi - else - exit_script - fi - done - - if [ "$NET" != "dhcp" ]; then - while true; do - GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) - if [ -z "$GATE1" ]; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 - elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 - else - GATE=",gw=$GATE1" - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}" - break - fi done - else - GATE="" - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" - fi - if [ "$var_os" == "alpine" ]; then - APT_CACHER="" - APT_CACHER_IP="" - else - if APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then - APT_CACHER="${APT_CACHER_IP:+yes}" - echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" + while true; do + if PW1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [[ ! -z "$PW1" ]]; then + if [[ "$PW1" == *" "* ]]; then + whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 + elif [ ${#PW1} -lt 5 ]; then + whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 + else + if PW2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then + if [[ "$PW1" == "$PW2" ]]; then + PW="-password $PW1" + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" + break + else + whiptail --msgbox "Passwords do not match. Please try again." 8 58 + fi + else + exit_script + fi + fi + else + PW1="Automatic Login" + PW="" + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}" + break + fi + else + exit_script + fi + done + + if CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi else - exit_script + exit fi - fi - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" - else - DISABLEIP6="no" - fi - echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - - if MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" + if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') + fi + echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" else - MTU=",mtu=$MTU1" + exit_script fi - echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" - else - exit_script - fi - if SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" + if DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + fi else - SX=$SD - SD="-searchdomain=$SD" + exit_script fi - echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}" - else - exit_script - fi - if NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" + if CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" + fi else - NS="-nameserver=$NX" + exit_script fi - echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}" - else - exit_script - fi - if MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" + if RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + else + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + fi else - MAC=",hwaddr=$MAC1" - echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}" + exit_script fi - else - exit_script - fi - if VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" + if BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + else + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + fi else - VLAN=",tag=$VLAN1" + exit_script fi - echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}" - else - exit_script - fi - if ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then - if [ -n "${ADV_TAGS}" ]; then - ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') - TAGS="${ADV_TAGS}" + while true; do + NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) + exit_status=$? + if [ $exit_status -eq 0 ]; then + if [ "$NET" = "dhcp" ]; then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + break + else + if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + break + else + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 + fi + fi + else + exit_script + fi + done + + if [ "$NET" != "dhcp" ]; then + while true; do + GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) + if [ -z "$GATE1" ]; then + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 + elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 + else + GATE=",gw=$GATE1" + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}" + break + fi + done else - TAGS=";" + GATE="" + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" fi - echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" - else - exit_script - fi - if [[ "$PW" == -password* ]]; then - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" + if [ "$var_os" == "alpine" ]; then + APT_CACHER="" + APT_CACHER_IP="" else - SSH="no" + if APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then + APT_CACHER="${APT_CACHER_IP:+yes}" + echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" + else + exit_script + fi fi - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" - else - SSH="no" - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" - fi - if [[ "${SSH}" == "yes" ]]; then - SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" - - if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then - echo "Warning: No SSH key provided." + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" + else + DISABLEIP6="no" fi - else - SSH_AUTHORIZED_KEY="" - fi + echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then - ENABLE_FUSE="yes" - else - ENABLE_FUSE="no" - fi - echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" + if MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" + else + exit_script + fi - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" - else - VERB="no" - fi - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" + if SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}" + else + exit_script + fi - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" - advanced_settings - fi + if NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}" + else + exit_script + fi + + if MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit_script + fi + + if VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}" + else + exit_script + fi + + if ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then + if [ -n "${ADV_TAGS}" ]; then + ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') + TAGS="${ADV_TAGS}" + else + TAGS=";" + fi + echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" + else + exit_script + fi + + if [[ "$PW" == -password* ]]; then + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" + else + SSH="no" + fi + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + else + SSH="no" + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + fi + + if [[ "${SSH}" == "yes" ]]; then + SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" + + if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then + echo "Warning: No SSH key provided." + fi + else + SSH_AUTHORIZED_KEY="" + fi + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then + ENABLE_FUSE="yes" + else + ENABLE_FUSE="no" + fi + echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" + else + VERB="no" + fi + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" + advanced_settings + fi } diagnostics_check() { - if ! [ -d "/usr/local/community-scripts" ]; then - mkdir -p /usr/local/community-scripts - fi + if ! [ -d "/usr/local/community-scripts" ]; then + mkdir -p /usr/local/community-scripts + fi - if ! [ -f "/usr/local/community-scripts/diagnostics" ]; then - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS" --yesno "Send Diagnostics of LXC Installation?\n\n(This only transmits data without user data, just RAM, CPU, LXC name, ...)" 10 58); then - cat </usr/local/community-scripts/diagnostics + if ! [ -f "/usr/local/community-scripts/diagnostics" ]; then + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS" --yesno "Send Diagnostics of LXC Installation?\n\n(This only transmits data without user data, just RAM, CPU, LXC name, ...)" 10 58); then + cat </usr/local/community-scripts/diagnostics DIAGNOSTICS=yes #This file is used to store the diagnostics settings for the Community-Scripts API. @@ -877,9 +877,9 @@ DIAGNOSTICS=yes #"status" #If you have any concerns, please review the source code at /misc/build.func EOF - DIAGNOSTICS="yes" - else - cat </usr/local/community-scripts/diagnostics + DIAGNOSTICS="yes" + else + cat </usr/local/community-scripts/diagnostics DIAGNOSTICS=no #This file is used to store the diagnostics settings for the Community-Scripts API. @@ -904,548 +904,549 @@ DIAGNOSTICS=no #"status" #If you have any concerns, please review the source code at /misc/build.func EOF - DIAGNOSTICS="no" - fi - else - DIAGNOSTICS=$(awk -F '=' '/^DIAGNOSTICS/ {print $2}' /usr/local/community-scripts/diagnostics) + DIAGNOSTICS="no" + fi + else + DIAGNOSTICS=$(awk -F '=' '/^DIAGNOSTICS/ {print $2}' /usr/local/community-scripts/diagnostics) - fi + fi } config_file() { - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 - CONFIG_FILE="/opt/community-scripts/.settings" + CONFIG_FILE="/opt/community-scripts/.settings" - if [[ -f "/opt/community-scripts/${NSAPP}.conf" ]]; then - CONFIG_FILE="/opt/community-scripts/${NSAPP}.conf" - fi - - if CONFIG_FILE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set absolute path to config file" 8 58 $CONFIG_FILE --title "CONFIG FILE" 3>&1 1>&2 2>&3); then - if [[ ! -f "$CONFIG_FILE" ]]; then - echo -e "${CROSS}${RD}Config file not found, exiting script!.${CL}" - exit - else - echo -e "${INFO}${BOLD}${DGN}Using config File: ${BGN}$CONFIG_FILE${CL}" - base_settings - source "$CONFIG_FILE" + if [[ -f "/opt/community-scripts/${NSAPP}.conf" ]]; then + CONFIG_FILE="/opt/community-scripts/${NSAPP}.conf" fi - fi - if [[ "$var_os" == "debian" ]]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - if [[ "$var_version" == "11" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "12" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - else - msg_error "Unknown setting for var_version, should be 11 or 12, was ${var_version}" - exit - fi - elif [[ "$var_os" == "ubuntu" ]]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - if [[ "$var_version" == "20.04" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "22.04" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "24.04" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "24.10" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - else - msg_error "Unknown setting for var_version, should be 20.04, 22.04, 24.04 or 24.10, was ${var_version}" - exit - fi - else - msg_error "Unknown setting for var_os! should be debian or ubuntu, was ${var_os}" - exit - fi - - if [[ -n "$CT_ID" ]]; then - - if [[ "$CT_ID" =~ ^([0-9]{3,4})-([0-9]{3,4})$ ]]; then - MIN_ID=${BASH_REMATCH[1]} - MAX_ID=${BASH_REMATCH[2]} - - if ((MIN_ID >= MAX_ID)); then - msg_error "Invalid Container ID range. The first number must be smaller than the second number, was ${CT_ID}" - exit - fi - - LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') - - for ((ID = MIN_ID; ID <= MAX_ID; ID++)); do - if ! grep -q "^$ID$" <<<"$LIST_OF_IDS"; then - CT_ID=$ID - break + if CONFIG_FILE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set absolute path to config file" 8 58 $CONFIG_FILE --title "CONFIG FILE" 3>&1 1>&2 2>&3); then + if [[ ! -f "$CONFIG_FILE" ]]; then + echo -e "${CROSS}${RD}Config file not found, exiting script!.${CL}" + exit + else + echo -e "${INFO}${BOLD}${DGN}Using config File: ${BGN}$CONFIG_FILE${CL}" + base_settings + source "$CONFIG_FILE" fi - done + fi - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - - elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then - - LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') - if ! grep -q "^$CT_ID$" <<<"$LIST_OF_IDS"; then - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - msg_error "Container ID $CT_ID already exists" + if [[ "$var_os" == "debian" ]]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + if [[ "$var_version" == "11" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "12" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + else + msg_error "Unknown setting for var_version, should be 11 or 12, was ${var_version}" + exit + fi + elif [[ "$var_os" == "ubuntu" ]]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + if [[ "$var_version" == "20.04" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "22.04" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "24.04" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "24.10" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + else + msg_error "Unknown setting for var_version, should be 20.04, 22.04, 24.04 or 24.10, was ${var_version}" + exit + fi + else + msg_error "Unknown setting for var_os! should be debian or ubuntu, was ${var_os}" exit - fi - else - msg_error "Invalid Container ID format. Needs to be 0000-9999 or 0-9999, was ${CT_ID}" - exit fi - fi - if [[ "$CT_TYPE" -eq 0 ]]; then - CT_TYPE_DESC="Privileged" - elif [[ "$CT_TYPE" -eq 1 ]]; then - CT_TYPE_DESC="Unprivileged" - else - msg_error "Unknown setting for CT_TYPE, should be 1 or 0, was ${CT_TYPE}" - exit - fi - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + if [[ -n "$CT_ID" ]]; then - if [[ ! -z "$PW" ]]; then + if [[ "$CT_ID" =~ ^([0-9]{3,4})-([0-9]{3,4})$ ]]; then + MIN_ID=${BASH_REMATCH[1]} + MAX_ID=${BASH_REMATCH[2]} - if [[ "$PW" == *" "* ]]; then - msg_error "Password cannot be empty" - exit - elif [[ ${#PW} -lt 5 ]]; then - msg_error "Password must be at least 5 characters long" - exit - else - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" + if ((MIN_ID >= MAX_ID)); then + msg_error "Invalid Container ID range. The first number must be smaller than the second number, was ${CT_ID}" + exit + fi + + LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') + + for ((ID = MIN_ID; ID <= MAX_ID; ID++)); do + if ! grep -q "^$ID$" <<<"$LIST_OF_IDS"; then + CT_ID=$ID + break + fi + done + + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + + elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then + + LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') + if ! grep -q "^$CT_ID$" <<<"$LIST_OF_IDS"; then + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + msg_error "Container ID $CT_ID already exists" + exit + fi + else + msg_error "Invalid Container ID format. Needs to be 0000-9999 or 0-9999, was ${CT_ID}" + exit + fi fi - PW="-password $PW" - else - PW="" - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}Automatic Login${CL}" - fi - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - if [[ ! -z "$HN" ]]; then - echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" - else - msg_error "Hostname cannot be empty" - exit - fi - - if [[ ! -z "$DISK_SIZE" ]]; then - if [[ "$DISK_SIZE" =~ ^-?[0-9]+$ ]]; then - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + if [[ "$CT_TYPE" -eq 0 ]]; then + CT_TYPE_DESC="Privileged" + elif [[ "$CT_TYPE" -eq 1 ]]; then + CT_TYPE_DESC="Unprivileged" else - msg_error "DISK_SIZE must be an integer, was ${DISK_SIZE}" - exit + msg_error "Unknown setting for CT_TYPE, should be 1 or 0, was ${CT_TYPE}" + exit fi - else - msg_error "DISK_SIZE cannot be empty" - exit - fi + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - if [[ ! -z "$CORE_COUNT" ]]; then - if [[ "$CORE_COUNT" =~ ^-?[0-9]+$ ]]; then - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" + if [[ ! -z "$PW" ]]; then + + if [[ "$PW" == *" "* ]]; then + msg_error "Password cannot be empty" + exit + elif [[ ${#PW} -lt 5 ]]; then + msg_error "Password must be at least 5 characters long" + exit + else + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" + fi + PW="-password $PW" else - msg_error "CORE_COUNT must be an integer, was ${CORE_COUNT}" - exit + PW="" + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}Automatic Login${CL}" fi - else - msg_error "CORE_COUNT cannot be empty" - exit - fi + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - if [[ ! -z "$RAM_SIZE" ]]; then - if [[ "$RAM_SIZE" =~ ^-?[0-9]+$ ]]; then - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + if [[ ! -z "$HN" ]]; then + echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" else - msg_error "RAM_SIZE must be an integer, was ${RAM_SIZE}" - exit + msg_error "Hostname cannot be empty" + exit fi - else - msg_error "RAM_SIZE cannot be empty" - exit - fi - if [[ ! -z "$BRG" ]]; then - if grep -q "^iface ${BRG}" /etc/network/interfaces; then - echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + if [[ ! -z "$DISK_SIZE" ]]; then + if [[ "$DISK_SIZE" =~ ^-?[0-9]+$ ]]; then + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + else + msg_error "DISK_SIZE must be an integer, was ${DISK_SIZE}" + exit + fi else - msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces" - exit + msg_error "DISK_SIZE cannot be empty" + exit fi - else - msg_error "Bridge cannot be empty" - exit - fi - local ip_cidr_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/([0-9]{1,2})$' - local ip_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$' - - if [[ ! -z $NET ]]; then - if [ "$NET" == "dhcp" ]; then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}DHCP${CL}" - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" - elif - [[ "$NET" =~ $ip_cidr_regex ]] - then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + if [[ ! -z "$CORE_COUNT" ]]; then + if [[ "$CORE_COUNT" =~ ^-?[0-9]+$ ]]; then + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" + else + msg_error "CORE_COUNT must be an integer, was ${CORE_COUNT}" + exit + fi else - msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}" - exit + msg_error "CORE_COUNT cannot be empty" + exit fi - fi - if [ ! -z "$GATE" ]; then - if [[ "$GATE" =~ $ip_regex ]]; then - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE${CL}" - GATE=",gw=$GATE" + + if [[ ! -z "$RAM_SIZE" ]]; then + if [[ "$RAM_SIZE" =~ ^-?[0-9]+$ ]]; then + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + else + msg_error "RAM_SIZE must be an integer, was ${RAM_SIZE}" + exit + fi else - msg_error "Invalid IP Address format for Gateway. Needs to be 0.0.0.0, was ${GATE}" - exit + msg_error "RAM_SIZE cannot be empty" + exit fi - else - msg_error "Gateway IP Address cannot be empty" - exit - fi - if [[ ! -z "$APT_CACHER_IP" ]]; then - if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then - APT_CACHER="yes" - echo -e "${NETWORK}${BOLD}${DGN}APT-CACHER IP Address: ${BGN}$APT_CACHER_IP${CL}" + if [[ ! -z "$BRG" ]]; then + if grep -q "^iface ${BRG}" /etc/network/interfaces; then + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + else + msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces" + exit + fi else - msg_error "Invalid IP Address format for APT-Cacher. Needs to be 0.0.0.0, was ${APT_CACHER_IP}" - exit + msg_error "Bridge cannot be empty" + exit fi - fi - if [[ "$DISABLEIP6" == "yes" ]]; then - echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}Yes${CL}" - elif [[ "$DISABLEIP6" == "no" ]]; then - echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}No${CL}" - else - msg_error "Disable IPv6 needs to be 'yes' or 'no'" - exit - fi + local ip_cidr_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/([0-9]{1,2})$' + local ip_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$' - if [[ ! -z "$MTU" ]]; then - if [[ "$MTU" =~ ^-?[0-9]+$ ]]; then - echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU${CL}" - MTU=",mtu=$MTU" + if [[ ! -z $NET ]]; then + if [ "$NET" == "dhcp" ]; then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}DHCP${CL}" + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" + elif + [[ "$NET" =~ $ip_cidr_regex ]] + then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + else + msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}" + exit + fi + fi + if [ ! -z "$GATE" ]; then + if [[ "$GATE" =~ $ip_regex ]]; then + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE${CL}" + GATE=",gw=$GATE" + else + msg_error "Invalid IP Address format for Gateway. Needs to be 0.0.0.0, was ${GATE}" + exit + fi else - msg_error "MTU must be an integer, was ${MTU}" - exit + msg_error "Gateway IP Address cannot be empty" + exit fi - else - MTU="" - echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}" - fi + if [[ ! -z "$APT_CACHER_IP" ]]; then + if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then + APT_CACHER="yes" + echo -e "${NETWORK}${BOLD}${DGN}APT-CACHER IP Address: ${BGN}$APT_CACHER_IP${CL}" + else + msg_error "Invalid IP Address format for APT-Cacher. Needs to be 0.0.0.0, was ${APT_CACHER_IP}" + exit + fi + fi - if [[ ! -z "$SD" ]]; then - echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SD${CL}" - SD="-searchdomain=$SD" - else - SD="" - echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}HOST${CL}" - fi - - if [[ ! -z "$NS" ]]; then - if [[ "$NS" =~ $ip_regex ]]; then - echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NS${CL}" - NS="-nameserver=$NS" + if [[ "$DISABLEIP6" == "yes" ]]; then + echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}Yes${CL}" + elif [[ "$DISABLEIP6" == "no" ]]; then + echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}No${CL}" else - msg_error "Invalid IP Address format for DNS Server. Needs to be 0.0.0.0, was ${NS}" - exit + msg_error "Disable IPv6 needs to be 'yes' or 'no'" + exit fi - else - NS="" - echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}HOST${CL}" - fi - if [[ ! -z "$MAC" ]]; then - if [[ "$MAC" =~ ^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$ ]]; then - echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}" - MAC=",hwaddr=$MAC" + if [[ ! -z "$MTU" ]]; then + if [[ "$MTU" =~ ^-?[0-9]+$ ]]; then + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU${CL}" + MTU=",mtu=$MTU" + else + msg_error "MTU must be an integer, was ${MTU}" + exit + fi else - msg_error "MAC Address must be in the format xx:xx:xx:xx:xx:xx, was ${MAC}" - exit - fi - fi + MTU="" + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}" - if [[ ! -z "$VLAN" ]]; then - if [[ "$VLAN" =~ ^-?[0-9]+$ ]]; then - echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN${CL}" - VLAN=",tag=$VLAN" + fi + + if [[ ! -z "$SD" ]]; then + echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SD${CL}" + SD="-searchdomain=$SD" else - msg_error "VLAN must be an integer, was ${VLAN}" - exit + SD="" + echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}HOST${CL}" fi - fi - if [[ ! -z "$TAGS" ]]; then - echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" - fi - - if [[ "$SSH" == "yes" ]]; then - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" - if [[ ! -z "$SSH_AUTHORIZED_KEY" ]]; then - echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}********************${CL}" + if [[ ! -z "$NS" ]]; then + if [[ "$NS" =~ $ip_regex ]]; then + echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NS${CL}" + NS="-nameserver=$NS" + else + msg_error "Invalid IP Address format for DNS Server. Needs to be 0.0.0.0, was ${NS}" + exit + fi else - echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}None${CL}" + NS="" + echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}HOST${CL}" fi - elif [[ "$SSH" == "no" ]]; then - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" - else - msg_error "SSH needs to be 'yes' or 'no', was ${SSH}" - exit - fi - if [[ "$VERB" == "yes" ]]; then - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" - elif [[ "$VERB" == "no" ]]; then - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}No${CL}" - else - msg_error "Verbose Mode needs to be 'yes' or 'no', was ${VERB}" - exit - fi + if [[ ! -z "$MAC" ]]; then + if [[ "$MAC" =~ ^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$ ]]; then + echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}" + MAC=",hwaddr=$MAC" + else + msg_error "MAC Address must be in the format xx:xx:xx:xx:xx:xx, was ${MAC}" + exit + fi + fi - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS WITH CONFIG FILE COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above settings${CL}" - else - clear - header_info - echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" - config_file - fi + if [[ ! -z "$VLAN" ]]; then + if [[ "$VLAN" =~ ^-?[0-9]+$ ]]; then + echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN${CL}" + VLAN=",tag=$VLAN" + else + msg_error "VLAN must be an integer, was ${VLAN}" + exit + fi + fi + + if [[ ! -z "$TAGS" ]]; then + echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" + fi + + if [[ "$SSH" == "yes" ]]; then + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + if [[ ! -z "$SSH_AUTHORIZED_KEY" ]]; then + echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}********************${CL}" + else + echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}None${CL}" + fi + elif [[ "$SSH" == "no" ]]; then + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + else + msg_error "SSH needs to be 'yes' or 'no', was ${SSH}" + exit + fi + + if [[ "$VERB" == "yes" ]]; then + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" + elif [[ "$VERB" == "no" ]]; then + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}No${CL}" + else + msg_error "Verbose Mode needs to be 'yes' or 'no', was ${VERB}" + exit + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS WITH CONFIG FILE COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above settings${CL}" + else + clear + header_info + echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" + config_file + fi } install_script() { - pve_check - shell_check - root_check - arch_check - ssh_check - maxkeys_check - diagnostics_check + pve_check + shell_check + root_check + arch_check + ssh_check + maxkeys_check + diagnostics_check - if systemctl is-active -q ping-instances.service; then - systemctl -q stop ping-instances.service - fi - NEXTID=$(pvesh get /cluster/nextid) - timezone=$(cat /etc/timezone) - header_info - while true; do - - CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \ - 18 60 6 \ - "1" "Default Settings" \ - "2" "Default Settings (with output)" \ - "3" "Advanced Settings" \ - "4" "Diagnostic Settings" \ - "5" "Use Config File" \ - "6" "Exit" --nocancel --default-item "1" 3>&1 1>&2 2>&3) - - if [ $? -ne 0 ]; then - echo -e "${CROSS}${RD} Menu canceled. Exiting.${CL}" - exit 0 + if systemctl is-active -q ping-instances.service; then + systemctl -q stop ping-instances.service fi + NEXTID=$(pvesh get /cluster/nextid) + timezone=$(cat /etc/timezone) + header_info + while true; do - case $CHOICE in - 1) - header_info - echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME${CL}" - VERB="no" - METHOD="default" - base_settings "$VERB" - echo_default - break - ;; - 2) - header_info - echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}Verbose)${CL}" - VERB="yes" - METHOD="default" - base_settings "$VERB" - echo_default - break - ;; - 3) - header_info - echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" - METHOD="advanced" - base_settings - advanced_settings - break - ;; - 4) - if [[ $DIAGNOSTICS == "yes" ]]; then - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ - --yes-button "No" --no-button "Back"; then - DIAGNOSTICS="no" - sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=no/' /usr/local/community-scripts/diagnostics - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 - fi - else - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ - --yes-button "Yes" --no-button "Back"; then - DIAGNOSTICS="yes" - sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=yes/' /usr/local/community-scripts/diagnostics - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 - fi - fi + CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \ + 18 60 6 \ + "1" "Default Settings" \ + "2" "Default Settings (with output)" \ + "3" "Advanced Settings" \ + "4" "Diagnostic Settings" \ + "5" "Use Config File" \ + "6" "Exit" --nocancel --default-item "1" 3>&1 1>&2 2>&3) - ;; - 5) - header_info - echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" - config_file - break - ;; - 6) - echo -e "${CROSS}${RD}Exiting.${CL}" - exit 0 - ;; - *) - echo -e "${CROSS}${RD}Invalid option, please try again.${CL}" - ;; - esac - done + if [ $? -ne 0 ]; then + echo -e "${CROSS}${RD} Menu canceled. Exiting.${CL}" + exit 0 + fi + + case $CHOICE in + 1) + header_info + echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME${CL}" + VERB="no" + METHOD="default" + base_settings "$VERB" + echo_default + break + ;; + 2) + header_info + echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}Verbose)${CL}" + VERB="yes" + METHOD="default" + base_settings "$VERB" + echo_default + break + ;; + 3) + header_info + echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" + METHOD="advanced" + base_settings + advanced_settings + break + ;; + 4) + if [[ $DIAGNOSTICS == "yes" ]]; then + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ + --yes-button "No" --no-button "Back"; then + DIAGNOSTICS="no" + sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=no/' /usr/local/community-scripts/diagnostics + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 + fi + else + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ + --yes-button "Yes" --no-button "Back"; then + DIAGNOSTICS="yes" + sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=yes/' /usr/local/community-scripts/diagnostics + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 + fi + fi + + ;; + 5) + header_info + echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" + config_file + break + ;; + 6) + echo -e "${CROSS}${RD}Exiting.${CL}" + exit 0 + ;; + *) + echo -e "${CROSS}${RD}Invalid option, please try again.${CL}" + ;; + esac + done } check_container_resources() { - # Check actual RAM & Cores - current_ram=$(free -m | awk 'NR==2{print $2}') - current_cpu=$(nproc) + # Check actual RAM & Cores + current_ram=$(free -m | awk 'NR==2{print $2}') + current_cpu=$(nproc) - # Check whether the current RAM is less than the required RAM or the CPU cores are less than required - if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then - echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}" - echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n" - echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " - read -r prompt - # Check if the input is 'yes', otherwise exit with status 1 - if [[ ! ${prompt,,} =~ ^(yes)$ ]]; then - echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}" - exit 1 + # Check whether the current RAM is less than the required RAM or the CPU cores are less than required + if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then + echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}" + echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n" + echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " + read -r prompt + # Check if the input is 'yes', otherwise exit with status 1 + if [[ ! ${prompt,,} =~ ^(yes)$ ]]; then + echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}" + exit 1 + fi + else + echo -e "" fi - else - echo -e "" - fi } check_container_storage() { - # Check if the /boot partition is more than 80% full - total_size=$(df /boot --output=size | tail -n 1) - local used_size=$(df /boot --output=used | tail -n 1) - usage=$((100 * used_size / total_size)) - if ((usage > 80)); then - # Prompt the user for confirmation to continue - echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}" - echo -ne "Continue anyway? " - read -r prompt - # Check if the input is 'y' or 'yes', otherwise exit with status 1 - if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then - echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}" - exit 1 + # Check if the /boot partition is more than 80% full + total_size=$(df /boot --output=size | tail -n 1) + local used_size=$(df /boot --output=used | tail -n 1) + usage=$((100 * used_size / total_size)) + if ((usage > 80)); then + # Prompt the user for confirmation to continue + echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}" + echo -ne "Continue anyway? " + read -r prompt + # Check if the input is 'y' or 'yes', otherwise exit with status 1 + if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then + echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}" + exit 1 + fi fi - fi } start() { - LOGDIR="/usr/local/community-scripts/logs" - mkdir -p "$LOGDIR" + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" - if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - exit_script - exit - fi - SPINNER_PID="" - install_script - else - if [ -f /etc/alpine-release ]; then - update_script + if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + exit_script + exit + fi + SPINNER_PID="" + install_script else - CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ - "Support/Update functions for ${APP} LXC. Choose an option:" \ - 12 60 3 \ - "1" "YES (Silent Mode)" \ - "2" "YES (Verbose Mode)" \ - "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) + if [ -f /etc/alpine-release ]; then + update_script + else + CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ + "Support/Update functions for ${APP} LXC. Choose an option:" \ + 12 60 3 \ + "1" "YES (Silent Mode)" \ + "2" "YES (Verbose Mode)" \ + "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) - case "$CHOICE" in - 1) - VERB="no" - set_std_mode - log_message "INFO" "Update started (Silent Mode)" - ;; - 2) - VERB="yes" - set_std_mode - log_message "INFO" "Update started (Verbose Mode)" - ;; - 3) - clear - log_message "INFO" "Update aborted." - exit_script - exit - ;; - esac + case "$CHOICE" in + 1) + VERB="no" + set_std_mode + log_message "INFO" "Update started (Silent Mode)" + ;; + 2) + VERB="yes" + set_std_mode + log_message "INFO" "Update started (Verbose Mode)" + ;; + 3) + clear + log_message "INFO" "Update aborted." + exit_script + exit + ;; + esac - SPINNER_PID="" - update_script - fi + SPINNER_PID="" + update_script + fi + fi } # This function collects user settings and integrates all the collected information. build_container() { - # if [ "$VERB" == "yes" ]; then set -x; fi + # if [ "$VERB" == "yes" ]; then set -x; fi - if [ "$CT_TYPE" == "1" ]; then - FEATURES="keyctl=1,nesting=1" - else - FEATURES="nesting=1" - fi + if [ "$CT_TYPE" == "1" ]; then + FEATURES="keyctl=1,nesting=1" + else + FEATURES="nesting=1" + fi - if [ "$ENABLE_FUSE" == "yes" ]; then - FEATURES+=",fuse=1" - fi + if [ "$ENABLE_FUSE" == "yes" ]; then + FEATURES+=",fuse=1" + fi - if [[ $DIAGNOSTICS == "yes" ]]; then - post_to_api - fi + if [[ $DIAGNOSTICS == "yes" ]]; then + post_to_api + fi - FEATURES="${FEATURES#,}" - TEMP_DIR=$(mktemp -d) - pushd $TEMP_DIR >/dev/null - if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" - else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" - fi - export RANDOM_UUID="$RANDOM_UUID" - export CACHER="$APT_CACHER" - export CACHER_IP="$APT_CACHER_IP" - export tz="$timezone" - export DISABLEIPV6="$DISABLEIP6" - export APPLICATION="$APP" - export app="$NSAPP" - export PASSWORD="$PW" - export VERBOSE="$VERB" - export SSH_ROOT="${SSH}" - export SSH_AUTHORIZED_KEY - export CTID="$CT_ID" - export CTTYPE="$CT_TYPE" - export PCT_OSTYPE="$var_os" - export PCT_OSVERSION="$var_version" - export PCT_DISK_SIZE="$DISK_SIZE" - export IPv6="$IPv6" - export PCT_OPTIONS=" + FEATURES="${FEATURES#,}" + TEMP_DIR=$(mktemp -d) + pushd $TEMP_DIR >/dev/null + if [ "$var_os" == "alpine" ]; then + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" + else + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + fi + export RANDOM_UUID="$RANDOM_UUID" + export CACHER="$APT_CACHER" + export CACHER_IP="$APT_CACHER_IP" + export tz="$timezone" + export DISABLEIPV6="$DISABLEIP6" + export APPLICATION="$APP" + export app="$NSAPP" + export PASSWORD="$PW" + export VERBOSE="$VERB" + export SSH_ROOT="${SSH}" + export SSH_AUTHORIZED_KEY + export CTID="$CT_ID" + export CTTYPE="$CT_TYPE" + export PCT_OSTYPE="$var_os" + export PCT_OSVERSION="$var_version" + export PCT_DISK_SIZE="$DISK_SIZE" + export IPv6="$IPv6" + export PCT_OPTIONS=" -features $FEATURES -hostname $HN -tags $TAGS @@ -1459,12 +1460,12 @@ build_container() { $PW " - # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? + # This executes create_lxc.sh and creates the container and .conf file + bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - if [ "$CT_TYPE" == "0" ]; then - cat <>$LXC_CONFIG + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + if [ "$CT_TYPE" == "0" ]; then + cat <>$LXC_CONFIG # USB passthrough lxc.cgroup2.devices.allow: a lxc.cap.drop: @@ -1476,11 +1477,11 @@ lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create= lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file EOF - fi + fi - if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then - cat <>$LXC_CONFIG + if [ "$CT_TYPE" == "0" ]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then + cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm @@ -1489,50 +1490,50 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF - fi - else - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then - if [[ -e "/dev/dri/renderD128" ]]; then - if [[ -e "/dev/dri/card0" ]]; then - cat <>$LXC_CONFIG + fi + else + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then + if [[ -e "/dev/dri/renderD128" ]]; then + if [[ -e "/dev/dri/card0" ]]; then + cat <>$LXC_CONFIG # VAAPI hardware transcoding dev0: /dev/dri/card0,gid=44 dev1: /dev/dri/renderD128,gid=104 EOF - else - cat <>$LXC_CONFIG + else + cat <>$LXC_CONFIG # VAAPI hardware transcoding dev0: /dev/dri/card1,gid=44 dev1: /dev/dri/renderD128,gid=104 EOF + fi + fi fi - fi fi - fi - # This starts the container and executes -install.sh - msg_info "Starting LXC Container" - pct start "$CTID" - msg_ok "Started LXC Container" - if [ "$var_os" == "alpine" ]; then - sleep 3 - pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories + # This starts the container and executes -install.sh + msg_info "Starting LXC Container" + pct start "$CTID" + msg_ok "Started LXC Container" + if [ "$var_os" == "alpine" ]; then + sleep 3 + pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories http://dl-cdn.alpinelinux.org/alpine/latest-stable/main http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' - pct exec "$CTID" -- ash -c "apk add bash >/dev/null" - fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? + pct exec "$CTID" -- ash -c "apk add bash >/dev/null" + fi + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? } # This function sets the description of the container. description() { - IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) + IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - # Generate LXC Description - DESCRIPTION=$( - cat < Logo @@ -1560,38 +1561,38 @@ description() { EOF - ) + ) - # Set Description in LXC - pct set "$CTID" -description "$DESCRIPTION" + # Set Description in LXC + pct set "$CTID" -description "$DESCRIPTION" - if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service - fi + if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service + fi - post_update_to_api "done" "none" + post_update_to_api "done" "none" } set_std_mode() { - if [ "$VERB" = "yes" ]; then - STD="" - else - STD="silent" - fi + if [ "$VERB" = "yes" ]; then + STD="" + else + STD="silent" + fi } # Silent execution function silent() { - if [ "$VERB" = "no" ]; then - "$@" >>"$LOGFILE" 2>&1 - else - "$@" 2>&1 | tee -a "$LOGFILE" - fi + if [ "$VERB" = "no" ]; then + "$@" >>"$LOGFILE" 2>&1 + else + "$@" 2>&1 | tee -a "$LOGFILE" + fi } exit_script() { - exit_code=$? # Capture exit status - post_update_to_api "failed" "$exit_code" + exit_code=$? # Capture exit status + post_update_to_api "failed" "$exit_code" } trap 'exit_script' EXIT From f934b48a558ad44ecf935d59e368c62f694afd28 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:22:00 +0100 Subject: [PATCH 0053/1614] Update build.func --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index 067e7dc..b6c44b6 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1362,6 +1362,7 @@ start() { if command -v pveversion >/dev/null 2>&1; then if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear + SPINNER_PID="" exit_script exit fi From fcb5d0c2b787b84465a4c77fb095b6ca9a7c0b0e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:25:36 +0100 Subject: [PATCH 0054/1614] Update build.func --- misc/build.func | 64 +++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/misc/build.func b/misc/build.func index b6c44b6..dba0e84 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1362,45 +1362,47 @@ start() { if command -v pveversion >/dev/null 2>&1; then if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear - SPINNER_PID="" exit_script exit fi SPINNER_PID="" install_script - else + fi + + if ! command -v pveversion >/dev/null 2>&1; then if [ -f /etc/alpine-release ]; then + echo "Running on Alpine Linux – minimal update process." update_script - else - CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ - "Support/Update functions for ${APP} LXC. Choose an option:" \ - 12 60 3 \ - "1" "YES (Silent Mode)" \ - "2" "YES (Verbose Mode)" \ - "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) - - case "$CHOICE" in - 1) - VERB="no" - set_std_mode - log_message "INFO" "Update started (Silent Mode)" - ;; - 2) - VERB="yes" - set_std_mode - log_message "INFO" "Update started (Verbose Mode)" - ;; - 3) - clear - log_message "INFO" "Update aborted." - exit_script - exit - ;; - esac - - SPINNER_PID="" - update_script + return fi + CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ + "Support/Update functions for ${APP} LXC. Choose an option:" \ + 12 60 3 \ + "1" "YES (Silent Mode)" \ + "2" "YES (Verbose Mode)" \ + "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) + + case "$CHOICE" in + 1) + VERB="no" + set_std_mode + log_message "INFO" "Update started (Silent Mode)" + ;; + 2) + VERB="yes" + set_std_mode + log_message "INFO" "Update started (Verbose Mode)" + ;; + 3) + clear + log_message "INFO" "Update aborted." + exit_script + exit + ;; + esac + + SPINNER_PID="" + update_script fi } From 3cc3c6d534c3a0716298c4988d2f9738f2833bc4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:32:24 +0100 Subject: [PATCH 0055/1614] Update alpine-wireguard-install.sh --- install/alpine-wireguard-install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index 5470b25..3d2bafd 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -89,12 +89,16 @@ stop() { eend $? } EOF + chmod +x /etc/init.d/wg-dashboard + $STD rc-update add wg-dashboard default + $STD rc-service wg-dashboard start msg_ok "Created Service for WGDashboard" + fi msg_info "Starting Services" -rc-update add wg-quick.wg0 default -rc-service wg-quick.wg0 start +$STD rc-update add wg-quick.wg0 default +$STD rc-service wg-quick.wg0 start msg_ok "Started Services" motd_ssh From 29be0e9183078c22d1826f52b1b288555e7c2288 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:36:16 +0100 Subject: [PATCH 0056/1614] Update build.func --- misc/build.func | 61 +++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/misc/build.func b/misc/build.func index dba0e84..08fa17e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1367,42 +1367,39 @@ start() { fi SPINNER_PID="" install_script - fi - - if ! command -v pveversion >/dev/null 2>&1; then + else if [ -f /etc/alpine-release ]; then echo "Running on Alpine Linux – minimal update process." update_script - return + else + CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ + "Support/Update functions for ${APP} LXC. Choose an option:" \ + 12 60 3 \ + "1" "YES (Silent Mode)" \ + "2" "YES (Verbose Mode)" \ + "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) + + case "$CHOICE" in + 1) + VERB="no" + set_std_mode + log_message "INFO" "Update started (Silent Mode)" + ;; + 2) + VERB="yes" + set_std_mode + log_message "INFO" "Update started (Verbose Mode)" + ;; + 3) + clear + log_message "INFO" "Update aborted." + exit_script + exit + ;; + esac + + update_script fi - CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ - "Support/Update functions for ${APP} LXC. Choose an option:" \ - 12 60 3 \ - "1" "YES (Silent Mode)" \ - "2" "YES (Verbose Mode)" \ - "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) - - case "$CHOICE" in - 1) - VERB="no" - set_std_mode - log_message "INFO" "Update started (Silent Mode)" - ;; - 2) - VERB="yes" - set_std_mode - log_message "INFO" "Update started (Verbose Mode)" - ;; - 3) - clear - log_message "INFO" "Update aborted." - exit_script - exit - ;; - esac - - SPINNER_PID="" - update_script fi } From 9831033444b2ba13ba8ecafa33782d1d3d9715f0 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:36:28 +0100 Subject: [PATCH 0057/1614] Update build.func --- misc/build.func | 1 - 1 file changed, 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 08fa17e..642bd06 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1397,7 +1397,6 @@ start() { exit ;; esac - update_script fi fi From d22b51081f4abd1cdbad9f7af3fe13973f1ce769 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:44:27 +0100 Subject: [PATCH 0058/1614] Update build.func --- misc/build.func | 64 ++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/misc/build.func b/misc/build.func index 642bd06..f232926 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1358,47 +1358,47 @@ check_container_storage() { start() { LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" - + if [ -f /etc/alpine-release ]; then + echo "Running on Alpine Linux – minimal update process." + update_script + return + fi if command -v pveversion >/dev/null 2>&1; then if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear exit_script exit fi - SPINNER_PID="" install_script else - if [ -f /etc/alpine-release ]; then - echo "Running on Alpine Linux – minimal update process." - update_script - else - CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ - "Support/Update functions for ${APP} LXC. Choose an option:" \ - 12 60 3 \ - "1" "YES (Silent Mode)" \ - "2" "YES (Verbose Mode)" \ - "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) + CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ + "Support/Update functions for ${APP} LXC. Choose an option:" \ + 12 60 3 \ + "1" "YES (Silent Mode)" \ + "2" "YES (Verbose Mode)" \ + "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) - case "$CHOICE" in - 1) - VERB="no" - set_std_mode - log_message "INFO" "Update started (Silent Mode)" - ;; - 2) - VERB="yes" - set_std_mode - log_message "INFO" "Update started (Verbose Mode)" - ;; - 3) - clear - log_message "INFO" "Update aborted." - exit_script - exit - ;; - esac - update_script - fi + case "$CHOICE" in + 1) + VERB="no" + set_std_mode + log_message "INFO" "Update started (Silent Mode)" + ;; + 2) + VERB="yes" + set_std_mode + log_message "INFO" "Update started (Verbose Mode)" + ;; + 3) + clear + log_message "INFO" "Update aborted." + exit_script + exit + ;; + esac + + SPINNER_PID="" + update_script fi } From 0ba1446d458d73c6f05266a6b7ed0025929291ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:07:38 +0000 Subject: [PATCH 0059/1614] Bump vite in /frontend in the npm_and_yarn group across 1 directory Bumps the npm_and_yarn group with 1 update in the /frontend directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). Updates `vite` from 6.2.1 to 6.2.3 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v6.2.3/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v6.2.3/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] --- frontend/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index ece22f8..0861bf0 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -9665,9 +9665,9 @@ "license": "MIT" }, "node_modules/vite": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.1.tgz", - "integrity": "sha512-n2GnqDb6XPhlt9B8olZPrgMD/es/Nd1RdChF6CBD/fHW6pUyUTt2sQW2fPRX5GiD9XEa6+8A6A4f2vT6pSsE7Q==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.3.tgz", + "integrity": "sha512-IzwM54g4y9JA/xAeBPNaDXiBF8Jsgl3VBQ2YQ/wOY6fyW3xMdSoltIV3Bo59DErdqdE6RxUfv8W69DvUorE4Eg==", "dev": true, "license": "MIT", "dependencies": { From 701b7a14ea825b385aa3898ad3606b89aac649d6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Mar 2025 16:32:16 +0100 Subject: [PATCH 0060/1614] final --- ct/alpine-wireguard.sh | 1 + install/alpine-wireguard-install.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/alpine-wireguard.sh b/ct/alpine-wireguard.sh index c38f7ab..3c57cd5 100644 --- a/ct/alpine-wireguard.sh +++ b/ct/alpine-wireguard.sh @@ -28,6 +28,7 @@ function update_script() { apk upgrade wireguard-tools msg_ok "Updated WireGuard" } + start build_container description diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index 3d2bafd..68a0d1d 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -61,7 +61,7 @@ if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then cd /etc/wgdashboard/src || exit chmod u+x wgd.sh $STD ./wgd.sh install - echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf + $STD echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf sysctl -p /etc/sysctl.conf msg_ok "Installed WGDashboard" From 13724f59f1a113c4e11d8f44957e24e58a31cfba Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Tue, 25 Mar 2025 12:34:54 -0400 Subject: [PATCH 0061/1614] initial version of openziti-controller install --- ct/openziti-controller.sh | 42 +++++++++++++++++ frontend/public/json/openziti-controller.json | 43 +++++++++++++++++ install/openziti-controller-install.sh | 46 +++++++++++++++++++ 3 files changed, 131 insertions(+) create mode 100644 ct/openziti-controller.sh create mode 100644 frontend/public/json/openziti-controller.json create mode 100644 install/openziti-controller-install.sh diff --git a/ct/openziti-controller.sh b/ct/openziti-controller.sh new file mode 100644 index 0000000..136071c --- /dev/null +++ b/ct/openziti-controller.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: emoscardini +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/openziti/ziti + +APP="openziti-controller" +var_tags="network;openziti-controller" +var_cpu="2" +var_ram="1024" +var_disk="8" +var_os="ubuntu" +var_version="24.04" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "Updated $APP LXC" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" \ No newline at end of file diff --git a/frontend/public/json/openziti-controller.json b/frontend/public/json/openziti-controller.json new file mode 100644 index 0000000..005845c --- /dev/null +++ b/frontend/public/json/openziti-controller.json @@ -0,0 +1,43 @@ +{ + "name": "openziti-controller", + "slug": "openziti-controller", + "categories": [ + 4 + ], + "date_created": "2025-03-20", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": null, + "documentation": "https://openziti.io/docs/reference/tunnelers/docker/", + "website": "https://www.openziti.io/", + "logo": "https://raw.githubusercontent.com/openziti/ziti-doc/main/docusaurus/static/img/ziti-logo-dark.svg", + "description": "OpenZiti is an open-source, zero trust networking platform that enables secure connectivity between applications, services, and devices. It provides secure, encrypted connections between clients and services, and can be used to create secure, zero trust networks.", + "install_methods": [ + { + "type": "default", + "script": "ct/openziti-controller.sh", + "resources": { + "cpu": 2, + "ram": 1024, + "hdd": 8, + "os": "Ubuntu", + "version": "24.04" + } + } + ], + "default_credentials": { + "username": "created during installation", + "password": "created during installation" + }, + "notes": [ + { + "text": "The Openziti Controller installation will prompt for configuration settings during installation.", + "type": "info" + }, + { + "text": "Access the web interface at https://:/zac after installation and configuration are complete.", + "type": "info" + } + ] +} diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh new file mode 100644 index 0000000..17b4e60 --- /dev/null +++ b/install/openziti-controller-install.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: emoscardini +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/openziti/ziti + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os +install_core_deps + +msg_info "Installing Dependencies" +$STD apt-get install -y gpg +msg_ok "Installed Dependencies" + +msg_info "Installing openziti" +mkdir -p --mode=0755 /usr/share/keyrings +curl -sSLf https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg +echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main" > /etc/apt/sources.list.d/openziti.list +$STD apt-get update +$STD apt-get install -y openziti-controller openziti-console +msg_ok "Installed openziti" + +read -r -p "Would you like to go through the auto configuration now? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Starting Configuration" + bash /opt/openziti/etc/controller/bootstrap.bash + msg_ok "Configuration Completed" + systemctl enable -q --now ziti-controller +else + systemctl enable -q ziti-controller + msg_err "Configration not provided; Please run /opt/openziti/etc/controller/bootstrap.bash to configure the controller and restart the service" +fi + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From a587d0a619c015524f8fb09b6524dcfa3a578d16 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Sun, 23 Mar 2025 08:14:43 -0400 Subject: [PATCH 0062/1614] rxresume: add install script rxresume: Add browserless installation rxresume: install script updated --- install/reactive-resume-install.sh | 193 +++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 install/reactive-resume-install.sh diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh new file mode 100644 index 0000000..d00a132 --- /dev/null +++ b/install/reactive-resume-install.sh @@ -0,0 +1,193 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://rxresu.me + +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 \ + curl \ + sudo \ + mc \ + gnupg \ + unzip \ + postgresql-common \ + python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Installed Dependencies" + +msg_info "Installing Additional Dependencies" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "YES" | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh &>/dev/null +$STD apt-get install -y postgresql-16 nodejs +cd /tmp +wget -q https://dl.min.io/server/minio/release/linux-amd64/minio_20250312180418.0.0_amd64.deb -O minio.deb +$STD dpkg -i minio.deb + +msg_info "Setting up Database" +DB_USER="rxresume" +DB_NAME="rxresume" +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH ENCRYPTED PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;" +$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" +msg_ok "Set up Database" + +msg_info "Installing ${APPLICATION}" +MINIO_PASS=$(openssl rand -base64 48) +ACCESS_TOKEN=$(openssl rand -base64 48) +REFRESH_TOKEN=$(openssl rand -base64 48) +CHROME_TOKEN=$(openssl rand -hex 32) +LOCAL_IP=$(hostname -I | awk '{print $1}') +TAG=$(curl -s https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" +unzip -q v${RELEASE}.zip +mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION} +cd /opt/${APPLICATION} +corepack enable +export PUPPETEER_SKIP_DOWNLOAD="true" +export NEXT_TELEMETRY_DISABLED=1 +export CI="true" +$STD pnpm install --frozen-lockfile +$STD pnpm run build +$STD pnpm run prisma:generate +msg_ok "Installed ${APPLICATION}" + +msg_info "Installing Browserless" +cd /tmp +$STD python3 -m pip install playwright +wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip +unzip -q v${TAG}.zip +mv browserless-${TAG} /opt/browserless +cd /opt/browserless +$STD npm install +$STD node_modules/playwright-core/cli.js install --with-deps chromium firefox webkit +$STD node_modules/playwright-core/cli.js install --force chrome msedge +$STD npm run build +$STD npm run build:function +$STD npm prune production +msg_ok "Installed Browserless" + +msg_info "Configuring applications" +mkdir -p /opt/minio +cat </opt/minio/.env +MINIO_ROOT_USER="storageadmin" +MINIO_ROOT_PASSWORD="${MINIO_PASS}" +MINIO_VOLUMES=/opt/minio +EOF +cat </opt/${APPLICATION}/.env +NODE_ENV=production +PORT=3000 +PUBLIC_URL=http://${LOCAL_IP}:3000 +STORAGE_URL=http://${LOCAL_IP}:9000/rxresume +DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}?schema=public +ACCESS_TOKEN_SECRET=${ACCESS_TOKEN} +REFRESH_TOKEN_SECRET=${REFRESH_TOKEN} +CHROME_PORT=8080 +CHROME_TOKEN=${CHROME_TOKEN} +CHROME_URL=ws://${LOCAL_IP}:8080 +CHROME_IGNORE_HTTPS_ERRORS=true +MAIL_FROM=noreply@locahost +# SMTP_URL=smtp://username:password@smtp.server.mail:587 # +STORAGE_ENDPOINT=${LOCAL_IP} +STORAGE_PORT=9000 +STORAGE_REGION=us-east-1 +STORAGE_BUCKET=rxresume +STORAGE_ACCESS_KEY=storageadmin +STORAGE_SECRET_KEY=${MINIO_PASS} +STORAGE_USE_SSL=false +STORAGE_SKIP_BUCKET_CHECK=false + +# GitHub (OAuth, Optional) +# GITHUB_CLIENT_ID= +# GITHUB_CLIENT_SECRET= +# GITHUB_CALLBACK_URL=http://localhost:5173/api/auth/github/callback + +# Google (OAuth, Optional) +# GOOGLE_CLIENT_ID= +# GOOGLE_CLIENT_SECRET= +# GOOGLE_CALLBACK_URL=http://localhost:5173/api/auth/google/callback +EOF +cat </opt/browserless/.env +DEBUG=browserless*,-**:verbose +HOST=${LOCAL_IP} +PORT=8080 +TOKEN=${CHROME_TOKEN} +EOF +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +{ + echo "${APPLICATION} Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" + echo "Minio Root Password: ${MINIO_PASS}" +} >>~/$APP_NAME.creds +msg_ok "Configured applications" + +msg_info "Creating Services" +mkdir -p /etc/systemd/system/minio.service.d/ +cat </etc/systemd/system/minio.service.d/override.conf +[Service] +User=root +Group=root +WorkingDirectory=/usr/local/bin +EnvironmentFile=/opt/minio/.env +EOF + +cat </etc/systemd/system/${APPLICATION}.service +[Unit] +Description=${APPLICATION} Service +After=network.target postgresql.service minio.service +Wants=postgresql.service minio.service + +[Service] +WorkingDirectory=/opt/${APPLICATION} +EnvironmentFile=/opt/${APPLICATION}/.env +ExecStart=/usr/bin/pnpm run start +Restart=always + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/browserless.service +[Unit] +Description=Browserless service +After=network.target ${APPLICATION}.service + +[Service] +WorkingDirectory=/opt/browserless +EnvironmentFile=/opt/browserless/.env +ExecStart=/usr/bin/npm run start +Restart=unless-stopped + +[Install] +WantedBy=multi-user.target +EOF +systemctl daemon-reload +systemctl enable -q --now minio.service ${APPLICATION}.service browserless.service +msg_ok "Created Service" + +motd_ssh +customize + +# Cleanup +msg_info "Cleaning up" +rm -f /tmp/v${RELEASE}.zip +rm -f /tmp/minio.deb +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 6615f916b4fdafc83c2462eb5b3a0e7e25013e0b Mon Sep 17 00:00:00 2001 From: vhsdream Date: Mon, 24 Mar 2025 21:33:56 -0400 Subject: [PATCH 0063/1614] rxresume: Add update script --- ct/rxresume.sh | 104 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 ct/rxresume.sh diff --git a/ct/rxresume.sh b/ct/rxresume.sh new file mode 100644 index 0000000..17bbbae --- /dev/null +++ b/ct/rxresume.sh @@ -0,0 +1,104 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://rxresu.me + +APP="Reactive-Resume" +var_tags="documents" +var_cpu="2" +var_ram="2048" +var_disk="6" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f /etc/systemd/system/reactive-resume.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + RELEASE=$(curl -s https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop reactive-resume + msg_ok "Stopped $APP" + + msg_info "Updating $APP to v${RELEASE}" + cp /opt/${APP}/.env /opt/rxresume.env + cd /tmp + wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" + unzip -q v${RELEASE}.zip + cp -r ${APP}-${RELEASE}/* /opt/${APP} + corepack enable + export PUPPETEER_SKIP_DOWNLOAD="true" + export NEXT_TELEMETRY_DISABLED=1 + export CI="true" + $STD pnpm install --frozen-lockfile --prefix /opt/${APP} + $STD pnpm run build --prefix /opt/${APP} + $STD pnpm run prisma:generate --prefix /opt/${APP} + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Updating Minio" + systemctl stop minio + wget -q https://dl.min.io/server/minio/release/linux-amd64/minio_20250312180418.0.0_amd64.deb -O minio.deb + $STD dpkg -i minio.deb + msg_ok "Updated Minio" + + msg_info "Updating Playwright" + $STD python3 -m pip install playwright --upgrade + msg_ok "Updated Playwright" + + msg_info "Updating Browserless (Patience)" + systemctl stop browserless + TAG=$(curl -s https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') + wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip + unzip -q v${TAG}.zip + cp -r browserless-${TAG}/* /opt/browserless + cd /opt/browserless + $STD npm update + $STD node_modules/playwright-core/cli.js install --with-deps chromium firefox webkit + $STD node_modules/playwright-core/cli.js install --force chrome msedge + $STD npm run build + $STD npm run build:function + $STD npm prune production + msg_ok "Updated Browserless" + + msg_info "Starting services" + systemctl start minio reactive-resume browserless + msg_ok "Started services" + + msg_info "Cleaning Up" + rm -f /tmp/minio.deb + rm -rf /tmp/${APP}-${RELEASE} + rm -rf /tmp/browserless-${TAG} + + msg_ok "Cleanup Completed" + + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Update Successful" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" + 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}:3000${CL}" From 16b39faf287fe88264e3f108deec06b47401b6a4 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Mon, 24 Mar 2025 22:21:35 -0400 Subject: [PATCH 0064/1614] rxresume: Fixes rxresume: Use correct Minio download path rxresume: Fix case on service file check rxresume: Just be in the dir rxresume: another error fix rxresume: return env file after update rxresume: small readability tweaks rxresume: fix script name --- ct/{rxresume.sh => reactive-resume.sh} | 28 +++++++++++++++----------- install/reactive-resume-install.sh | 9 ++++----- 2 files changed, 20 insertions(+), 17 deletions(-) rename ct/{rxresume.sh => reactive-resume.sh} (86%) diff --git a/ct/rxresume.sh b/ct/reactive-resume.sh similarity index 86% rename from ct/rxresume.sh rename to ct/reactive-resume.sh index 17bbbae..cbe76c6 100644 --- a/ct/rxresume.sh +++ b/ct/reactive-resume.sh @@ -8,8 +8,8 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ APP="Reactive-Resume" var_tags="documents" var_cpu="2" -var_ram="2048" -var_disk="6" +var_ram="3072" +var_disk="8" var_os="debian" var_version="12" var_unprivileged="1" @@ -24,16 +24,16 @@ function update_script() { check_container_storage check_container_resources - if [[ ! -f /etc/systemd/system/reactive-resume.service ]]; then + if [[ ! -f /etc/systemd/system/Reactive-Resume.service ]]; then msg_error "No ${APP} Installation Found!" exit fi RELEASE=$(curl -s https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - msg_info "Stopping $APP" - systemctl stop reactive-resume - msg_ok "Stopped $APP" + msg_info "Stopping services" + systemctl stop Reactive-Resume + msg_ok "Stopped services" msg_info "Updating $APP to v${RELEASE}" cp /opt/${APP}/.env /opt/rxresume.env @@ -41,18 +41,21 @@ function update_script() { wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip cp -r ${APP}-${RELEASE}/* /opt/${APP} + cd /opt/${APP} corepack enable export PUPPETEER_SKIP_DOWNLOAD="true" export NEXT_TELEMETRY_DISABLED=1 export CI="true" - $STD pnpm install --frozen-lockfile --prefix /opt/${APP} - $STD pnpm run build --prefix /opt/${APP} - $STD pnpm run prisma:generate --prefix /opt/${APP} + $STD pnpm install --frozen-lockfile + $STD pnpm run build + $STD pnpm run prisma:generate + mv /opt/rxresume.env /opt/${APP}/.env msg_ok "Updated $APP to v${RELEASE}" msg_info "Updating Minio" systemctl stop minio - wget -q https://dl.min.io/server/minio/release/linux-amd64/minio_20250312180418.0.0_amd64.deb -O minio.deb + cd /tmp + wget -q https://dl.min.io/server/minio/release/linux-amd64/minio.deb $STD dpkg -i minio.deb msg_ok "Updated Minio" @@ -76,14 +79,15 @@ function update_script() { msg_ok "Updated Browserless" msg_info "Starting services" - systemctl start minio reactive-resume browserless + systemctl start minio Reactive-Resume browserless msg_ok "Started services" msg_info "Cleaning Up" rm -f /tmp/minio.deb + rm -f /tmp/v${RELEASE}.zip + rm -f /tmp/v${TAG}.zip rm -rf /tmp/${APP}-${RELEASE} rm -rf /tmp/browserless-${TAG} - msg_ok "Cleanup Completed" echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh index d00a132..092e1ee 100644 --- a/install/reactive-resume-install.sh +++ b/install/reactive-resume-install.sh @@ -32,7 +32,7 @@ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.co echo "YES" | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh &>/dev/null $STD apt-get install -y postgresql-16 nodejs cd /tmp -wget -q https://dl.min.io/server/minio/release/linux-amd64/minio_20250312180418.0.0_amd64.deb -O minio.deb +wget -q https://dl.min.io/server/minio/release/linux-amd64/minio.deb $STD dpkg -i minio.deb msg_info "Setting up Database" @@ -66,7 +66,7 @@ $STD pnpm run build $STD pnpm run prisma:generate msg_ok "Installed ${APPLICATION}" -msg_info "Installing Browserless" +msg_info "Installing Browserless (Patience)" cd /tmp $STD python3 -m pip install playwright wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip @@ -134,7 +134,7 @@ echo "${RELEASE}" >/opt/${APPLICATION}_version.txt echo "Database Password: $DB_PASS" echo "Database Name: $DB_NAME" echo "Minio Root Password: ${MINIO_PASS}" -} >>~/$APP_NAME.creds +} >>~/${APPLICATION}.creds msg_ok "Configured applications" msg_info "Creating Services" @@ -179,12 +179,11 @@ WantedBy=multi-user.target EOF systemctl daemon-reload systemctl enable -q --now minio.service ${APPLICATION}.service browserless.service -msg_ok "Created Service" +msg_ok "Created Services" motd_ssh customize -# Cleanup msg_info "Cleaning up" rm -f /tmp/v${RELEASE}.zip rm -f /tmp/minio.deb From 0a6b77a5db05bf21ad764c0f29ef79a0be7b151e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 25 Mar 2025 18:08:54 +0000 Subject: [PATCH 0065/1614] Update .app files --- ct/headers/reactive-resume | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/reactive-resume diff --git a/ct/headers/reactive-resume b/ct/headers/reactive-resume new file mode 100644 index 0000000..e897791 --- /dev/null +++ b/ct/headers/reactive-resume @@ -0,0 +1,6 @@ + ____ __ _ ____ + / __ \___ ____ ______/ /_(_) _____ / __ \___ _______ ______ ___ ___ + / /_/ / _ \/ __ `/ ___/ __/ / | / / _ \______/ /_/ / _ \/ ___/ / / / __ `__ \/ _ \ + / _, _/ __/ /_/ / /__/ /_/ /| |/ / __/_____/ _, _/ __(__ ) /_/ / / / / / / __/ +/_/ |_|\___/\__,_/\___/\__/_/ |___/\___/ /_/ |_|\___/____/\__,_/_/ /_/ /_/\___/ + From b155ffe60db67ad10ea574c7f3850992101e9a5a Mon Sep 17 00:00:00 2001 From: vhsdream Date: Tue, 25 Mar 2025 14:16:04 -0400 Subject: [PATCH 0066/1614] rxresume: add json --- frontend/public/json/reactive-resume.json | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 frontend/public/json/reactive-resume.json diff --git a/frontend/public/json/reactive-resume.json b/frontend/public/json/reactive-resume.json new file mode 100644 index 0000000..49307bd --- /dev/null +++ b/frontend/public/json/reactive-resume.json @@ -0,0 +1,34 @@ +{ + "name": "Reactive Resume", + "slug": "reactive-resume", + "categories": [ + 12 + ], + "date_created": "2025-03-26", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://docs.rxresu.me/", + "website": "https://rxresu.me", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/reactive-resume.png", + "description": "A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever.", + "install_methods": [ + { + "type": "default", + "script": "ct/reactive-resume.sh", + "resources": { + "cpu": 2, + "ram": 3072, + "hdd": 8, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} From 0c805d8a25b04dbe850591ab0f1cc3d123c3567d Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 25 Mar 2025 20:34:51 +0100 Subject: [PATCH 0067/1614] Alpine tinyauth draft --- ct/alpine-tinyauth.sh | 44 ++++++++++++++++++++ install/alpine-tinyauth-install.sh | 64 ++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 ct/alpine-tinyauth.sh create mode 100644 install/alpine-tinyauth-install.sh diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh new file mode 100644 index 0000000..88452c5 --- /dev/null +++ b/ct/alpine-tinyauth.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/steveiliop56/tinyauth + +APP="tinyauth" +var_tags="alpine;auth" +var_cpu="1" +var_ram="512" +var_disk="2" +var_os="alpine" +var_version="3.21" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + msg_info "Updating Alpine Packages" + $STD apk update && apk upgrade + msg_ok "Updated Alpine Packages" + + echo "DEBUG: CT_TYPE before update_script=${CT_TYPE:-UNDEFINED}" + echo "DEBUG: var_unprivileged=${var_unprivileged:-UNDEFINED}" + + msg_info "Updating tinyauth" + $STD apk upgrade tinyauth + msg_ok "Updated tinyauth" + + msg_info "Restarting tinyauth" + $STD rc-service tinyauth restart + msg_ok "Restarted tinyauth" +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh new file mode 100644 index 0000000..d8cc796 --- /dev/null +++ b/install/alpine-tinyauth-install.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/steveiliop56/tinyauth + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apk add \ + npm \ + curl \ + go +msg_ok "Installed Dependencies" + +msg_info "Installing tinyauth" +temp_file=$(mktemp) +$STD npm install -g bun +mkdir -p /opt/tinyauth +RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +curl -fsSL https://github.com/steveiliop56/tinyauth/archive/refs/tags/v3.1.0.tar.gz -o $temp_file +tar -xzf $temp_file -C /opt/tinyauth --strip-components=1 +cd /opt/tinyauth/site +$STD bun install +$STD bun run build +mv dist /opt/tinyauth/internal/assets/ +cd /opt/tinyauth +$STD go mod download +CGO_ENABLED=0 go build -ldflags "-s -w" +SECRET=$(head -c 32 /dev/urandom | xxd -p -c 32) +msg_ok "Installed tinyauth" + +msg_info "Enabling tinyauth Service" +service_path="/etc/init.d/tinyauth" + +echo '#!/sbin/openrc-run +description="tinyauth Service" + +command="/opt/tinyauth/tinyauth" +command_args="--secret=$SECRET --users=admin@example.com:$apr1$n61ztxfk$0f/uGQFxnB.FBa5cxgqNg." +command_user="root" +pidfile="/var/run/tinyauth.pid" + +depend() { + use net +}' >$service_path + +chmod +x $service_path +$STD rc-update add tinyauth default +msg_ok "Enabled tinyauth Service" + +msg_info "Starting tinyauth" +$STD service tinyauth start +msg_ok "Started tinyauth" + +motd_ssh +customize From 08d5eff4efcff5d0e31add13d7ad61d4965b2e8c Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 25 Mar 2025 19:35:08 +0000 Subject: [PATCH 0068/1614] Update .app files --- ct/headers/alpine-tinyauth | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/alpine-tinyauth diff --git a/ct/headers/alpine-tinyauth b/ct/headers/alpine-tinyauth new file mode 100644 index 0000000..e0c36ae --- /dev/null +++ b/ct/headers/alpine-tinyauth @@ -0,0 +1,6 @@ + __ _ __ __ + / /_(_)___ __ ______ ___ __/ /_/ /_ + / __/ / __ \/ / / / __ `/ / / / __/ __ \ +/ /_/ / / / / /_/ / /_/ / /_/ / /_/ / / / +\__/_/_/ /_/\__, /\__,_/\__,_/\__/_/ /_/ + /____/ From cf85c95ae506e8fb71726516617c2b52bb00de1e Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 25 Mar 2025 20:48:59 +0100 Subject: [PATCH 0069/1614] Update tinyauth --- ct/alpine-tinyauth.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 88452c5..6ce6f1c 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -21,6 +21,10 @@ catch_errors function update_script() { header_info + if [ ! -d /opt/tinyauth ]; then + msg_error "No ${APP} Installation Found!" + exit 1 + fi msg_info "Updating Alpine Packages" $STD apk update && apk upgrade msg_ok "Updated Alpine Packages" From 716bda24e2f51881537f61a1b78764f93b8500d3 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Tue, 25 Mar 2025 16:16:22 -0400 Subject: [PATCH 0070/1614] make search for install more specific --- ct/openziti-controller.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/openziti-controller.sh b/ct/openziti-controller.sh index 136071c..332be01 100644 --- a/ct/openziti-controller.sh +++ b/ct/openziti-controller.sh @@ -23,7 +23,7 @@ function update_script() { header_info check_container_storage check_container_resources - if [[ ! -d /var ]]; then + if [[ ! -d /opt/openziti ]]; then msg_error "No ${APP} Installation Found!" exit fi From 9089a5b7c20032f11f583638d5e03c9e4d0e3ec4 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Tue, 25 Mar 2025 16:25:34 -0400 Subject: [PATCH 0071/1614] move access info to .sh file; update credentials to null/null --- ct/openziti-controller.sh | 3 ++- frontend/public/json/openziti-controller.json | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ct/openziti-controller.sh b/ct/openziti-controller.sh index 332be01..86cb04c 100644 --- a/ct/openziti-controller.sh +++ b/ct/openziti-controller.sh @@ -39,4 +39,5 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" \ No newline at end of file +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "Access the web interface at https://${IP}:/zac" \ No newline at end of file diff --git a/frontend/public/json/openziti-controller.json b/frontend/public/json/openziti-controller.json index 005845c..c91ea0c 100644 --- a/frontend/public/json/openziti-controller.json +++ b/frontend/public/json/openziti-controller.json @@ -27,17 +27,13 @@ } ], "default_credentials": { - "username": "created during installation", - "password": "created during installation" + "username": null, + "password": null }, "notes": [ { "text": "The Openziti Controller installation will prompt for configuration settings during installation.", "type": "info" - }, - { - "text": "Access the web interface at https://:/zac after installation and configuration are complete.", - "type": "info" } ] } From e731ebbb472e13a58fddedc4433a8106b891912e Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 25 Mar 2025 21:46:21 +0100 Subject: [PATCH 0072/1614] Update create-ready-for-testing-message.yml --- .github/workflows/create-ready-for-testing-message.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-ready-for-testing-message.yml b/.github/workflows/create-ready-for-testing-message.yml index 46bd52f..4c1770b 100644 --- a/.github/workflows/create-ready-for-testing-message.yml +++ b/.github/workflows/create-ready-for-testing-message.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Extract Issue Title (Lowercase & Underscores) id: extract_title - run: echo "TITLE=$(echo '${{ github.event.issue.title }}' | tr '[:upper:]' '[:lower:]' | sed 's/ /_/g')" >> $GITHUB_ENV + run: echo "TITLE=$(echo '${{ github.event.issue.title }}' | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')" >> $GITHUB_ENV - name: Check if Files Exist in community-scripts/ProxmoxVE id: check_files From e28f5a977d918106326ee04a4be1f83abeb9ed3a Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Tue, 25 Mar 2025 16:58:29 -0400 Subject: [PATCH 0073/1614] correct path in update script function --- ct/openziti-tunnel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/openziti-tunnel.sh b/ct/openziti-tunnel.sh index 87265c9..6ab46c1 100644 --- a/ct/openziti-tunnel.sh +++ b/ct/openziti-tunnel.sh @@ -23,7 +23,7 @@ function update_script() { header_info check_container_storage check_container_resources - if [[ ! -d /var ]]; then + if [[ ! -d /opt/openziti ]]; then msg_error "No ${APP} Installation Found!" exit fi From 6d31d4ff790e3b7f541d78f353a446d5628991fb Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Wed, 26 Mar 2025 01:22:19 +0000 Subject: [PATCH 0074/1614] Update versions.json --- frontend/public/json/versions.json | 416 ++++++++++++++--------------- 1 file changed, 208 insertions(+), 208 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index b6ba539..2f60c65 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,23 +1,218 @@ [ { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-03-23T20:28:38Z" + "name": "esphome/esphome", + "version": "2025.3.2", + "date": "2025-03-25T23:06:45Z" }, { - "name": "runtipi/runtipi", - "version": "nightly", - "date": "2025-03-23T18:02:12Z" - }, - { - "name": "msgbyte/tianji", - "version": "v1.19.2", - "date": "2025-03-23T16:33:14Z" + "name": "grafana/grafana", + "version": "v11.6.0", + "date": "2025-03-25T22:10:15Z" }, { "name": "dgtlmoon/changedetection.io", - "version": "0.49.7", - "date": "2025-03-23T15:51:11Z" + "version": "0.49.8", + "date": "2025-03-25T22:00:52Z" + }, + { + "name": "immich-app/immich", + "version": "v1.130.1", + "date": "2025-03-25T20:49:15Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-03-25T20:30:03Z" + }, + { + "name": "zabbix/zabbix", + "version": "7.2.5rc2", + "date": "2025-03-25T19:25:22Z" + }, + { + "name": "Stirling-Tools/Stirling-PDF", + "version": "v0.45.0", + "date": "2025-03-25T18:48:17Z" + }, + { + "name": "ipfs/kubo", + "version": "v0.34.1", + "date": "2025-03-25T18:11:12Z" + }, + { + "name": "aceberg/WatchYourLAN", + "version": "2.1.1", + "date": "2025-03-25T17:21:41Z" + }, + { + "name": "pocket-id/pocket-id", + "version": "v0.44.0", + "date": "2025-03-25T16:09:10Z" + }, + { + "name": "dotnetfactory/fluid-calendar", + "version": "v1.3.0", + "date": "2025-03-25T15:55:02Z" + }, + { + "name": "emqx/emqx", + "version": "v5.8.6", + "date": "2025-03-25T15:22:13Z" + }, + { + "name": "hansmi/prometheus-paperless-exporter", + "version": "v0.0.7", + "date": "2025-03-25T15:11:18Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.4.0b2", + "date": "2025-03-25T14:27:52Z" + }, + { + "name": "jenkinsci/jenkins", + "version": "jenkins-2.503", + "date": "2025-03-25T14:01:20Z" + }, + { + "name": "zwave-js/zwave-js-ui", + "version": "v10.1.2", + "date": "2025-03-25T13:56:22Z" + }, + { + "name": "msgbyte/tianji", + "version": "v1.19.3", + "date": "2025-03-25T13:50:19Z" + }, + { + "name": "crowdsecurity/crowdsec", + "version": "v1.6.8", + "date": "2025-03-25T13:33:10Z" + }, + { + "name": "n8n-io/n8n", + "version": "n8n@1.85.1", + "date": "2025-03-25T09:33:57Z" + }, + { + "name": "element-hq/synapse", + "version": "v1.127.0", + "date": "2025-03-25T12:47:44Z" + }, + { + "name": "icereed/paperless-gpt", + "version": "v0.14.1", + "date": "2025-03-25T10:09:14Z" + }, + { + "name": "VictoriaMetrics/VictoriaMetrics", + "version": "pmm-6401-v1.114.0", + "date": "2025-03-25T07:58:34Z" + }, + { + "name": "zitadel/zitadel", + "version": "v2.70.6", + "date": "2025-03-25T07:11:32Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1691", + "date": "2025-03-25T06:11:16Z" + }, + { + "name": "caddyserver/caddy", + "version": "v2.9.1", + "date": "2025-01-08T15:22:53Z" + }, + { + "name": "fallenbagel/jellyseerr", + "version": "preview-OIDC", + "date": "2025-03-25T00:28:11Z" + }, + { + "name": "influxdata/influxdb", + "version": "v3.0.0-0.beta.2", + "date": "2025-03-24T21:12:19Z" + }, + { + "name": "runtipi/runtipi", + "version": "v3.10.0", + "date": "2025-03-15T14:38:16Z" + }, + { + "name": "ZoeyVid/NPMplus", + "version": "2025-03-24-r2", + "date": "2025-03-24T20:52:35Z" + }, + { + "name": "HabitRPG/habitica", + "version": "v5.35.0", + "date": "2025-03-24T20:51:10Z" + }, + { + "name": "go-gitea/gitea", + "version": "v1.23.6", + "date": "2025-03-24T20:38:45Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" + }, + { + "name": "docmost/docmost", + "version": "v0.9.0", + "date": "2025-03-24T18:25:37Z" + }, + { + "name": "Radarr/Radarr", + "version": "v5.21.1.9799", + "date": "2025-03-24T15:52:12Z" + }, + { + "name": "Graylog2/graylog2-server", + "version": "6.2.0-beta.2", + "date": "2025-03-24T12:20:51Z" + }, + { + "name": "wavelog/wavelog", + "version": "2.0.2", + "date": "2025-03-24T12:02:08Z" + }, + { + "name": "semaphoreui/semaphore", + "version": "v2.13.2", + "date": "2025-03-24T11:18:10Z" + }, + { + "name": "cockpit-project/cockpit", + "version": "336", + "date": "2025-03-24T07:16:02Z" + }, + { + "name": "nzbgetcom/nzbget", + "version": "v24.8", + "date": "2025-03-18T07:33:51Z" + }, + { + "name": "pocketbase/pocketbase", + "version": "v0.26.3", + "date": "2025-03-24T04:42:52Z" + }, + { + "name": "firefly-iii/firefly-iii", + "version": "v6.2.10", + "date": "2025-03-22T13:02:26Z" + }, + { + "name": "requarks/wiki", + "version": "v2.5.307", + "date": "2025-03-24T01:33:31Z" + }, + { + "name": "moghtech/komodo", + "version": "v1.17.0", + "date": "2025-03-24T00:46:32Z" }, { "name": "Lidarr/Lidarr", @@ -39,21 +234,11 @@ "version": "v10.0.3", "date": "2025-03-23T08:58:24Z" }, - { - "name": "Radarr/Radarr", - "version": "v5.20.2.9777", - "date": "2025-03-18T12:11:37Z" - }, { "name": "Prowlarr/Prowlarr", "version": "v1.32.2.4987", "date": "2025-03-16T09:41:37Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1680", - "date": "2025-03-23T06:10:41Z" - }, { "name": "morpheus65535/bazarr", "version": "v1.5.1", @@ -64,11 +249,6 @@ "version": "v11.7.6", "date": "2025-03-23T05:08:22Z" }, - { - "name": "esphome/esphome", - "version": "2025.3.1", - "date": "2025-03-23T04:45:21Z" - }, { "name": "usememos/memos", "version": "v0.24.2", @@ -84,26 +264,11 @@ "version": "sdk/v0.23.0", "date": "2025-03-22T17:26:10Z" }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.10", - "date": "2025-03-22T13:02:26Z" - }, { "name": "documenso/documenso", "version": "v1.10.0-rc.1", "date": "2025-03-22T06:34:33Z" }, - { - "name": "pocketbase/pocketbase", - "version": "v0.26.2", - "date": "2025-03-22T04:21:44Z" - }, { "name": "ollama/ollama", "version": "v0.6.2", @@ -139,16 +304,6 @@ "version": "v1.12.0", "date": "2025-03-21T19:14:59Z" }, - { - "name": "influxdata/influxdb", - "version": "v1.12.0rc0", - "date": "2025-03-21T17:24:38Z" - }, - { - "name": "ZoeyVid/NPMplus", - "version": "2025-03-21-r1", - "date": "2025-03-21T14:54:00Z" - }, { "name": "photoprism/photoprism", "version": "250321-57590c48b", @@ -164,11 +319,6 @@ "version": "v0.14.5-rc5", "date": "2025-03-21T10:50:34Z" }, - { - "name": "zwave-js/zwave-js-ui", - "version": "v10.1.0", - "date": "2025-03-21T09:17:45Z" - }, { "name": "StarFleetCPTN/GoMFT", "version": "v0.1.18", @@ -179,36 +329,16 @@ "version": "v0.9.77", "date": "2025-03-21T02:25:42Z" }, - { - "name": "ipfs/kubo", - "version": "v0.34.0", - "date": "2025-03-20T21:51:05Z" - }, - { - "name": "pocket-id/pocket-id", - "version": "v0.43.1", - "date": "2025-03-20T20:38:06Z" - }, { "name": "stonith404/pingvin-share", "version": "v1.10.4", "date": "2025-03-20T18:56:10Z" }, - { - "name": "dotnetfactory/fluid-calendar", - "version": "v1.2.3", - "date": "2025-03-20T17:54:55Z" - }, { "name": "ellite/Wallos", "version": "v2.48.0", "date": "2025-03-20T16:57:43Z" }, - { - "name": "HabitRPG/habitica", - "version": "v5.34.4", - "date": "2025-03-20T16:54:45Z" - }, { "name": "neo4j/neo4j", "version": "4.4.42", @@ -219,16 +349,6 @@ "version": "8.0-rc1", "date": "2025-03-11T18:16:27Z" }, - { - "name": "Stirling-Tools/Stirling-PDF", - "version": "v0.44.3", - "date": "2025-03-20T09:43:56Z" - }, - { - "name": "jenkinsci/jenkins", - "version": "jenkins-2.502", - "date": "2025-03-18T15:02:59Z" - }, { "name": "wazuh/wazuh", "version": "coverity-w11-4.12.0", @@ -269,21 +389,11 @@ "version": "2.2.5", "date": "2025-03-19T09:11:26Z" }, - { - "name": "Checkmk/checkmk", - "version": "v2.3.0p29", - "date": "2025-03-19T07:42:50Z" - }, { "name": "Donkie/Spoolman", "version": "v0.22.1", "date": "2025-03-18T21:01:22Z" }, - { - "name": "zitadel/zitadel", - "version": "v2.66.14", - "date": "2025-03-18T16:05:48Z" - }, { "name": "prometheus/prometheus", "version": "v2.53.4", @@ -294,41 +404,16 @@ "version": "v1.29.3", "date": "2025-03-12T11:56:30Z" }, - { - "name": "element-hq/synapse", - "version": "v1.126.0", - "date": "2025-03-11T16:29:42Z" - }, { "name": "OctoPrint/OctoPrint", "version": "1.10.3", "date": "2024-11-05T09:20:50Z" }, - { - "name": "n8n-io/n8n", - "version": "n8n@1.84.0", - "date": "2025-03-17T13:58:36Z" - }, - { - "name": "zabbix/zabbix", - "version": "7.2.5rc1", - "date": "2025-03-18T14:10:32Z" - }, - { - "name": "crowdsecurity/crowdsec", - "version": "v1.6.6", - "date": "2025-03-18T13:05:01Z" - }, { "name": "apache/couchdb", "version": "3.4.3.post1", "date": "2025-03-18T09:44:59Z" }, - { - "name": "nzbgetcom/nzbget", - "version": "v24.8", - "date": "2025-03-18T07:33:51Z" - }, { "name": "authelia/authelia", "version": "v4.39.1", @@ -344,11 +429,6 @@ "version": "v25.03.3", "date": "2025-03-17T20:55:37Z" }, - { - "name": "semaphoreui/semaphore", - "version": "v2.13.0", - "date": "2025-03-17T19:39:10Z" - }, { "name": "Kareadita/Kavita", "version": "v0.8.5.11", @@ -369,11 +449,6 @@ "version": "v0.92.4", "date": "2025-03-17T16:00:19Z" }, - { - "name": "Graylog2/graylog2-server", - "version": "6.2.0-beta.1", - "date": "2025-03-17T13:00:39Z" - }, { "name": "home-assistant/operating-system", "version": "15.0", @@ -384,11 +459,6 @@ "version": "2.303", "date": "2025-03-17T04:54:50Z" }, - { - "name": "fallenbagel/jellyseerr", - "version": "v2.5.1", - "date": "2025-03-17T03:18:32Z" - }, { "name": "glanceapp/glance", "version": "v0.7.7", @@ -414,11 +484,6 @@ "version": "v3.5.0", "date": "2025-03-16T06:05:55Z" }, - { - "name": "VictoriaMetrics/VictoriaMetrics", - "version": "v1.17.0-victorialogs", - "date": "2025-03-16T00:22:43Z" - }, { "name": "pelican-dev/wings", "version": "v1.0.0-beta10", @@ -484,11 +549,6 @@ "version": "2.31.0", "date": "2025-03-13T17:13:47Z" }, - { - "name": "moghtech/komodo", - "version": "v1.16.12", - "date": "2024-12-02T08:46:29Z" - }, { "name": "diced/zipline", "version": "v4.0.1", @@ -499,21 +559,11 @@ "version": "RELEASE.2025-03-12T18-04-18Z", "date": "2025-03-12T18:45:21Z" }, - { - "name": "cockpit-project/cockpit", - "version": "335", - "date": "2025-03-12T13:03:27Z" - }, { "name": "transmission/transmission", "version": "4.0.1-beta.1", "date": "2024-12-13T00:16:24Z" }, - { - "name": "emqx/emqx", - "version": "e5.9.0-beta.1", - "date": "2025-03-12T09:52:26Z" - }, { "name": "gotson/komga", "version": "1.21.2", @@ -544,21 +594,11 @@ "version": "v0.0.7-hf1", "date": "2025-03-10T20:49:39Z" }, - { - "name": "icereed/paperless-gpt", - "version": "v0.13.0", - "date": "2025-03-10T10:03:12Z" - }, { "name": "AlexxIT/go2rtc", "version": "v1.9.9", "date": "2025-03-10T03:22:11Z" }, - { - "name": "caddyserver/caddy", - "version": "v2.9.1", - "date": "2025-01-08T15:22:53Z" - }, { "name": "awawa-dev/HyperHDR", "version": "v21.0.0.0", @@ -619,11 +659,6 @@ "version": "3.0.0", "date": "2025-03-05T21:41:29Z" }, - { - "name": "immich-app/immich", - "version": "v1.129.0", - "date": "2025-03-05T20:19:18Z" - }, { "name": "snipe/snipe-it", "version": "v8.0.4", @@ -634,11 +669,6 @@ "version": "tc_v0.6.4", "date": "2025-03-05T15:43:40Z" }, - { - "name": "go-gitea/gitea", - "version": "v1.23.5", - "date": "2025-03-05T00:10:15Z" - }, { "name": "apache/tomcat", "version": "10.1.39", @@ -694,11 +724,6 @@ "version": "v1.5.7", "date": "2025-02-27T20:04:08Z" }, - { - "name": "docmost/docmost", - "version": "v0.8.4", - "date": "2025-02-27T16:18:45Z" - }, { "name": "cloudflare/cloudflared", "version": "2025.2.1", @@ -779,16 +804,6 @@ "version": "v0.18.3", "date": "2025-02-21T20:51:12Z" }, - { - "name": "wavelog/wavelog", - "version": "2.0.1", - "date": "2025-02-21T17:55:59Z" - }, - { - "name": "grafana/grafana", - "version": "v11.5.2", - "date": "2025-02-19T00:12:27Z" - }, { "name": "gristlabs/grist-core", "version": "v1.4.2", @@ -914,11 +929,6 @@ "version": "v1.9.6", "date": "2024-12-18T14:35:37Z" }, - { - "name": "requarks/wiki", - "version": "v2.5.306", - "date": "2025-02-02T21:19:29Z" - }, { "name": "PrivateBin/PrivateBin", "version": "1.7.6", @@ -934,11 +944,6 @@ "version": "1.1.14", "date": "2025-01-25T12:48:28Z" }, - { - "name": "hansmi/prometheus-paperless-exporter", - "version": "v0.0.6", - "date": "2025-01-22T22:19:33Z" - }, { "name": "crafty-controller/crafty-4", "version": "v4.4.7", @@ -1084,11 +1089,6 @@ "version": "v2024.10.22-7ca5933", "date": "2024-10-22T09:58:03Z" }, - { - "name": "aceberg/WatchYourLAN", - "version": "2.0.4", - "date": "2024-10-20T18:57:37Z" - }, { "name": "NLnetLabs/unbound", "version": "release-1.22.0", From cb33ea26dfcbff5c41c398b8729be2d0b6efd6ab Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 08:24:10 +0100 Subject: [PATCH 0075/1614] short_test --- ct/alpine-gitea.sh | 3 --- ct/alpine-wireguard.sh | 12 ++++++++++++ misc/build.func | 41 ++++++++--------------------------------- 3 files changed, 20 insertions(+), 36 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index a671f01..36e6e62 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -25,9 +25,6 @@ function update_script() { $STD apk update && apk upgrade msg_ok "Updated Alpine Packages" - echo "DEBUG: CT_TYPE before update_script=${CT_TYPE:-UNDEFINED}" - echo "DEBUG: var_unprivileged=${var_unprivileged:-UNDEFINED}" - msg_info "Updating Gitea" $STD apk upgrade gitea msg_ok "Updated Gitea" diff --git a/ct/alpine-wireguard.sh b/ct/alpine-wireguard.sh index 3c57cd5..bcfeb35 100644 --- a/ct/alpine-wireguard.sh +++ b/ct/alpine-wireguard.sh @@ -19,6 +19,18 @@ variables color catch_errors + +function update_script() { + UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \ + "1" "Check for Alpine Updates" ON \ + 3>&1 1>&2 2>&3) + + header_info + if [ "$UPD" == "1" ]; then + apk update && apk upgrade + exit + fi +} function update_script() { msg_info "Updating Alpine Packages" apk update && apk upgrade diff --git a/misc/build.func b/misc/build.func index f232926..b7fe9b8 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1356,47 +1356,22 @@ check_container_storage() { } start() { - LOGDIR="/usr/local/community-scripts/logs" - mkdir -p "$LOGDIR" - if [ -f /etc/alpine-release ]; then - echo "Running on Alpine Linux – minimal update process." - update_script - return - fi if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear - exit_script + echo -e "⚠ User exited script \n" exit fi + SPINNER_PID="" install_script - else - CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ - "Support/Update functions for ${APP} LXC. Choose an option:" \ - 12 60 3 \ - "1" "YES (Silent Mode)" \ - "2" "YES (Verbose Mode)" \ - "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) + fi - case "$CHOICE" in - 1) - VERB="no" - set_std_mode - log_message "INFO" "Update started (Silent Mode)" - ;; - 2) - VERB="yes" - set_std_mode - log_message "INFO" "Update started (Verbose Mode)" - ;; - 3) + if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "Support/Update functions for ${APP} LXC. Proceed?" 10 58); then clear - log_message "INFO" "Update aborted." - exit_script + echo -e "⚠ User exited script \n" exit - ;; - esac - + fi SPINNER_PID="" update_script fi From f76ce28be9cc1a17d1c42d862fdb07bab2292b65 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 08:26:27 +0100 Subject: [PATCH 0076/1614] revert test --- misc/build.func | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/misc/build.func b/misc/build.func index b7fe9b8..f232926 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1356,22 +1356,47 @@ check_container_storage() { } start() { - if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - SPINNER_PID="" - install_script + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" + if [ -f /etc/alpine-release ]; then + echo "Running on Alpine Linux – minimal update process." + update_script + return fi - - if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "Support/Update functions for ${APP} LXC. Proceed?" 10 58); then + if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear - echo -e "⚠ User exited script \n" + exit_script exit fi + install_script + else + CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ + "Support/Update functions for ${APP} LXC. Choose an option:" \ + 12 60 3 \ + "1" "YES (Silent Mode)" \ + "2" "YES (Verbose Mode)" \ + "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) + + case "$CHOICE" in + 1) + VERB="no" + set_std_mode + log_message "INFO" "Update started (Silent Mode)" + ;; + 2) + VERB="yes" + set_std_mode + log_message "INFO" "Update started (Verbose Mode)" + ;; + 3) + clear + log_message "INFO" "Update aborted." + exit_script + exit + ;; + esac + SPINNER_PID="" update_script fi From cee5d88c5b0c7d3ffc61049a8d5bd113b7d489e3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 08:28:41 +0100 Subject: [PATCH 0077/1614] fix alpine --- misc/alpine-install.func | 2 +- misc/build.func | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 2092193..d869657 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -146,7 +146,7 @@ update_os() { msg_info "Installing core dependencies" $STD apk update - $STD apk add newt curl openssh nano mc + $STD apk add newt curl openssh nano mc ncurses msg_ok "Core dependencies installed" } diff --git a/misc/build.func b/misc/build.func index f232926..6dbc713 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1360,6 +1360,9 @@ start() { mkdir -p "$LOGDIR" if [ -f /etc/alpine-release ]; then echo "Running on Alpine Linux – minimal update process." + SPINNER_PID="" + ENABLE_FUSE="" + update_script return fi From 5bd1100a26d65afa243bb7862bc2adc76f1cdd92 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 08:32:44 +0100 Subject: [PATCH 0078/1614] Update build.func --- misc/build.func | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/misc/build.func b/misc/build.func index 6dbc713..ea5f96a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1358,22 +1358,18 @@ check_container_storage() { start() { LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" - if [ -f /etc/alpine-release ]; then - echo "Running on Alpine Linux – minimal update process." - SPINNER_PID="" - ENABLE_FUSE="" - update_script - return - fi if command -v pveversion >/dev/null 2>&1; then if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear exit_script exit fi + SPINNER_PID="" install_script - else + fi + + if ! command -v pveversion >/dev/null 2>&1; then CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ "Support/Update functions for ${APP} LXC. Choose an option:" \ 12 60 3 \ From b6b09d6cfad4c4476f09ec9c3d1c3ca8b7da9b52 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 08:34:46 +0100 Subject: [PATCH 0079/1614] Update alpine-wireguard.sh --- ct/alpine-wireguard.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/ct/alpine-wireguard.sh b/ct/alpine-wireguard.sh index bcfeb35..3c57cd5 100644 --- a/ct/alpine-wireguard.sh +++ b/ct/alpine-wireguard.sh @@ -19,18 +19,6 @@ variables color catch_errors - -function update_script() { - UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \ - "1" "Check for Alpine Updates" ON \ - 3>&1 1>&2 2>&3) - - header_info - if [ "$UPD" == "1" ]; then - apk update && apk upgrade - exit - fi -} function update_script() { msg_info "Updating Alpine Packages" apk update && apk upgrade From 988d00240fd10662af953b2d20931709818e3cc6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 08:37:55 +0100 Subject: [PATCH 0080/1614] Update build.func --- misc/build.func | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index ea5f96a..0ec6e64 100644 --- a/misc/build.func +++ b/misc/build.func @@ -352,8 +352,6 @@ base_settings() { SSH="no" SSH_AUTHORIZED_KEY="" TAGS="community-script-dev;" - ENABLE_NFS="no" - ENABLE_CIFS="no" ENABLE_FUSE="no" # Override default settings with variables from ct script @@ -363,7 +361,7 @@ base_settings() { RAM_SIZE=${var_ram:-$RAM_SIZE} VERB=${var_verbose:-$VERBOSE} TAGS="${TAGS}${var_tags:-}" - ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} + ENABLE_FUSE="${var_fuse:-${ENABLE_FUSE:-0}}" # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts if [ -z "$var_os" ]; then From efbd092e2faa8fdfccff1fe079edf3567eae3acc Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 08:40:27 +0100 Subject: [PATCH 0081/1614] Update build.func --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 0ec6e64..71792e4 100644 --- a/misc/build.func +++ b/misc/build.func @@ -361,7 +361,7 @@ base_settings() { RAM_SIZE=${var_ram:-$RAM_SIZE} VERB=${var_verbose:-$VERBOSE} TAGS="${TAGS}${var_tags:-}" - ENABLE_FUSE="${var_fuse:-${ENABLE_FUSE:-0}}" + ENABLE_FUSE="${var_fuse:-${ENABLE_FUSE:-no}}" # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts if [ -z "$var_os" ]; then From 1965d6dc255a17486286d3db6ba74c9ee46b9bed Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 08:45:42 +0100 Subject: [PATCH 0082/1614] Update build.func --- misc/build.func | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 71792e4..ced96a9 100644 --- a/misc/build.func +++ b/misc/build.func @@ -12,7 +12,8 @@ variables() { DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. - CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an environment variable for the container type. + CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an global environment variable for the container type. + ENABLE_FUSE="${ENABLE_FUSE:-no}" # Set an global environment variable for enabling FUSE. } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) From 9e5c4d34563f7e6c0697bb82a617a7042a069012 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 09:06:34 +0100 Subject: [PATCH 0083/1614] Update build.func --- misc/build.func | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/misc/build.func b/misc/build.func index ced96a9..805c899 100644 --- a/misc/build.func +++ b/misc/build.func @@ -12,8 +12,8 @@ variables() { DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. - CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an global environment variable for the container type. - ENABLE_FUSE="${ENABLE_FUSE:-no}" # Set an global environment variable for enabling FUSE. + #CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an global environment variable for the container type. + #ENABLE_FUSE="${ENABLE_FUSE:-no}" # Set an global environment variable for enabling FUSE. } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) @@ -61,9 +61,7 @@ color() { ROOTSSH="${TAB}🔑${TAB}${CL}" CREATING="${TAB}🚀${TAB}${CL}" ADVANCED="${TAB}🧩${TAB}${CL}" - CIFS="${TAB}🔌${TAB}${CL}" - FUSE="${TAB}🔧${TAB}${CL}" - NFS="${TAB}📂${TAB}${CL}" + #FUSE="${TAB}🔧${TAB}${CL}" } # This function enables error handling in the script by setting options and defining a trap for the ERR signal. @@ -339,8 +337,8 @@ base_settings() { HN=$NSAPP BRG="vmbr0" NET="dhcp" - IPv6="dhcp" - IPv6GW="" + #IPv6="dhcp" + #IPv6GW="" GATE="" APT_CACHER="" APT_CACHER_IP="" @@ -353,7 +351,7 @@ base_settings() { SSH="no" SSH_AUTHORIZED_KEY="" TAGS="community-script-dev;" - ENABLE_FUSE="no" + #ENABLE_FUSE="no" # Override default settings with variables from ct script CT_TYPE=${var_unprivileged:-$CT_TYPE} @@ -362,7 +360,7 @@ base_settings() { RAM_SIZE=${var_ram:-$RAM_SIZE} VERB=${var_verbose:-$VERBOSE} TAGS="${TAGS}${var_tags:-}" - ENABLE_FUSE="${var_fuse:-${ENABLE_FUSE:-no}}" + #ENABLE_FUSE="${var_fuse:-${ENABLE_FUSE:-no}}" # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts if [ -z "$var_os" ]; then @@ -1410,15 +1408,15 @@ build_container() { FEATURES="nesting=1" fi - if [ "$ENABLE_FUSE" == "yes" ]; then - FEATURES+=",fuse=1" - fi + #if [ "$ENABLE_FUSE" == "yes" ]; then + # FEATURES+=",fuse=1" + #fi if [[ $DIAGNOSTICS == "yes" ]]; then post_to_api fi - FEATURES="${FEATURES#,}" + #FEATURES="${FEATURES#,}" TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then @@ -1442,7 +1440,6 @@ build_container() { export PCT_OSTYPE="$var_os" export PCT_OSVERSION="$var_version" export PCT_DISK_SIZE="$DISK_SIZE" - export IPv6="$IPv6" export PCT_OPTIONS=" -features $FEATURES -hostname $HN @@ -1520,7 +1517,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? } From 1b83a5b449579b280492a71e08fd5474745768cf Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 09:36:04 +0100 Subject: [PATCH 0084/1614] Update alpine-wireguard.sh --- ct/alpine-wireguard.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ct/alpine-wireguard.sh b/ct/alpine-wireguard.sh index 3c57cd5..e079019 100644 --- a/ct/alpine-wireguard.sh +++ b/ct/alpine-wireguard.sh @@ -21,11 +21,12 @@ catch_errors function update_script() { msg_info "Updating Alpine Packages" - apk update && apk upgrade + $STD apk update + $STD apk upgrade msg_ok "Updated Alpine Packages" msg_info "Updating WireGuard" - apk upgrade wireguard-tools + $STD apk upgrade wireguard-tools msg_ok "Updated WireGuard" } From 6ee7b5a9c255ddcfdbd5e02be25106193bd2724a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 09:37:52 +0100 Subject: [PATCH 0085/1614] Update build.func --- misc/build.func | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/misc/build.func b/misc/build.func index 805c899..d052ca3 100644 --- a/misc/build.func +++ b/misc/build.func @@ -16,7 +16,7 @@ variables() { #ENABLE_FUSE="${ENABLE_FUSE:-no}" # Set an global environment variable for enabling FUSE. } -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) +#source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { @@ -72,7 +72,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://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + #source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" @@ -80,7 +80,7 @@ error_handler() { local command="$2" local error_description="$(get_error_description "$exit_code")" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" - post_update_to_api "failed" "$exit_code" "$error_description" + #post_update_to_api "failed" "$exit_code" "$error_description" echo -e "\n$error_message\n" } @@ -1412,9 +1412,9 @@ build_container() { # FEATURES+=",fuse=1" #fi - if [[ $DIAGNOSTICS == "yes" ]]; then - post_to_api - fi + #if [[ $DIAGNOSTICS == "yes" ]]; then + # post_to_api + #fi #FEATURES="${FEATURES#,}" TEMP_DIR=$(mktemp -d) @@ -1564,7 +1564,7 @@ EOF systemctl start ping-instances.service fi - post_update_to_api "done" "none" + #post_update_to_api "done" "none" } set_std_mode() { @@ -1586,10 +1586,10 @@ silent() { exit_script() { exit_code=$? # Capture exit status - post_update_to_api "failed" "$exit_code" + #post_update_to_api "failed" "$exit_code" } -trap 'exit_script' EXIT -trap 'post_update_to_api "failed" "2"' ERR -trap 'post_update_to_api "failed" "130"' SIGINT -trap 'post_update_to_api "failed" "143"' SIGTERM +#trap 'exit_script' EXIT +#trap 'post_update_to_api "failed" "2"' ERR +#trap 'post_update_to_api "failed" "130"' SIGINT +#trap 'post_update_to_api "failed" "143"' SIGTERM From b4c0e2168e4122b0086e3f13f800c1639b075cfd Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 09:39:29 +0100 Subject: [PATCH 0086/1614] Update build.func --- misc/build.func | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/misc/build.func b/misc/build.func index d052ca3..805c899 100644 --- a/misc/build.func +++ b/misc/build.func @@ -16,7 +16,7 @@ variables() { #ENABLE_FUSE="${ENABLE_FUSE:-no}" # Set an global environment variable for enabling FUSE. } -#source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { @@ -72,7 +72,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://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" @@ -80,7 +80,7 @@ error_handler() { local command="$2" local error_description="$(get_error_description "$exit_code")" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" - #post_update_to_api "failed" "$exit_code" "$error_description" + post_update_to_api "failed" "$exit_code" "$error_description" echo -e "\n$error_message\n" } @@ -1412,9 +1412,9 @@ build_container() { # FEATURES+=",fuse=1" #fi - #if [[ $DIAGNOSTICS == "yes" ]]; then - # post_to_api - #fi + if [[ $DIAGNOSTICS == "yes" ]]; then + post_to_api + fi #FEATURES="${FEATURES#,}" TEMP_DIR=$(mktemp -d) @@ -1564,7 +1564,7 @@ EOF systemctl start ping-instances.service fi - #post_update_to_api "done" "none" + post_update_to_api "done" "none" } set_std_mode() { @@ -1586,10 +1586,10 @@ silent() { exit_script() { exit_code=$? # Capture exit status - #post_update_to_api "failed" "$exit_code" + post_update_to_api "failed" "$exit_code" } -#trap 'exit_script' EXIT -#trap 'post_update_to_api "failed" "2"' ERR -#trap 'post_update_to_api "failed" "130"' SIGINT -#trap 'post_update_to_api "failed" "143"' SIGTERM +trap 'exit_script' EXIT +trap 'post_update_to_api "failed" "2"' ERR +trap 'post_update_to_api "failed" "130"' SIGINT +trap 'post_update_to_api "failed" "143"' SIGTERM From 618e31edfcd3b0899066a03f3eebe6d5f6a90f87 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 09:44:18 +0100 Subject: [PATCH 0087/1614] debug output --- ct/alpine-gitea.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 36e6e62..5c5f42e 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -15,10 +15,17 @@ var_version="3.21" var_unprivileged="1" header_info "$APP" +echo "initialize variables" variables +echo "initialized variables" +echo "initialize color" color +echo "initialized color" +echo "initialize catch_errors" catch_errors +echo "initialized catch_errors" +echo "Start update_script" function update_script() { header_info msg_info "Updating Alpine Packages" @@ -33,9 +40,14 @@ function update_script() { $STD rc-service gitea restart msg_ok "Restarted Gitea" } +echo "finish update_script" +echo "initialize start" start +echo "initialized start" +echo "initialize build_container" build_container +echo "initialized build_container" description msg_ok "Completed Successfully!\n" From 09732a8f6b14489d643053ec0496658bfa6ad25d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 09:46:09 +0100 Subject: [PATCH 0088/1614] Update alpine-gitea.sh --- ct/alpine-gitea.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 5c5f42e..051ea6f 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -15,15 +15,17 @@ var_version="3.21" var_unprivileged="1" header_info "$APP" -echo "initialize variables" +msg_info "Initializing variables..." variables -echo "initialized variables" -echo "initialize color" +msg_ok "Initialized variables." + +msg_info "Initializing color settings..." color -echo "initialized color" -echo "initialize catch_errors" +msg_ok "Initialized color settings." + +msg_info "Initializing error handling..." catch_errors -echo "initialized catch_errors" +msg_ok "Initialized error handling." echo "Start update_script" function update_script() { @@ -42,12 +44,13 @@ function update_script() { } echo "finish update_script" -echo "initialize start" +msg_info "Starting script execution..." start -echo "initialized start" -echo "initialize build_container" +msg_ok "Started script execution." + +msg_info "Building container..." build_container -echo "initialized build_container" +msg_ok "Built container." description msg_ok "Completed Successfully!\n" From 3eda765433841a7d3676936d3f29e8f5865b3960 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 09:56:06 +0100 Subject: [PATCH 0089/1614] Update build.func --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 805c899..5ad9647 100644 --- a/misc/build.func +++ b/misc/build.func @@ -12,7 +12,7 @@ variables() { DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. - #CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an global environment variable for the container type. + CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an global environment variable for the container type. #ENABLE_FUSE="${ENABLE_FUSE:-no}" # Set an global environment variable for enabling FUSE. } From 6e6f5dafbc80970fa4a553a72bf1b6872f598d85 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:06:23 +0100 Subject: [PATCH 0090/1614] Update build.func --- misc/build.func | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/misc/build.func b/misc/build.func index 5ad9647..012752a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -16,7 +16,7 @@ variables() { #ENABLE_FUSE="${ENABLE_FUSE:-no}" # Set an global environment variable for enabling FUSE. } -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) +#source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { @@ -72,7 +72,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://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + #source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" @@ -80,7 +80,7 @@ error_handler() { local command="$2" local error_description="$(get_error_description "$exit_code")" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" - post_update_to_api "failed" "$exit_code" "$error_description" + #post_update_to_api "failed" "$exit_code" "$error_description" echo -e "\n$error_message\n" } @@ -1412,9 +1412,9 @@ build_container() { # FEATURES+=",fuse=1" #fi - if [[ $DIAGNOSTICS == "yes" ]]; then - post_to_api - fi + #if [[ $DIAGNOSTICS == "yes" ]]; then + # post_to_api + #fi #FEATURES="${FEATURES#,}" TEMP_DIR=$(mktemp -d) @@ -1564,7 +1564,7 @@ EOF systemctl start ping-instances.service fi - post_update_to_api "done" "none" + #post_update_to_api "done" "none" } set_std_mode() { @@ -1586,10 +1586,10 @@ silent() { exit_script() { exit_code=$? # Capture exit status - post_update_to_api "failed" "$exit_code" + #post_update_to_api "failed" "$exit_code" } -trap 'exit_script' EXIT -trap 'post_update_to_api "failed" "2"' ERR -trap 'post_update_to_api "failed" "130"' SIGINT -trap 'post_update_to_api "failed" "143"' SIGTERM +#trap 'exit_script' EXIT +#trap 'post_update_to_api "failed" "2"' ERR +#trap 'post_update_to_api "failed" "130"' SIGINT +#trap 'post_update_to_api "failed" "143"' SIGTERM From 668d711af2f8de06df0dd7d7463417cf0355f432 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:15:54 +0100 Subject: [PATCH 0091/1614] Update build.func --- misc/build.func | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/misc/build.func b/misc/build.func index 012752a..9c2216c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -65,10 +65,10 @@ color() { } # This function enables error handling in the script by setting options and defining a trap for the ERR signal. -catch_errors() { - set -Eeuo pipefail - trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -} +#catch_errors() { +# set -Eeuo pipefail +# trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +#} # 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() { @@ -76,12 +76,12 @@ error_handler() { if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" - local line_number="$1" - local command="$2" - local error_description="$(get_error_description "$exit_code")" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" + #local line_number="$1" + #local command="$2" + #local error_description="$(get_error_description "$exit_code")" + #local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" #post_update_to_api "failed" "$exit_code" "$error_description" - echo -e "\n$error_message\n" + #echo -e "\n$error_message\n" } # This function displays an informational message with logging support. @@ -1589,7 +1589,8 @@ exit_script() { #post_update_to_api "failed" "$exit_code" } -#trap 'exit_script' EXIT +# +trap 'exit_script' EXIT #trap 'post_update_to_api "failed" "2"' ERR #trap 'post_update_to_api "failed" "130"' SIGINT #trap 'post_update_to_api "failed" "143"' SIGTERM From c0b109c1fe6eda037dc21b899e87688d7c7b7e23 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:20:52 +0100 Subject: [PATCH 0092/1614] Update build.func --- misc/build.func | 79 +++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/misc/build.func b/misc/build.func index 9c2216c..3f0839a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -12,11 +12,10 @@ variables() { DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. - CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an global environment variable for the container type. - #ENABLE_FUSE="${ENABLE_FUSE:-no}" # Set an global environment variable for enabling FUSE. + CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an environment variable for the container type. } -#source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { @@ -61,27 +60,29 @@ color() { ROOTSSH="${TAB}🔑${TAB}${CL}" CREATING="${TAB}🚀${TAB}${CL}" ADVANCED="${TAB}🧩${TAB}${CL}" - #FUSE="${TAB}🔧${TAB}${CL}" + CIFS="${TAB}🔌${TAB}${CL}" + FUSE="${TAB}🔧${TAB}${CL}" + NFS="${TAB}📂${TAB}${CL}" } # This function enables error handling in the script by setting options and defining a trap for the ERR signal. -#catch_errors() { -# set -Eeuo pipefail -# trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -#} +catch_errors() { + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} # 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://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" - #local line_number="$1" - #local command="$2" - #local error_description="$(get_error_description "$exit_code")" - #local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" - #post_update_to_api "failed" "$exit_code" "$error_description" - #echo -e "\n$error_message\n" + local line_number="$1" + local command="$2" + local error_description="$(get_error_description "$exit_code")" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" + post_update_to_api "failed" "$exit_code" "$error_description" + echo -e "\n$error_message\n" } # This function displays an informational message with logging support. @@ -337,8 +338,8 @@ base_settings() { HN=$NSAPP BRG="vmbr0" NET="dhcp" - #IPv6="dhcp" - #IPv6GW="" + IPv6="dhcp" + IPv6GW="" GATE="" APT_CACHER="" APT_CACHER_IP="" @@ -351,7 +352,9 @@ base_settings() { SSH="no" SSH_AUTHORIZED_KEY="" TAGS="community-script-dev;" - #ENABLE_FUSE="no" + ENABLE_NFS="no" + ENABLE_CIFS="no" + ENABLE_FUSE="no" # Override default settings with variables from ct script CT_TYPE=${var_unprivileged:-$CT_TYPE} @@ -360,7 +363,7 @@ base_settings() { RAM_SIZE=${var_ram:-$RAM_SIZE} VERB=${var_verbose:-$VERBOSE} TAGS="${TAGS}${var_tags:-}" - #ENABLE_FUSE="${var_fuse:-${ENABLE_FUSE:-no}}" + ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts if [ -z "$var_os" ]; then @@ -1355,18 +1358,18 @@ check_container_storage() { start() { LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" - + if [ -f /etc/alpine-release ]; then + echo "Running on Alpine Linux – minimal update process." + update_script + fi if command -v pveversion >/dev/null 2>&1; then if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear exit_script exit fi - SPINNER_PID="" install_script - fi - - if ! command -v pveversion >/dev/null 2>&1; then + else CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ "Support/Update functions for ${APP} LXC. Choose an option:" \ 12 60 3 \ @@ -1408,15 +1411,15 @@ build_container() { FEATURES="nesting=1" fi - #if [ "$ENABLE_FUSE" == "yes" ]; then - # FEATURES+=",fuse=1" - #fi + if [ "$ENABLE_FUSE" == "yes" ]; then + FEATURES+=",fuse=1" + fi - #if [[ $DIAGNOSTICS == "yes" ]]; then - # post_to_api - #fi + if [[ $DIAGNOSTICS == "yes" ]]; then + post_to_api + fi - #FEATURES="${FEATURES#,}" + FEATURES="${FEATURES#,}" TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then @@ -1440,6 +1443,7 @@ build_container() { export PCT_OSTYPE="$var_os" export PCT_OSVERSION="$var_version" export PCT_DISK_SIZE="$DISK_SIZE" + export IPv6="$IPv6" export PCT_OPTIONS=" -features $FEATURES -hostname $HN @@ -1517,7 +1521,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? } @@ -1564,7 +1568,7 @@ EOF systemctl start ping-instances.service fi - #post_update_to_api "done" "none" + post_update_to_api "done" "none" } set_std_mode() { @@ -1586,11 +1590,10 @@ silent() { exit_script() { exit_code=$? # Capture exit status - #post_update_to_api "failed" "$exit_code" + post_update_to_api "failed" "$exit_code" } -# trap 'exit_script' EXIT -#trap 'post_update_to_api "failed" "2"' ERR -#trap 'post_update_to_api "failed" "130"' SIGINT -#trap 'post_update_to_api "failed" "143"' SIGTERM +trap 'post_update_to_api "failed" "2"' ERR +trap 'post_update_to_api "failed" "130"' SIGINT +trap 'post_update_to_api "failed" "143"' SIGTERM From 5b98f84f853cecc5b2dcaa8bf66eb0cfaa0782a6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:30:12 +0100 Subject: [PATCH 0093/1614] Update alpine-gitea.sh --- ct/alpine-gitea.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 051ea6f..07f4471 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -31,15 +31,15 @@ echo "Start update_script" function update_script() { header_info msg_info "Updating Alpine Packages" - $STD apk update && apk upgrade + apk update && apk upgrade msg_ok "Updated Alpine Packages" msg_info "Updating Gitea" - $STD apk upgrade gitea + apk upgrade gitea msg_ok "Updated Gitea" msg_info "Restarting Gitea" - $STD rc-service gitea restart + rc-service gitea restart msg_ok "Restarted Gitea" } echo "finish update_script" From a2fbfa339a168049d2d7bc965a8ebff9e0e052d2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:35:58 +0100 Subject: [PATCH 0094/1614] Update build.func --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index 3f0839a..994bf7a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1361,6 +1361,7 @@ start() { if [ -f /etc/alpine-release ]; then echo "Running on Alpine Linux – minimal update process." update_script + exit fi if command -v pveversion >/dev/null 2>&1; then if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then From ab049c355087a4824ac4371bb650ec5a8bddca79 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:53:03 +0100 Subject: [PATCH 0095/1614] Update build.func --- misc/build.func | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/build.func b/misc/build.func index 994bf7a..68db113 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1361,6 +1361,8 @@ start() { if [ -f /etc/alpine-release ]; then echo "Running on Alpine Linux – minimal update process." update_script + clear + exit_script exit fi if command -v pveversion >/dev/null 2>&1; then From 5273d99ac70db7680564f80ddee4d39eb4493afa Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 11:18:27 +0100 Subject: [PATCH 0096/1614] Update alpine-gitea.sh --- ct/alpine-gitea.sh | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 07f4471..09ee57e 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -15,19 +15,10 @@ var_version="3.21" var_unprivileged="1" header_info "$APP" -msg_info "Initializing variables..." variables -msg_ok "Initialized variables." - -msg_info "Initializing color settings..." color -msg_ok "Initialized color settings." - -msg_info "Initializing error handling..." catch_errors -msg_ok "Initialized error handling." -echo "Start update_script" function update_script() { header_info msg_info "Updating Alpine Packages" @@ -42,15 +33,9 @@ function update_script() { rc-service gitea restart msg_ok "Restarted Gitea" } -echo "finish update_script" -msg_info "Starting script execution..." start -msg_ok "Started script execution." - -msg_info "Building container..." build_container -msg_ok "Built container." description msg_ok "Completed Successfully!\n" From b53e70d85eb4164fd269e37e83bb4d27cc3429c4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 11:32:32 +0100 Subject: [PATCH 0097/1614] Update alpine-gitea.sh --- ct/alpine-gitea.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 09ee57e..e7f7dc4 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -22,7 +22,8 @@ catch_errors function update_script() { header_info msg_info "Updating Alpine Packages" - apk update && apk upgrade + apk update + apk upgrade msg_ok "Updated Alpine Packages" msg_info "Updating Gitea" From df21744bdfd5cd45f5bc478da837748311afe1dc Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 11:43:21 +0100 Subject: [PATCH 0098/1614] Update build.func --- misc/build.func | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index 68db113..26eb823 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1356,15 +1356,14 @@ check_container_storage() { } start() { - LOGDIR="/usr/local/community-scripts/logs" - mkdir -p "$LOGDIR" if [ -f /etc/alpine-release ]; then echo "Running on Alpine Linux – minimal update process." update_script - clear exit_script - exit fi + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" + if command -v pveversion >/dev/null 2>&1; then if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear From bbeaa3c553e837a504f5ce5382d7accdf231988a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 12:54:53 +0100 Subject: [PATCH 0099/1614] Update build.func --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index 26eb823..8a4972f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1360,6 +1360,7 @@ start() { echo "Running on Alpine Linux – minimal update process." update_script exit_script + exit 0 fi LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" From 98c105df3a22473b75479b2a355320506515c217 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 13:02:23 +0100 Subject: [PATCH 0100/1614] Update alpine-gitea.sh --- ct/alpine-gitea.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index e7f7dc4..7d3dea1 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -33,6 +33,7 @@ function update_script() { msg_info "Restarting Gitea" rc-service gitea restart msg_ok "Restarted Gitea" + exit_script } start From 194ac6d24987a3f0201d378cb5505e341c2bee38 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Wed, 26 Mar 2025 12:36:50 +0000 Subject: [PATCH 0101/1614] Update versions.json --- frontend/public/json/versions.json | 116 ++++++++++++++--------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 2f60c65..b2c86c2 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,4 +1,54 @@ [ + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-03-26T10:33:41Z" + }, + { + "name": "evcc-io/evcc", + "version": "0.202.0", + "date": "2025-03-26T10:19:01Z" + }, + { + "name": "jupyter/notebook", + "version": "@jupyter-notebook/ui-components@7.4.0-beta.3", + "date": "2025-03-26T10:07:53Z" + }, + { + "name": "forgejo/forgejo", + "version": "v12.0.0-dev", + "date": "2025-03-26T09:58:55Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.2.0p41", + "date": "2025-03-26T09:55:26Z" + }, + { + "name": "sct/overseerr", + "version": "v1.34.0", + "date": "2025-03-26T08:48:34Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1695", + "date": "2025-03-26T06:01:34Z" + }, + { + "name": "pocketbase/pocketbase", + "version": "v0.26.4", + "date": "2025-03-26T05:16:46Z" + }, + { + "name": "theonedev/onedev", + "version": "v11.8.0", + "date": "2025-03-26T04:41:15Z" + }, + { + "name": "cockpit-project/cockpit", + "version": "336.1", + "date": "2025-03-26T04:10:14Z" + }, { "name": "esphome/esphome", "version": "2025.3.2", @@ -20,9 +70,9 @@ "date": "2025-03-25T20:49:15Z" }, { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-03-25T20:30:03Z" + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" }, { "name": "zabbix/zabbix", @@ -64,11 +114,6 @@ "version": "v0.0.7", "date": "2025-03-25T15:11:18Z" }, - { - "name": "Checkmk/checkmk", - "version": "v2.4.0b2", - "date": "2025-03-25T14:27:52Z" - }, { "name": "jenkinsci/jenkins", "version": "jenkins-2.503", @@ -104,6 +149,11 @@ "version": "v0.14.1", "date": "2025-03-25T10:09:14Z" }, + { + "name": "runtipi/runtipi", + "version": "v3.10.0", + "date": "2025-03-15T14:38:16Z" + }, { "name": "VictoriaMetrics/VictoriaMetrics", "version": "pmm-6401-v1.114.0", @@ -114,11 +164,6 @@ "version": "v2.70.6", "date": "2025-03-25T07:11:32Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1691", - "date": "2025-03-25T06:11:16Z" - }, { "name": "caddyserver/caddy", "version": "v2.9.1", @@ -134,11 +179,6 @@ "version": "v3.0.0-0.beta.2", "date": "2025-03-24T21:12:19Z" }, - { - "name": "runtipi/runtipi", - "version": "v3.10.0", - "date": "2025-03-15T14:38:16Z" - }, { "name": "ZoeyVid/NPMplus", "version": "2025-03-24-r2", @@ -154,11 +194,6 @@ "version": "v1.23.6", "date": "2025-03-24T20:38:45Z" }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, { "name": "docmost/docmost", "version": "v0.9.0", @@ -184,21 +219,11 @@ "version": "v2.13.2", "date": "2025-03-24T11:18:10Z" }, - { - "name": "cockpit-project/cockpit", - "version": "336", - "date": "2025-03-24T07:16:02Z" - }, { "name": "nzbgetcom/nzbget", "version": "v24.8", "date": "2025-03-18T07:33:51Z" }, - { - "name": "pocketbase/pocketbase", - "version": "v0.26.3", - "date": "2025-03-24T04:42:52Z" - }, { "name": "firefly-iii/firefly-iii", "version": "v6.2.10", @@ -229,11 +254,6 @@ "version": "v4.3.1", "date": "2025-03-23T09:02:54Z" }, - { - "name": "forgejo/forgejo", - "version": "v10.0.3", - "date": "2025-03-23T08:58:24Z" - }, { "name": "Prowlarr/Prowlarr", "version": "v1.32.2.4987", @@ -244,11 +264,6 @@ "version": "v1.5.1", "date": "2025-01-01T16:15:52Z" }, - { - "name": "theonedev/onedev", - "version": "v11.7.6", - "date": "2025-03-23T05:08:22Z" - }, { "name": "usememos/memos", "version": "v0.24.2", @@ -354,16 +369,6 @@ "version": "coverity-w11-4.12.0", "date": "2025-03-14T20:04:02Z" }, - { - "name": "jupyter/notebook", - "version": "@jupyter-notebook/ui-components@7.4.0-beta.2", - "date": "2025-03-20T07:41:24Z" - }, - { - "name": "evcc-io/evcc", - "version": "0.201.1", - "date": "2025-03-20T06:59:18Z" - }, { "name": "rabbitmq/rabbitmq-server", "version": "v4.0.7", @@ -1193,10 +1198,5 @@ "name": "wger-project/wger", "version": "2.2", "date": "2023-12-06T12:08:09Z" - }, - { - "name": "sct/overseerr", - "version": "preview-test-node-18", - "date": "2023-11-06T10:21:37Z" } ] From 55ae854883db7f5233eed098db260ac949b2f766 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:29:57 +0100 Subject: [PATCH 0102/1614] testing --- ct/alpine-gitea.sh | 3 +-- misc/build.func | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 7d3dea1..131af0e 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/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: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -33,7 +33,6 @@ function update_script() { msg_info "Restarting Gitea" rc-service gitea restart msg_ok "Restarted Gitea" - exit_script } start diff --git a/misc/build.func b/misc/build.func index 8a4972f..1aed582 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1362,6 +1362,7 @@ start() { exit_script exit 0 fi + LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" @@ -1369,7 +1370,7 @@ start() { if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear exit_script - exit + exit 0 fi install_script else @@ -1395,12 +1396,13 @@ start() { clear log_message "INFO" "Update aborted." exit_script - exit + exit 0 ;; esac SPINNER_PID="" update_script + exit 0 fi } From c3caa7b52a399d1526c5c95fae844a21ae1d2279 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:35:22 +0100 Subject: [PATCH 0103/1614] Update build.func --- misc/build.func | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index 1aed582..8a4972f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1362,7 +1362,6 @@ start() { exit_script exit 0 fi - LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" @@ -1370,7 +1369,7 @@ start() { if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear exit_script - exit 0 + exit fi install_script else @@ -1396,13 +1395,12 @@ start() { clear log_message "INFO" "Update aborted." exit_script - exit 0 + exit ;; esac SPINNER_PID="" update_script - exit 0 fi } From 11c9a69af567c4e27aaaf7bc9402fd90e28df449 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:39:38 +0100 Subject: [PATCH 0104/1614] redesign start --- ct/alpine-gitea.sh | 1 + misc/build.func | 31 +++++++++++++++---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 131af0e..235e696 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -33,6 +33,7 @@ function update_script() { msg_info "Restarting Gitea" rc-service gitea restart msg_ok "Restarted Gitea" + exit 0 } start diff --git a/misc/build.func b/misc/build.func index 8a4972f..0829a09 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1356,23 +1356,15 @@ check_container_storage() { } start() { - if [ -f /etc/alpine-release ]; then - echo "Running on Alpine Linux – minimal update process." - update_script - exit_script - exit 0 - fi LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - exit_script - exit - fi install_script - else + exit 0 + fi + + if [ -f /etc/debian_version ]; then CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ "Support/Update functions for ${APP} LXC. Choose an option:" \ 12 60 3 \ @@ -1385,23 +1377,30 @@ start() { VERB="no" set_std_mode log_message "INFO" "Update started (Silent Mode)" + update_script ;; 2) VERB="yes" set_std_mode log_message "INFO" "Update started (Verbose Mode)" + update_script ;; 3) clear log_message "INFO" "Update aborted." exit_script - exit + exit 0 ;; esac - - SPINNER_PID="" - update_script fi + + if [ -f /etc/alpine-release ]; then + echo "Running on Alpine Linux – minimal update process." + update_script + exit 0 + fi + echo "Unsupported OS detected. Exiting." + exit 1 } # This function collects user settings and integrates all the collected information. From 7d424933d53132ac5fa42a12eb1578bf21980c46 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:46:47 +0100 Subject: [PATCH 0105/1614] revert api --- misc/api.func | 170 ++++++++++++++-------------------------------- misc/api.func.bak | 95 +++++++++++++------------- misc/build.func | 29 ++++---- 3 files changed, 115 insertions(+), 179 deletions(-) diff --git a/misc/api.func b/misc/api.func index 2e34e9d..f6a3413 100644 --- a/misc/api.func +++ b/misc/api.func @@ -1,78 +1,26 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: michelroegl-brunner -# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/LICENSE - -get_error_description() { - local exit_code="$1" - case "$exit_code" in - 0) echo " " ;; - 1) echo "General error: An unspecified error occurred." ;; - 2) echo "Incorrect shell usage or invalid command arguments." ;; - 3) echo "Unexecuted function or invalid shell condition." ;; - 4) echo "Error opening a file or invalid path." ;; - 5) echo "I/O error: An input/output failure occurred." ;; - 6) echo "No such device or address." ;; - 7) echo "Insufficient memory or resource exhaustion." ;; - 8) echo "Non-executable file or invalid file format." ;; - 9) echo "Failed child process execution." ;; - 18) echo "Connection to a remote server failed." ;; - 22) echo "Invalid argument or faulty network connection." ;; - 28) echo "No space left on device." ;; - 35) echo "Timeout while establishing a connection." ;; - 56) echo "Faulty TLS connection." ;; - 60) echo "SSL certificate error." ;; - 100) echo "LXC install error: Unexpected error in create_lxc.sh." ;; - 101) echo "LXC install error: No network connection detected." ;; - 200) echo "LXC creation failed." ;; - 201) echo "LXC error: Invalid Storage class." ;; - 202) echo "User aborted menu in create_lxc.sh." ;; - 203) echo "CTID not set in create_lxc.sh." ;; - 204) echo "PCT_OSTYPE not set in create_lxc.sh." ;; - 205) echo "CTID cannot be less than 100 in create_lxc.sh." ;; - 206) echo "CTID already in use in create_lxc.sh." ;; - 207) echo "Template not found in create_lxc.sh." ;; - 208) echo "Error downloading template in create_lxc.sh." ;; - 209) echo "Container creation failed, but template is intact in create_lxc.sh." ;; - 125) echo "Docker error: Container could not start." ;; - 126) echo "Command not executable: Incorrect permissions or missing dependencies." ;; - 127) echo "Command not found: Incorrect path or missing dependency." ;; - 128) echo "Invalid exit signal, e.g., incorrect Git command." ;; - 129) echo "Signal 1 (SIGHUP): Process terminated due to hangup." ;; - 130) echo "Signal 2 (SIGINT): Manual termination via Ctrl+C." ;; - 132) echo "Signal 4 (SIGILL): Illegal machine instruction." ;; - 133) echo "Signal 5 (SIGTRAP): Debugging error or invalid breakpoint signal." ;; - 134) echo "Signal 6 (SIGABRT): Program aborted itself." ;; - 135) echo "Signal 7 (SIGBUS): Memory error, invalid memory address." ;; - 137) echo "Signal 9 (SIGKILL): Process forcibly terminated (OOM-killer or 'kill -9')." ;; - 139) echo "Signal 11 (SIGSEGV): Segmentation fault, possibly due to invalid pointer access." ;; - 141) echo "Signal 13 (SIGPIPE): Pipe closed unexpectedly." ;; - 143) echo "Signal 15 (SIGTERM): Process terminated normally." ;; - 152) echo "Signal 24 (SIGXCPU): CPU time limit exceeded." ;; - 255) echo "Unknown critical error, often due to missing permissions or broken scripts." ;; - *) echo "Unknown error code ($exit_code)." ;; - esac -} +# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE post_to_api() { - if ! command -v curl &>/dev/null; then - return - fi + if ! command -v curl &> /dev/null; then + return + fi - if [ "$DIAGNOSTICS" = "no" ]; then - return - fi + if [ "$DIAGNOSTICS" = "no" ]; then + return + fi - if [ -z "$RANDOM_UUID" ]; then - return - fi + if [ -z "$RANDOM_UUID" ]; then + return + fi - local API_URL="http://api.community-scripts.org/dev/upload" - local pve_version="not found" - pve_version=$(pveversion | awk -F'[/ ]' '{print $2}') + local API_URL="http://api.community-scripts.org/dev/upload" + local pve_version="not found" + pve_version=$(pveversion | awk -F'[/ ]' '{print $2}') - JSON_PAYLOAD=$( - cat </dev/null; then - return + if ! command -v curl &> /dev/null; then + return fi if [ "$POST_UPDATE_DONE" = true ]; then return 0 fi - exit_code=${2:-1} local API_URL="http://api.community-scripts.org/dev/upload/updatestatus" local status="${1:-failed}" - if [[ "$status" == "failed" ]]; then - local exit_code="${2:-1}" - elif [[ "$status" == "success" ]]; then - local exit_code="${2:-0}" - fi + local error="${2:-No error message}" - if [[ -z "$exit_code" ]]; then - exit_code=1 - fi - - error=$(get_error_description "$exit_code") - - if [ -z "$error" ]; then - error="Unknown error" - fi - - JSON_PAYLOAD=$( - cat </dev/null; then - return - fi - - if [ "$DIAGNOSTICS" = "no" ]; then - return - fi - - if [ -z "$RANDOM_UUID" ]; then - return - fi - - local API_URL="http://api.community-scripts.org/dev/upload" - local pve_version="not found" - pve_version=$(pveversion | awk -F'[/ ]' '{print $2}') - - JSON_PAYLOAD=$( - cat </dev/null; then + return + fi + + if [ "$DIAGNOSTICS" = "no" ]; then + return + fi + + if [ -z "$RANDOM_UUID" ]; then + return + fi + + local API_URL="http://api.community-scripts.org/dev/upload" + local pve_version="not found" + pve_version=$(pveversion | awk -F'[/ ]' '{print $2}') + + JSON_PAYLOAD=$( + cat </dev/null; then return fi @@ -154,7 +153,8 @@ post_update_to_api() { if [ "$POST_UPDATE_DONE" = true ]; then return 0 fi - + exit_code=${2:-1} + local API_URL="http://api.community-scripts.org/dev/upload/updatestatus" local status="${1:-failed}" if [[ "$status" == "failed" ]]; then local exit_code="${2:-1}" @@ -162,7 +162,10 @@ post_update_to_api() { local exit_code="${2:-0}" fi - local API_URL="http://api.community-scripts.org/dev/upload/updatestatus" + if [[ -z "$exit_code" ]]; then + exit_code=1 + fi + error=$(get_error_description "$exit_code") if [ -z "$error" ]; then diff --git a/misc/build.func b/misc/build.func index 0829a09..f232926 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1358,13 +1358,19 @@ check_container_storage() { start() { LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" - - if command -v pveversion >/dev/null 2>&1; then - install_script - exit 0 + if [ -f /etc/alpine-release ]; then + echo "Running on Alpine Linux – minimal update process." + update_script + return fi - - if [ -f /etc/debian_version ]; then + if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + exit_script + exit + fi + install_script + else CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ "Support/Update functions for ${APP} LXC. Choose an option:" \ 12 60 3 \ @@ -1377,30 +1383,23 @@ start() { VERB="no" set_std_mode log_message "INFO" "Update started (Silent Mode)" - update_script ;; 2) VERB="yes" set_std_mode log_message "INFO" "Update started (Verbose Mode)" - update_script ;; 3) clear log_message "INFO" "Update aborted." exit_script - exit 0 + exit ;; esac - fi - if [ -f /etc/alpine-release ]; then - echo "Running on Alpine Linux – minimal update process." + SPINNER_PID="" update_script - exit 0 fi - echo "Unsupported OS detected. Exiting." - exit 1 } # This function collects user settings and integrates all the collected information. From 5d3209a50ff80601622c862006a207e1612a7ff8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:52:52 +0100 Subject: [PATCH 0106/1614] Update api.func --- misc/api.func | 170 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 118 insertions(+), 52 deletions(-) diff --git a/misc/api.func b/misc/api.func index f6a3413..2e34e9d 100644 --- a/misc/api.func +++ b/misc/api.func @@ -1,26 +1,78 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: michelroegl-brunner -# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE +# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/LICENSE + +get_error_description() { + local exit_code="$1" + case "$exit_code" in + 0) echo " " ;; + 1) echo "General error: An unspecified error occurred." ;; + 2) echo "Incorrect shell usage or invalid command arguments." ;; + 3) echo "Unexecuted function or invalid shell condition." ;; + 4) echo "Error opening a file or invalid path." ;; + 5) echo "I/O error: An input/output failure occurred." ;; + 6) echo "No such device or address." ;; + 7) echo "Insufficient memory or resource exhaustion." ;; + 8) echo "Non-executable file or invalid file format." ;; + 9) echo "Failed child process execution." ;; + 18) echo "Connection to a remote server failed." ;; + 22) echo "Invalid argument or faulty network connection." ;; + 28) echo "No space left on device." ;; + 35) echo "Timeout while establishing a connection." ;; + 56) echo "Faulty TLS connection." ;; + 60) echo "SSL certificate error." ;; + 100) echo "LXC install error: Unexpected error in create_lxc.sh." ;; + 101) echo "LXC install error: No network connection detected." ;; + 200) echo "LXC creation failed." ;; + 201) echo "LXC error: Invalid Storage class." ;; + 202) echo "User aborted menu in create_lxc.sh." ;; + 203) echo "CTID not set in create_lxc.sh." ;; + 204) echo "PCT_OSTYPE not set in create_lxc.sh." ;; + 205) echo "CTID cannot be less than 100 in create_lxc.sh." ;; + 206) echo "CTID already in use in create_lxc.sh." ;; + 207) echo "Template not found in create_lxc.sh." ;; + 208) echo "Error downloading template in create_lxc.sh." ;; + 209) echo "Container creation failed, but template is intact in create_lxc.sh." ;; + 125) echo "Docker error: Container could not start." ;; + 126) echo "Command not executable: Incorrect permissions or missing dependencies." ;; + 127) echo "Command not found: Incorrect path or missing dependency." ;; + 128) echo "Invalid exit signal, e.g., incorrect Git command." ;; + 129) echo "Signal 1 (SIGHUP): Process terminated due to hangup." ;; + 130) echo "Signal 2 (SIGINT): Manual termination via Ctrl+C." ;; + 132) echo "Signal 4 (SIGILL): Illegal machine instruction." ;; + 133) echo "Signal 5 (SIGTRAP): Debugging error or invalid breakpoint signal." ;; + 134) echo "Signal 6 (SIGABRT): Program aborted itself." ;; + 135) echo "Signal 7 (SIGBUS): Memory error, invalid memory address." ;; + 137) echo "Signal 9 (SIGKILL): Process forcibly terminated (OOM-killer or 'kill -9')." ;; + 139) echo "Signal 11 (SIGSEGV): Segmentation fault, possibly due to invalid pointer access." ;; + 141) echo "Signal 13 (SIGPIPE): Pipe closed unexpectedly." ;; + 143) echo "Signal 15 (SIGTERM): Process terminated normally." ;; + 152) echo "Signal 24 (SIGXCPU): CPU time limit exceeded." ;; + 255) echo "Unknown critical error, often due to missing permissions or broken scripts." ;; + *) echo "Unknown error code ($exit_code)." ;; + esac +} post_to_api() { - if ! command -v curl &> /dev/null; then - return - fi + if ! command -v curl &>/dev/null; then + return + fi - if [ "$DIAGNOSTICS" = "no" ]; then - return - fi + if [ "$DIAGNOSTICS" = "no" ]; then + return + fi - if [ -z "$RANDOM_UUID" ]; then - return - fi + if [ -z "$RANDOM_UUID" ]; then + return + fi - local API_URL="http://api.community-scripts.org/dev/upload" - local pve_version="not found" - pve_version=$(pveversion | awk -F'[/ ]' '{print $2}') + local API_URL="http://api.community-scripts.org/dev/upload" + local pve_version="not found" + pve_version=$(pveversion | awk -F'[/ ]' '{print $2}') - JSON_PAYLOAD=$(cat < /dev/null; then - return + if ! command -v curl &>/dev/null; then + return fi if [ "$POST_UPDATE_DONE" = true ]; then return 0 fi + exit_code=${2:-1} local API_URL="http://api.community-scripts.org/dev/upload/updatestatus" local status="${1:-failed}" - local error="${2:-No error message}" + if [[ "$status" == "failed" ]]; then + local exit_code="${2:-1}" + elif [[ "$status" == "success" ]]; then + local exit_code="${2:-0}" + fi - JSON_PAYLOAD=$(cat < Date: Wed, 26 Mar 2025 14:59:44 +0100 Subject: [PATCH 0107/1614] harmonize with live --- misc/build.func | 88 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 59 insertions(+), 29 deletions(-) diff --git a/misc/build.func b/misc/build.func index f232926..393fedf 100644 --- a/misc/build.func +++ b/misc/build.func @@ -12,7 +12,6 @@ variables() { DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. - CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an environment variable for the container type. } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) @@ -60,9 +59,7 @@ color() { ROOTSSH="${TAB}🔑${TAB}${CL}" CREATING="${TAB}🚀${TAB}${CL}" ADVANCED="${TAB}🧩${TAB}${CL}" - CIFS="${TAB}🔌${TAB}${CL}" FUSE="${TAB}🔧${TAB}${CL}" - NFS="${TAB}📂${TAB}${CL}" } # This function enables error handling in the script by setting options and defining a trap for the ERR signal. @@ -79,9 +76,12 @@ error_handler() { local exit_code="$?" local line_number="$1" local command="$2" - local error_description="$(get_error_description "$exit_code")" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" - post_update_to_api "failed" "$exit_code" "$error_description" + ## 26.03.2025 alpine bug + #local error_description="$(get_error_description "$exit_code")" + #local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" + #post_update_to_api "failed" "$exit_code" "$error_description" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + post_update_to_api "failed" "${command}" echo -e "\n$error_message\n" } @@ -338,8 +338,9 @@ base_settings() { HN=$NSAPP BRG="vmbr0" NET="dhcp" - IPv6="dhcp" - IPv6GW="" + # 26.03.2025 disabled + #IPv6="dhcp" + #IPv6GW="" GATE="" APT_CACHER="" APT_CACHER_IP="" @@ -352,9 +353,8 @@ base_settings() { SSH="no" SSH_AUTHORIZED_KEY="" TAGS="community-script-dev;" - ENABLE_NFS="no" - ENABLE_CIFS="no" - ENABLE_FUSE="no" + # 26.03.2025 disabled + # ENABLE_FUSE="no" # Override default settings with variables from ct script CT_TYPE=${var_unprivileged:-$CT_TYPE} @@ -363,7 +363,8 @@ base_settings() { RAM_SIZE=${var_ram:-$RAM_SIZE} VERB=${var_verbose:-$VERBOSE} TAGS="${TAGS}${var_tags:-}" - ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} + # 26.03.2025 disabled + #ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts if [ -z "$var_os" ]; then @@ -1358,20 +1359,19 @@ check_container_storage() { start() { LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" - if [ -f /etc/alpine-release ]; then - echo "Running on Alpine Linux – minimal update process." - update_script - return - fi + if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear exit_script exit fi + SPINNER_PID="" install_script - else - CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ + fi + + if ! command -v pveversion >/dev/null 2>&1; then + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ "Support/Update functions for ${APP} LXC. Choose an option:" \ 12 60 3 \ "1" "YES (Silent Mode)" \ @@ -1411,10 +1411,10 @@ build_container() { else FEATURES="nesting=1" fi - - if [ "$ENABLE_FUSE" == "yes" ]; then - FEATURES+=",fuse=1" - fi + # 26.03.2025 disabled + #if [ "$ENABLE_FUSE" == "yes" ]; then + # FEATURES+=",fuse=1" + #fi if [[ $DIAGNOSTICS == "yes" ]]; then post_to_api @@ -1589,12 +1589,42 @@ silent() { fi } +# 26.03.2025 disabled +#exit_script() { +# exit_code=$? # Capture exit status +# post_update_to_api "failed" "$exit_code" +#} + +#trap 'exit_script' EXIT +#trap 'post_update_to_api "failed" "2"' ERR +#trap 'post_update_to_api "failed" "130"' SIGINT +#trap 'post_update_to_api "failed" "143"' SIGTERM + exit_script() { - exit_code=$? # Capture exit status - post_update_to_api "failed" "$exit_code" + exit_code=$? # Capture the exit status of the last executed command + #200 exit codes indicate error in create_lxc.sh + #100 exit codes indicate error in install.func + + if [ $exit_code -ne 0 ]; then + case $exit_code in + 100) post_update_to_api "failed" "100: Unexpected error in create_lxc.sh" ;; + 101) post_update_to_api "failed" "101: No network connection detected in create_lxc.sh" ;; + 200) post_update_to_api "failed" "200: LXC creation failed in create_lxc.sh" ;; + 201) post_update_to_api "failed" "201: Invalid Storage class in create_lxc.sh" ;; + 202) post_update_to_api "failed" "202: User aborted menu in create_lxc.sh" ;; + 203) post_update_to_api "failed" "203: CTID not set in create_lxc.sh" ;; + 204) post_update_to_api "failed" "204: PCT_OSTYPE not set in create_lxc.sh" ;; + 205) post_update_to_api "failed" "205: CTID cannot be less than 100 in create_lxc.sh" ;; + 206) post_update_to_api "failed" "206: CTID already in use in create_lxc.sh" ;; + 207) post_update_to_api "failed" "207: Template not found in create_lxc.sh" ;; + 208) post_update_to_api "failed" "208: Error downloading template in create_lxc.sh" ;; + 209) post_update_to_api "failed" "209: Container creation failed, but template is intact in create_lxc.sh" ;; + *) post_update_to_api "failed" "Unknown error, exit code: $exit_code in create_lxc.sh" ;; + esac + fi } trap 'exit_script' EXIT -trap 'post_update_to_api "failed" "2"' ERR -trap 'post_update_to_api "failed" "130"' SIGINT -trap 'post_update_to_api "failed" "143"' SIGTERM +trap 'post_update_to_api "failed" "$BASH_COMMAND"' ERR +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM From 58de772fdfed615d40871802fdcd537a804dc925 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 15:14:10 +0100 Subject: [PATCH 0108/1614] Update build.func --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 393fedf..6746197 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1444,7 +1444,7 @@ build_container() { export PCT_OSTYPE="$var_os" export PCT_OSVERSION="$var_version" export PCT_DISK_SIZE="$DISK_SIZE" - export IPv6="$IPv6" + #export IPv6="$IPv6" export PCT_OPTIONS=" -features $FEATURES -hostname $HN From 7119077370b69cf7508c265040f11d73c701b50c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 15:18:43 +0100 Subject: [PATCH 0109/1614] formatting and remove core_deps --- install/openziti-tunnel-install.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh index 9549f61..97d85e9 100644 --- a/install/openziti-tunnel-install.sh +++ b/install/openziti-tunnel-install.sh @@ -5,14 +5,13 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/openziti/ziti -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors setting_up_container network_check update_os -install_core_deps msg_info "Installing Dependencies" $STD apt-get install -y gpg @@ -21,8 +20,8 @@ msg_ok "Installed Dependencies" msg_info "Installing openziti" mkdir -p --mode=0755 /usr/share/keyrings curl -sSLf https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg -echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable jammy main" > /etc/apt/sources.list.d/openziti.list -$STD apt-get update +echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable jammy main" >/etc/apt/sources.list.d/openziti.list +$STD apt-get update $STD apt-get install -y ziti-edge-tunnel sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openziti/bin/ziti-edge-tunnel run-host --verbose=${ZITI_VERBOSE} --identity-dir=${ZITI_IDENTITY_DIR}| } }' /usr/lib/systemd/system/ziti-edge-tunnel.service systemctl daemon-reload @@ -30,14 +29,14 @@ msg_ok "Installed openziti" read -r -p "Please paste an identity enrollment token(JTW)" prompt if [[ ${prompt} ]]; then - msg_info "Adding identity" - echo "${prompt}" > /opt/openziti/etc/identities/identity.jwt - chown ziti:ziti /opt/openziti/etc/identities/identity.jwt - systemctl enable -q --now ziti-edge-tunnel - msg_ok "Service Started" + msg_info "Adding identity" + echo "${prompt}" >/opt/openziti/etc/identities/identity.jwt + chown ziti:ziti /opt/openziti/etc/identities/identity.jwt + systemctl enable -q --now ziti-edge-tunnel + msg_ok "Service Started" else - systemctl enable -q ziti-edge-tunnel - msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service" + systemctl enable -q ziti-edge-tunnel + msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service" fi motd_ssh From 6d3a08eaf8c1e2507da26f77c5ac62c3f741536f Mon Sep 17 00:00:00 2001 From: vhsdream Date: Wed, 26 Mar 2025 10:25:40 -0400 Subject: [PATCH 0110/1614] Reactive-Resume: Use light icon in json --- frontend/public/json/reactive-resume.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/reactive-resume.json b/frontend/public/json/reactive-resume.json index 49307bd..6bd3f8d 100644 --- a/frontend/public/json/reactive-resume.json +++ b/frontend/public/json/reactive-resume.json @@ -11,7 +11,7 @@ "interface_port": 3000, "documentation": "https://docs.rxresu.me/", "website": "https://rxresu.me", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/reactive-resume.png", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/reactive-resume-light.png", "description": "A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever.", "install_methods": [ { From bfecf04ffd22a9f4674a26e9ddd3baa674b514f8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 16:29:25 +0100 Subject: [PATCH 0111/1614] Update alpine-gitea.sh --- ct/alpine-gitea.sh | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 235e696..8006a67 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -20,20 +20,34 @@ color catch_errors function update_script() { - header_info - msg_info "Updating Alpine Packages" - apk update - apk upgrade - msg_ok "Updated Alpine Packages" - - msg_info "Updating Gitea" - apk upgrade gitea - msg_ok "Updated Gitea" - - msg_info "Restarting Gitea" - rc-service gitea restart - msg_ok "Restarted Gitea" - exit 0 + if ! apk -e info newt >/dev/null 2>&1; then + apk add -q newt + fi + while true; do + CHOICE=$( + whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 2 \ + "1" "Update Alpine" \ + "2" "Update Gitea" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + apk update && apk upgrade + exit + ;; + 2) + apk update && apk upgrade + apk upgrade gitea + rc-service gitea restart + exit + ;; + esac + done } start From 0c7678bc798e82d442fca2ed93142e1e040f0b8a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 16:31:58 +0100 Subject: [PATCH 0112/1614] Update alpine-gitea.sh --- ct/alpine-gitea.sh | 48 ++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 8006a67..b52185a 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/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 @@ -20,34 +20,24 @@ color catch_errors function update_script() { - if ! apk -e info newt >/dev/null 2>&1; then - apk add -q newt - fi - while true; do - CHOICE=$( - whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 2 \ - "1" "Update Alpine" \ - "2" "Update Gitea" 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - clear - exit-script - fi - header_info - case $CHOICE in - 1) - apk update && apk upgrade - exit - ;; - 2) - apk update && apk upgrade - apk upgrade gitea - rc-service gitea restart - exit - ;; - esac - done + header_info + check_container_storage + check_container_resources + + msg_info "Updating Alpine Packages" + apk update + apk upgrade + msg_ok "Updated Alpine Packages" + + msg_info "Updating Gitea" + apk upgrade gitea + msg_ok "Updated Gitea" + + msg_info "Restarting Gitea" + rc-service gitea restart + msg_ok "Restarted Gitea" + + exit 0 } start From c304b7839ad343b1c7b6f823e657cf91032caa7e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 16:39:14 +0100 Subject: [PATCH 0113/1614] Update alpine-gitea.sh --- ct/alpine-gitea.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index b52185a..3cadb49 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -21,8 +21,6 @@ catch_errors function update_script() { header_info - check_container_storage - check_container_resources msg_info "Updating Alpine Packages" apk update From 3969d126bfd50e3ca551f643c3a64b6d65973784 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 16:47:18 +0100 Subject: [PATCH 0114/1614] try fix msg for alpine --- misc/build.func | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/build.func b/misc/build.func index 6746197..eddc105 100644 --- a/misc/build.func +++ b/misc/build.func @@ -117,6 +117,10 @@ msg_info() { msg_ok() { if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then kill "$SPINNER_PID" >/dev/null 2>&1 + sleep 0.1 + if ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill -9 "$SPINNER_PID" >/dev/null 2>&1 + fi wait "$SPINNER_PID" 2>/dev/null || true fi @@ -131,6 +135,10 @@ msg_ok() { msg_error() { if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then kill "$SPINNER_PID" >/dev/null 2>&1 + sleep 0.1 + if ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill -9 "$SPINNER_PID" >/dev/null 2>&1 + fi wait "$SPINNER_PID" 2>/dev/null || true fi From 6f65995191b559db662c8ab7a2bb2f36d6d27945 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 16:54:24 +0100 Subject: [PATCH 0115/1614] Update build.func --- misc/build.func | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index eddc105..e33078b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -94,7 +94,7 @@ start_spinner() { local term_width=$(tput cols) { - while [ "${SPINNER_ACTIVE:-1}" -eq 1 ]; do + while true; do printf "\r\e[2K${frames[spin_i]} ${YW}%b${CL}" "$msg" >&2 spin_i=$(((spin_i + 1) % ${#frames[@]})) sleep "$interval" @@ -102,12 +102,15 @@ start_spinner() { } & SPINNER_PID=$! + disown "$SPINNER_PID" } msg_info() { local msg="$1" - if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then - return + if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill "$SPINNER_PID" >/dev/null 2>&1 + sleep 0.1 + wait "$SPINNER_PID" 2>/dev/null || true fi SPINNER_ACTIVE=1 @@ -128,7 +131,6 @@ msg_ok() { printf "\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 unset SPINNER_PID SPINNER_ACTIVE=0 - log_message "OK" "$msg" } From 41d3f8efbb683dbb92879e54146ed26eb559d679 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 17:59:45 +0100 Subject: [PATCH 0116/1614] Update build.func --- misc/build.func | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/misc/build.func b/misc/build.func index e33078b..c37752a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -91,10 +91,10 @@ start_spinner() { local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') local spin_i=0 local interval=0.1 - local term_width=$(tput cols) { while true; do + if [ "${SPINNER_ACTIVE:-0}" -eq 0 ]; then exit; fi printf "\r\e[2K${frames[spin_i]} ${YW}%b${CL}" "$msg" >&2 spin_i=$(((spin_i + 1) % ${#frames[@]})) sleep "$interval" @@ -105,49 +105,37 @@ start_spinner() { disown "$SPINNER_PID" } -msg_info() { - local msg="$1" +stop_spinner() { if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then kill "$SPINNER_PID" >/dev/null 2>&1 sleep 0.1 + if ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill -9 "$SPINNER_PID" >/dev/null 2>&1 + fi wait "$SPINNER_PID" 2>/dev/null || true fi + SPINNER_ACTIVE=0 + unset SPINNER_PID +} +msg_info() { + local msg="$1" + stop_spinner SPINNER_ACTIVE=1 start_spinner "$msg" } msg_ok() { - if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill "$SPINNER_PID" >/dev/null 2>&1 - sleep 0.1 - if ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill -9 "$SPINNER_PID" >/dev/null 2>&1 - fi - wait "$SPINNER_PID" 2>/dev/null || true - fi - + stop_spinner local msg="$1" printf "\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 - unset SPINNER_PID - SPINNER_ACTIVE=0 log_message "OK" "$msg" } msg_error() { - if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill "$SPINNER_PID" >/dev/null 2>&1 - sleep 0.1 - if ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill -9 "$SPINNER_PID" >/dev/null 2>&1 - fi - wait "$SPINNER_PID" 2>/dev/null || true - fi - + stop_spinner local msg="$1" printf "\r\e[2K${CROSS}${RD}%b${CL}\n" "$msg" >&2 - unset SPINNER_PID - SPINNER_ACTIVE=0 log_message "ERROR" "$msg" } From be7f706cf5bd60b6bdb1f9ce45d123f99a67204e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 18:06:37 +0100 Subject: [PATCH 0117/1614] Update build.func --- misc/build.func | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/misc/build.func b/misc/build.func index c37752a..9a4431f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -93,8 +93,7 @@ start_spinner() { local interval=0.1 { - while true; do - if [ "${SPINNER_ACTIVE:-0}" -eq 0 ]; then exit; fi + while [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; do printf "\r\e[2K${frames[spin_i]} ${YW}%b${CL}" "$msg" >&2 spin_i=$(((spin_i + 1) % ${#frames[@]})) sleep "$interval" @@ -106,16 +105,18 @@ start_spinner() { } stop_spinner() { - if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill "$SPINNER_PID" >/dev/null 2>&1 - sleep 0.1 + if [ -n "${SPINNER_PID:-}" ]; then if ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill -9 "$SPINNER_PID" >/dev/null 2>&1 + kill "$SPINNER_PID" >/dev/null 2>&1 + sleep 0.1 + if ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill -9 "$SPINNER_PID" >/dev/null 2>&1 + fi fi wait "$SPINNER_PID" 2>/dev/null || true + unset SPINNER_PID fi SPINNER_ACTIVE=0 - unset SPINNER_PID } msg_info() { From 0492f76d0d869f716d197f68e74b8b7d4d9bed34 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Wed, 26 Mar 2025 13:59:19 -0400 Subject: [PATCH 0118/1614] changed error message to say restart container --- install/openziti-controller-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh index 17b4e60..2e00c21 100644 --- a/install/openziti-controller-install.sh +++ b/install/openziti-controller-install.sh @@ -34,7 +34,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then systemctl enable -q --now ziti-controller else systemctl enable -q ziti-controller - msg_err "Configration not provided; Please run /opt/openziti/etc/controller/bootstrap.bash to configure the controller and restart the service" + msg_err "Configration not provided; Please run /opt/openziti/etc/controller/bootstrap.bash to configure the controller and restart the container" fi motd_ssh From 6a89a111f55e3edb9867ce8b27e791d3ec59e0f8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 19:01:06 +0100 Subject: [PATCH 0119/1614] Update build.func --- misc/build.func | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index 9a4431f..f7e8de8 100644 --- a/misc/build.func +++ b/misc/build.func @@ -119,18 +119,35 @@ stop_spinner() { SPINNER_ACTIVE=0 } +declare -A MSG_INFO_SHOWN + msg_info() { local msg="$1" - stop_spinner + if [[ -n "${MSG_INFO_SHOWN["$msg"]}" ]]; then + return + fi + MSG_INFO_SHOWN["$msg"]=1 + + if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then + return + fi + SPINNER_ACTIVE=1 start_spinner "$msg" } msg_ok() { - stop_spinner local msg="$1" - printf "\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 - log_message "OK" "$msg" + if [ -n "${SPINNER_PID:-}" ]; then + while ps -p "$SPINNER_PID" >/dev/null 2>&1; do + kill "$SPINNER_PID" >/dev/null 2>&1 || break + wait "$SPINNER_PID" 2>/dev/null || true + done + fi + printf "\e[?25h\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 + + unset SPINNER_PID + SPINNER_ACTIVE=0 } msg_error() { From e5cf04ab1649360a2fe6c99855872847761ee97e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 19:06:48 +0100 Subject: [PATCH 0120/1614] Update build.func --- misc/build.func | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index f7e8de8..c31d02a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -119,10 +119,11 @@ stop_spinner() { SPINNER_ACTIVE=0 } -declare -A MSG_INFO_SHOWN - msg_info() { local msg="$1" + if ! declare -p MSG_INFO_SHOWN &>/dev/null; then + declare -gA MSG_INFO_SHOWN + fi if [[ -n "${MSG_INFO_SHOWN["$msg"]}" ]]; then return fi From 357e05d43c6e897defe6fb820ef54a60e495c601 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 19:12:56 +0100 Subject: [PATCH 0121/1614] Update build.func --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index c31d02a..d39d72a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -12,6 +12,7 @@ variables() { DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. + declare -A MSG_INFO_SHOWN } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) From 6dbfa24bdaf5d60d81009b41030829a024dbbc47 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Mar 2025 19:15:33 +0100 Subject: [PATCH 0122/1614] Update build.func --- misc/build.func | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/misc/build.func b/misc/build.func index d39d72a..8cf4a61 100644 --- a/misc/build.func +++ b/misc/build.func @@ -12,7 +12,6 @@ variables() { DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. - declare -A MSG_INFO_SHOWN } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) @@ -120,15 +119,14 @@ stop_spinner() { SPINNER_ACTIVE=0 } +MSG_INFO_SHOWN_LIST="" + msg_info() { local msg="$1" - if ! declare -p MSG_INFO_SHOWN &>/dev/null; then - declare -gA MSG_INFO_SHOWN - fi - if [[ -n "${MSG_INFO_SHOWN["$msg"]}" ]]; then + if echo "$MSG_INFO_SHOWN_LIST" | grep -Fqx "$msg"; then return fi - MSG_INFO_SHOWN["$msg"]=1 + MSG_INFO_SHOWN_LIST="${MSG_INFO_SHOWN_LIST}${msg}"$'\n' if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then return @@ -140,16 +138,12 @@ msg_info() { msg_ok() { local msg="$1" - if [ -n "${SPINNER_PID:-}" ]; then - while ps -p "$SPINNER_PID" >/dev/null 2>&1; do - kill "$SPINNER_PID" >/dev/null 2>&1 || break - wait "$SPINNER_PID" 2>/dev/null || true - done - fi + stop_spinner printf "\e[?25h\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 - unset SPINNER_PID SPINNER_ACTIVE=0 + + MSG_INFO_SHOWN_LIST=$(echo "$MSG_INFO_SHOWN_LIST" | grep -Fvx "$msg") } msg_error() { From 788b62dbf3c3728bba2ea77ae789d196e80b73b5 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Wed, 26 Mar 2025 15:27:46 -0400 Subject: [PATCH 0123/1614] remove install_core_deps --- install/openziti-controller-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh index 2e00c21..8dcf813 100644 --- a/install/openziti-controller-install.sh +++ b/install/openziti-controller-install.sh @@ -12,7 +12,6 @@ catch_errors setting_up_container network_check update_os -install_core_deps msg_info "Installing Dependencies" $STD apt-get install -y gpg From 2045927f8821698c23ea4a29fcb9fad896988808 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Wed, 26 Mar 2025 15:47:26 -0400 Subject: [PATCH 0124/1614] fix msg_err to msg_error --- install/openziti-controller-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh index 8dcf813..1d8b4a2 100644 --- a/install/openziti-controller-install.sh +++ b/install/openziti-controller-install.sh @@ -33,7 +33,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then systemctl enable -q --now ziti-controller else systemctl enable -q ziti-controller - msg_err "Configration not provided; Please run /opt/openziti/etc/controller/bootstrap.bash to configure the controller and restart the container" + msg_error "Configration not provided; Please run /opt/openziti/etc/controller/bootstrap.bash to configure the controller and restart the container" fi motd_ssh From f942d17845a060ffaeaa907943e27fd4ca34b5cd Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Wed, 26 Mar 2025 16:50:25 -0400 Subject: [PATCH 0125/1614] update end of scritp echo --- ct/openziti-controller.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/openziti-controller.sh b/ct/openziti-controller.sh index 86cb04c..b4f6823 100644 --- a/ct/openziti-controller.sh +++ b/ct/openziti-controller.sh @@ -40,4 +40,5 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" -echo -e "Access the web interface at https://${IP}:/zac" \ No newline at end of file +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:/zac${CL}" \ No newline at end of file From 7bf98d007d38c5037b5356137f35f89d3ec61fe6 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Wed, 26 Mar 2025 16:59:44 -0400 Subject: [PATCH 0126/1614] conflict in VERBOSE usage between build.func & bootstrap script, so forcing vebosity to 0 --- install/openziti-controller-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh index 1d8b4a2..3a9b66c 100644 --- a/install/openziti-controller-install.sh +++ b/install/openziti-controller-install.sh @@ -28,7 +28,7 @@ msg_ok "Installed openziti" read -r -p "Would you like to go through the auto configuration now? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Starting Configuration" - bash /opt/openziti/etc/controller/bootstrap.bash + env VERBOSE=0 bash /opt/openziti/etc/controller/bootstrap.bash msg_ok "Configuration Completed" systemctl enable -q --now ziti-controller else From 4c63e28470d4feb97c3cb4c59c0547cd0cd9b78f Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Wed, 26 Mar 2025 17:05:33 -0400 Subject: [PATCH 0127/1614] fix protocol in end if script output --- ct/openziti-controller.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/openziti-controller.sh b/ct/openziti-controller.sh index b4f6823..0ccc2ea 100644 --- a/ct/openziti-controller.sh +++ b/ct/openziti-controller.sh @@ -41,4 +41,4 @@ 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}:/zac${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:/zac${CL}" \ No newline at end of file From 8ff23613158d086881c8cc0fc45cf91899963f0f Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Thu, 27 Mar 2025 01:22:32 +0000 Subject: [PATCH 0128/1614] Update versions.json --- frontend/public/json/versions.json | 142 ++++++++++++++--------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index b2c86c2..d093e78 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,8 +1,78 @@ [ + { + "name": "StarFleetCPTN/GoMFT", + "version": "v0.2.0", + "date": "2025-03-27T00:26:55Z" + }, + { + "name": "home-assistant/core", + "version": "2025.3.4", + "date": "2025-03-21T20:22:46Z" + }, + { + "name": "element-hq/synapse", + "version": "v1.127.1", + "date": "2025-03-26T21:44:28Z" + }, + { + "name": "duplicati/duplicati", + "version": "v2.1.0.112-2.1.0.112_canary_2025-03-26", + "date": "2025-03-26T21:04:38Z" + }, + { + "name": "ollama/ollama", + "version": "v0.6.3-rc1", + "date": "2025-03-26T20:39:01Z" + }, { "name": "fhem/fhem-mirror", "version": "6.2", - "date": "2025-03-26T10:33:41Z" + "date": "2025-03-26T20:29:58Z" + }, + { + "name": "runtipi/runtipi", + "version": "nightly", + "date": "2025-03-26T20:06:34Z" + }, + { + "name": "glanceapp/glance", + "version": "v0.7.8", + "date": "2025-03-26T19:59:07Z" + }, + { + "name": "tailscale/tailscale", + "version": "v1.82.0", + "date": "2025-03-26T19:50:59Z" + }, + { + "name": "semaphoreui/semaphore", + "version": "v2.13.2", + "date": "2025-03-26T19:13:48Z" + }, + { + "name": "wazuh/wazuh", + "version": "coverity-w11-4.12.0", + "date": "2025-03-14T20:04:02Z" + }, + { + "name": "immich-app/immich", + "version": "v1.130.2", + "date": "2025-03-26T16:01:25Z" + }, + { + "name": "dgtlmoon/changedetection.io", + "version": "0.49.9", + "date": "2025-03-26T15:31:03Z" + }, + { + "name": "prometheus/prometheus", + "version": "v0.303.0-rc.0", + "date": "2025-03-26T12:48:46Z" + }, + { + "name": "n8n-io/n8n", + "version": "n8n@1.84.2", + "date": "2025-03-26T14:11:45Z" }, { "name": "evcc-io/evcc", @@ -59,16 +129,6 @@ "version": "v11.6.0", "date": "2025-03-25T22:10:15Z" }, - { - "name": "dgtlmoon/changedetection.io", - "version": "0.49.8", - "date": "2025-03-25T22:00:52Z" - }, - { - "name": "immich-app/immich", - "version": "v1.130.1", - "date": "2025-03-25T20:49:15Z" - }, { "name": "keycloak/keycloak", "version": "26.1.4", @@ -134,26 +194,11 @@ "version": "v1.6.8", "date": "2025-03-25T13:33:10Z" }, - { - "name": "n8n-io/n8n", - "version": "n8n@1.85.1", - "date": "2025-03-25T09:33:57Z" - }, - { - "name": "element-hq/synapse", - "version": "v1.127.0", - "date": "2025-03-25T12:47:44Z" - }, { "name": "icereed/paperless-gpt", "version": "v0.14.1", "date": "2025-03-25T10:09:14Z" }, - { - "name": "runtipi/runtipi", - "version": "v3.10.0", - "date": "2025-03-15T14:38:16Z" - }, { "name": "VictoriaMetrics/VictoriaMetrics", "version": "pmm-6401-v1.114.0", @@ -214,11 +259,6 @@ "version": "2.0.2", "date": "2025-03-24T12:02:08Z" }, - { - "name": "semaphoreui/semaphore", - "version": "v2.13.2", - "date": "2025-03-24T11:18:10Z" - }, { "name": "nzbgetcom/nzbget", "version": "v24.8", @@ -284,11 +324,6 @@ "version": "v1.10.0-rc.1", "date": "2025-03-22T06:34:33Z" }, - { - "name": "ollama/ollama", - "version": "v0.6.2", - "date": "2025-03-18T03:11:33Z" - }, { "name": "netbox-community/netbox", "version": "v4.2.6", @@ -299,11 +334,6 @@ "version": "4.4.1", "date": "2024-12-20T13:21:31Z" }, - { - "name": "home-assistant/core", - "version": "2025.3.4", - "date": "2025-03-21T20:22:46Z" - }, { "name": "leiweibau/Pi.Alert", "version": "v2025-03-21", @@ -334,11 +364,6 @@ "version": "v0.14.5-rc5", "date": "2025-03-21T10:50:34Z" }, - { - "name": "StarFleetCPTN/GoMFT", - "version": "v0.1.18", - "date": "2025-03-21T04:36:04Z" - }, { "name": "jhuckaby/Cronicle", "version": "v0.9.77", @@ -364,11 +389,6 @@ "version": "8.0-rc1", "date": "2025-03-11T18:16:27Z" }, - { - "name": "wazuh/wazuh", - "version": "coverity-w11-4.12.0", - "date": "2025-03-14T20:04:02Z" - }, { "name": "rabbitmq/rabbitmq-server", "version": "v4.0.7", @@ -399,11 +419,6 @@ "version": "v0.22.1", "date": "2025-03-18T21:01:22Z" }, - { - "name": "prometheus/prometheus", - "version": "v2.53.4", - "date": "2025-03-18T15:50:39Z" - }, { "name": "syncthing/syncthing", "version": "v1.29.3", @@ -464,11 +479,6 @@ "version": "2.303", "date": "2025-03-17T04:54:50Z" }, - { - "name": "glanceapp/glance", - "version": "v0.7.7", - "date": "2025-03-17T02:24:06Z" - }, { "name": "gethomepage/homepage", "version": "v1.0.4", @@ -504,11 +514,6 @@ "version": "v1.6.1", "date": "2025-03-15T17:29:17Z" }, - { - "name": "duplicati/duplicati", - "version": "v2.1.0.111-2.1.0.111_canary_2025-03-15", - "date": "2025-03-15T11:06:44Z" - }, { "name": "henrygd/beszel", "version": "v0.10.2", @@ -679,11 +684,6 @@ "version": "10.1.39", "date": "2025-03-04T19:05:18Z" }, - { - "name": "tailscale/tailscale", - "version": "v1.80.3", - "date": "2025-03-04T18:47:25Z" - }, { "name": "pi-hole/pi-hole", "version": "v6.0.5", From 456c67eea44479a34431fe5eb80cff9637352efc Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 09:10:29 +0100 Subject: [PATCH 0129/1614] spinner --- ct/alpine-gitea.sh | 1 - misc/build.func | 55 ++++++++++++++++++++++++---------------------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 3cadb49..1b31e27 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -21,7 +21,6 @@ catch_errors function update_script() { header_info - msg_info "Updating Alpine Packages" apk update apk upgrade diff --git a/misc/build.func b/misc/build.func index 8cf4a61..47eec0e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -86,15 +86,21 @@ error_handler() { } # This function displays an informational message with logging support. +declare -A MSG_INFO_SHOWN +SPINNER_ACTIVE=0 +SPINNER_PID="" + +trap 'stop_spinner' EXIT INT TERM HUP + start_spinner() { local msg="$1" - local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') + local frames=(⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏) local spin_i=0 local interval=0.1 { - while [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; do - printf "\r\e[2K${frames[spin_i]} ${YW}%b${CL}" "$msg" >&2 + while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do + printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${msg}${CL}" >&2 spin_i=$(((spin_i + 1) % ${#frames[@]})) sleep "$interval" done @@ -105,33 +111,33 @@ start_spinner() { } stop_spinner() { - if [ -n "${SPINNER_PID:-}" ]; then - if ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill "$SPINNER_PID" >/dev/null 2>&1 - sleep 0.1 - if ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill -9 "$SPINNER_PID" >/dev/null 2>&1 - fi - fi + if [[ -n "$SPINNER_PID" ]] && kill -0 "$SPINNER_PID" 2>/dev/null; then + kill "$SPINNER_PID" 2>/dev/null + sleep 0.1 + kill -0 "$SPINNER_PID" 2>/dev/null && kill -9 "$SPINNER_PID" 2>/dev/null wait "$SPINNER_PID" 2>/dev/null || true - unset SPINNER_PID fi SPINNER_ACTIVE=0 + unset SPINNER_PID } -MSG_INFO_SHOWN_LIST="" +spinner_guard() { + if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "$SPINNER_PID" ]]; then + kill "$SPINNER_PID" 2>/dev/null + wait "$SPINNER_PID" 2>/dev/null || true + SPINNER_ACTIVE=0 + unset SPINNER_PID + fi +} msg_info() { local msg="$1" - if echo "$MSG_INFO_SHOWN_LIST" | grep -Fqx "$msg"; then - return - fi - MSG_INFO_SHOWN_LIST="${MSG_INFO_SHOWN_LIST}${msg}"$'\n' + [[ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]] && return + MSG_INFO_SHOWN["$msg"]=1 - if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then - return - fi + [[ "$SPINNER_ACTIVE" -eq 1 ]] && return + spinner_guard SPINNER_ACTIVE=1 start_spinner "$msg" } @@ -139,17 +145,14 @@ msg_info() { msg_ok() { local msg="$1" stop_spinner - printf "\e[?25h\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 - unset SPINNER_PID - SPINNER_ACTIVE=0 - - MSG_INFO_SHOWN_LIST=$(echo "$MSG_INFO_SHOWN_LIST" | grep -Fvx "$msg") + printf "\e[?25h\r\e[2K%s %b\n" "${CM}" "${GN}${msg}${CL}" >&2 + unset MSG_INFO_SHOWN["$msg"] } msg_error() { stop_spinner local msg="$1" - printf "\r\e[2K${CROSS}${RD}%b${CL}\n" "$msg" >&2 + printf "\r\e[2K%s %b\n" "${CROSS}" "${RD}${msg}${CL}" >&2 log_message "ERROR" "$msg" } From 55f5c5a3c2e480fd761eb49ccd61acd93411ea8a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 09:13:09 +0100 Subject: [PATCH 0130/1614] Update build.func --- misc/build.func | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index 47eec0e..0ad448c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -89,6 +89,7 @@ error_handler() { declare -A MSG_INFO_SHOWN SPINNER_ACTIVE=0 SPINNER_PID="" +SPINNER_MSG="" trap 'stop_spinner' EXIT INT TERM HUP @@ -98,9 +99,11 @@ start_spinner() { local spin_i=0 local interval=0.1 + SPINNER_MSG="$msg" + { while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do - printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${msg}${CL}" >&2 + printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 spin_i=$(((spin_i + 1) % ${#frames[@]})) sleep "$interval" done @@ -135,8 +138,6 @@ msg_info() { [[ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]] && return MSG_INFO_SHOWN["$msg"]=1 - [[ "$SPINNER_ACTIVE" -eq 1 ]] && return - spinner_guard SPINNER_ACTIVE=1 start_spinner "$msg" @@ -145,7 +146,7 @@ msg_info() { msg_ok() { local msg="$1" stop_spinner - printf "\e[?25h\r\e[2K%s %b\n" "${CM}" "${GN}${msg}${CL}" >&2 + printf "\r\e[2K%s %b\n" "${CM}" "${GN}${msg}${CL}" >&2 unset MSG_INFO_SHOWN["$msg"] } From 714f7a459cb66f657cef6d820035cd044fa7c88b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 09:32:34 +0100 Subject: [PATCH 0131/1614] Update build.func --- misc/build.func | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 0ad448c..acd03b8 100644 --- a/misc/build.func +++ b/misc/build.func @@ -90,6 +90,7 @@ declare -A MSG_INFO_SHOWN SPINNER_ACTIVE=0 SPINNER_PID="" SPINNER_MSG="" +SPINNER_LINE_PRINTED=0 trap 'stop_spinner' EXIT INT TERM HUP @@ -100,10 +101,16 @@ start_spinner() { local interval=0.1 SPINNER_MSG="$msg" + SPINNER_LINE_PRINTED=0 { while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do - printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 + if [[ "$SPINNER_LINE_PRINTED" -eq 0 ]]; then + printf "\r\e[2K%s %b\n" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 + SPINNER_LINE_PRINTED=1 + else + printf "\r\e[1A\e[2K%s %b\n" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 + fi spin_i=$(((spin_i + 1) % ${#frames[@]})) sleep "$interval" done @@ -121,6 +128,7 @@ stop_spinner() { wait "$SPINNER_PID" 2>/dev/null || true fi SPINNER_ACTIVE=0 + SPINNER_LINE_PRINTED=0 unset SPINNER_PID } From 1808acc94ce2f4ce0ca8d9932ed5eba834df0324 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 09:49:58 +0100 Subject: [PATCH 0132/1614] Update build.func --- misc/build.func | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/misc/build.func b/misc/build.func index acd03b8..bf8a7e2 100644 --- a/misc/build.func +++ b/misc/build.func @@ -36,7 +36,7 @@ color() { TAB=" " # Icons - CM="${TAB}✔️${TAB}${CL}" + CM="${TAB}✔️${TAB}" CROSS="${TAB}✖️${TAB}${CL}" INFO="${TAB}💡${TAB}${CL}" OS="${TAB}🖥️${TAB}${CL}" @@ -90,7 +90,6 @@ declare -A MSG_INFO_SHOWN SPINNER_ACTIVE=0 SPINNER_PID="" SPINNER_MSG="" -SPINNER_LINE_PRINTED=0 trap 'stop_spinner' EXIT INT TERM HUP @@ -101,16 +100,11 @@ start_spinner() { local interval=0.1 SPINNER_MSG="$msg" - SPINNER_LINE_PRINTED=0 + printf "\r\e[2K" >&2 { while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do - if [[ "$SPINNER_LINE_PRINTED" -eq 0 ]]; then - printf "\r\e[2K%s %b\n" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 - SPINNER_LINE_PRINTED=1 - else - printf "\r\e[1A\e[2K%s %b\n" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 - fi + printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 spin_i=$(((spin_i + 1) % ${#frames[@]})) sleep "$interval" done @@ -128,7 +122,6 @@ stop_spinner() { wait "$SPINNER_PID" 2>/dev/null || true fi SPINNER_ACTIVE=0 - SPINNER_LINE_PRINTED=0 unset SPINNER_PID } From 9ee91710a27f062169271ac9ba6f73b6519135a7 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 09:55:44 +0100 Subject: [PATCH 0133/1614] Update alpine-gitea.sh --- ct/alpine-gitea.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 1b31e27..165438c 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -22,16 +22,16 @@ catch_errors function update_script() { header_info msg_info "Updating Alpine Packages" - apk update - apk upgrade + $STD apk update + $STD apk upgrade msg_ok "Updated Alpine Packages" msg_info "Updating Gitea" - apk upgrade gitea + $STD apk upgrade gitea msg_ok "Updated Gitea" msg_info "Restarting Gitea" - rc-service gitea restart + $STD rc-service gitea restart msg_ok "Restarted Gitea" exit 0 From e34981056d5f14bf0d8fbe8dbf1b39be2ff5e8a1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 10:06:22 +0100 Subject: [PATCH 0134/1614] fix single msg_ bug --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index bf8a7e2..2d3d83d 100644 --- a/misc/build.func +++ b/misc/build.func @@ -115,7 +115,7 @@ start_spinner() { } stop_spinner() { - if [[ -n "$SPINNER_PID" ]] && kill -0 "$SPINNER_PID" 2>/dev/null; then + if [[ ${SPINNER_PID+v} && -n "$SPINNER_PID" ]] && kill -0 "$SPINNER_PID" 2>/dev/null; then kill "$SPINNER_PID" 2>/dev/null sleep 0.1 kill -0 "$SPINNER_PID" 2>/dev/null && kill -9 "$SPINNER_PID" 2>/dev/null From 53ea4b6ab1420d9c0bcdcf159ed956811859806a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 10:06:48 +0100 Subject: [PATCH 0135/1614] change spinner color to test --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 2d3d83d..6e4896b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -104,7 +104,7 @@ start_spinner() { { while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do - printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 + printf "\r\e[2K%s %b" "${frames[spin_i]}" "${BL}${SPINNER_MSG}${CL}" >&2 spin_i=$(((spin_i + 1) % ${#frames[@]})) sleep "$interval" done From d6373039412f5abb68be46f35b594ea0e3344c31 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 10:54:28 +0100 Subject: [PATCH 0136/1614] finalize --- ct/alpine-gitea.sh | 2 -- misc/build.func | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 165438c..41071c3 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -33,8 +33,6 @@ function update_script() { msg_info "Restarting Gitea" $STD rc-service gitea restart msg_ok "Restarted Gitea" - - exit 0 } start diff --git a/misc/build.func b/misc/build.func index 6e4896b..ee60517 100644 --- a/misc/build.func +++ b/misc/build.func @@ -37,7 +37,7 @@ color() { # Icons CM="${TAB}✔️${TAB}" - CROSS="${TAB}✖️${TAB}${CL}" + CROSS="${TAB}✖️${TAB}" INFO="${TAB}💡${TAB}${CL}" OS="${TAB}🖥️${TAB}${CL}" OSVERSION="${TAB}🌟${TAB}${CL}" @@ -104,7 +104,7 @@ start_spinner() { { while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do - printf "\r\e[2K%s %b" "${frames[spin_i]}" "${BL}${SPINNER_MSG}${CL}" >&2 + printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 spin_i=$(((spin_i + 1) % ${#frames[@]})) sleep "$interval" done From 396db12672ebae6abfbed13df8548d7a2ed2b283 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Thu, 27 Mar 2025 12:37:35 +0000 Subject: [PATCH 0137/1614] Update versions.json --- frontend/public/json/versions.json | 100 ++++++++++++++--------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index d093e78..0a4692f 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,14 +1,54 @@ [ { - "name": "StarFleetCPTN/GoMFT", - "version": "v0.2.0", - "date": "2025-03-27T00:26:55Z" + "name": "n8n-io/n8n", + "version": "n8n@1.84.3", + "date": "2025-03-27T11:54:33Z" + }, + { + "name": "zabbix/zabbix", + "version": "7.2.5", + "date": "2025-03-27T11:06:48Z" + }, + { + "name": "syncthing/syncthing", + "version": "v1.29.3", + "date": "2025-03-12T11:56:30Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-03-27T10:33:31Z" }, { "name": "home-assistant/core", "version": "2025.3.4", "date": "2025-03-21T20:22:46Z" }, + { + "name": "evcc-io/evcc", + "version": "0.202.1", + "date": "2025-03-27T08:24:55Z" + }, + { + "name": "morpheus65535/bazarr", + "version": "v1.5.1", + "date": "2025-01-01T16:15:52Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1699", + "date": "2025-03-27T05:57:08Z" + }, + { + "name": "openobserve/openobserve", + "version": "v0.14.5-rc6", + "date": "2025-03-27T05:15:49Z" + }, + { + "name": "StarFleetCPTN/GoMFT", + "version": "v0.2.1", + "date": "2025-03-27T02:08:19Z" + }, { "name": "element-hq/synapse", "version": "v1.127.1", @@ -21,13 +61,8 @@ }, { "name": "ollama/ollama", - "version": "v0.6.3-rc1", - "date": "2025-03-26T20:39:01Z" - }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-03-26T20:29:58Z" + "version": "v0.6.2", + "date": "2025-03-18T03:11:33Z" }, { "name": "runtipi/runtipi", @@ -44,6 +79,11 @@ "version": "v1.82.0", "date": "2025-03-26T19:50:59Z" }, + { + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" + }, { "name": "semaphoreui/semaphore", "version": "v2.13.2", @@ -69,16 +109,6 @@ "version": "v0.303.0-rc.0", "date": "2025-03-26T12:48:46Z" }, - { - "name": "n8n-io/n8n", - "version": "n8n@1.84.2", - "date": "2025-03-26T14:11:45Z" - }, - { - "name": "evcc-io/evcc", - "version": "0.202.0", - "date": "2025-03-26T10:19:01Z" - }, { "name": "jupyter/notebook", "version": "@jupyter-notebook/ui-components@7.4.0-beta.3", @@ -99,11 +129,6 @@ "version": "v1.34.0", "date": "2025-03-26T08:48:34Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1695", - "date": "2025-03-26T06:01:34Z" - }, { "name": "pocketbase/pocketbase", "version": "v0.26.4", @@ -129,16 +154,6 @@ "version": "v11.6.0", "date": "2025-03-25T22:10:15Z" }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, - { - "name": "zabbix/zabbix", - "version": "7.2.5rc2", - "date": "2025-03-25T19:25:22Z" - }, { "name": "Stirling-Tools/Stirling-PDF", "version": "v0.45.0", @@ -299,11 +314,6 @@ "version": "v1.32.2.4987", "date": "2025-03-16T09:41:37Z" }, - { - "name": "morpheus65535/bazarr", - "version": "v1.5.1", - "date": "2025-01-01T16:15:52Z" - }, { "name": "usememos/memos", "version": "v0.24.2", @@ -359,11 +369,6 @@ "version": "v0.107.59", "date": "2025-03-21T11:11:39Z" }, - { - "name": "openobserve/openobserve", - "version": "v0.14.5-rc5", - "date": "2025-03-21T10:50:34Z" - }, { "name": "jhuckaby/Cronicle", "version": "v0.9.77", @@ -419,11 +424,6 @@ "version": "v0.22.1", "date": "2025-03-18T21:01:22Z" }, - { - "name": "syncthing/syncthing", - "version": "v1.29.3", - "date": "2025-03-12T11:56:30Z" - }, { "name": "OctoPrint/OctoPrint", "version": "1.10.3", From f74450860c86490534f24dcba530921385d204c1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 13:42:21 +0100 Subject: [PATCH 0138/1614] add preflight-check --- misc/build.func | 68 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/misc/build.func b/misc/build.func index ee60517..2a9cb05 100644 --- a/misc/build.func +++ b/misc/build.func @@ -60,6 +60,8 @@ color() { CREATING="${TAB}🚀${TAB}${CL}" ADVANCED="${TAB}🧩${TAB}${CL}" FUSE="${TAB}🔧${TAB}${CL}" + + preflight_checks } # This function enables error handling in the script by setting options and defining a trap for the ERR signal. @@ -85,6 +87,72 @@ error_handler() { echo -e "\n$error_message\n" } +preflight_checks() { + local missing=0 + local min_disk_mb=2048 + local required_cmds=(curl wget awk grep sed df ip ping dig hostname pct) + + printf "${SEARCH}${BOLD}${DGN}Performing Preflight Checks:${CL}\n" + + for cmd in "${required_cmds[@]}"; do + if ! command -v "$cmd" >/dev/null 2>&1; then + printf "${CROSS}${RD}Missing required command: ${cmd}${CL}\n" + missing=1 + fi + done + + local disk_avail + disk_avail=$(df -Pm / | awk 'NR==2 {print $4}') + if [[ "$disk_avail" -lt "$min_disk_mb" ]]; then + printf "${CROSS}${RD}Disk space is below required threshold: ${disk_avail}MB < ${min_disk_mb}MB${CL}\n" + missing=1 + else + printf "${DISKSIZE}${BOLD}${DGN}Free Disk Space: ${BGN}${disk_avail}MB${CL}\n" + fi + + if ! ping -c1 -W2 1.1.1.1 >/dev/null; then + printf "${CROSS}${RD}No Internet connectivity (1.1.1.1 unreachable)${CL}\n" + missing=1 + else + printf "${CM}${GN}Internet Connectivity OK${CL}\n" + fi + + if ! dig +short google.com | grep -qE '^[0-9.]+'; then + printf "${CROSS}${RD}DNS resolution failed for google.com${CL}\n" + missing=1 + else + printf "${CM}${GN}DNS Resolution OK${CL}\n" + fi + + if ! ip -4 a | grep -q 'inet '; then + printf "${CROSS}${RD}No IPv4 address detected${CL}\n" + missing=1 + else + printf "${CM}${GN}IPv4 Detected${CL}\n" + fi + + if ip -6 a | grep -q 'inet6' && [[ "$DISABLEIP6" != "yes" ]]; then + printf "${CM}${GN}IPv6 Detected${CL}\n" + fi + + if ! pct list &>/dev/null; then + printf "${CROSS}${RD}Proxmox container system not ready (pct not working)${CL}\n" + missing=1 + fi + + if [[ ! -s /etc/network/interfaces ]]; then + printf "${CROSS}${RD}Network config file missing or empty: /etc/network/interfaces${CL}\n" + missing=1 + fi + + if [[ "$missing" -ne 0 ]]; then + printf "\n${CROSS}${RD}Preflight checks failed. Fix above errors and re-run the script.${CL}\n" + exit 1 + fi + + printf "\n${CM}${GN}All preflight checks passed successfully.${CL}\n\n" +} + # This function displays an informational message with logging support. declare -A MSG_INFO_SHOWN SPINNER_ACTIVE=0 From bf1c7f96444bb40fa6d77ed5fb0452bbabd323f1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 13:50:29 +0100 Subject: [PATCH 0139/1614] Update build.func --- misc/build.func | 84 +++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 45 deletions(-) diff --git a/misc/build.func b/misc/build.func index 2a9cb05..482c920 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1489,30 +1489,24 @@ start() { # This function collects user settings and integrates all the collected information. build_container() { - # if [ "$VERB" == "yes" ]; then set -x; fi - - if [ "$CT_TYPE" == "1" ]; then + if [[ "$CT_TYPE" == "1" ]]; then FEATURES="keyctl=1,nesting=1" else FEATURES="nesting=1" fi - # 26.03.2025 disabled - #if [ "$ENABLE_FUSE" == "yes" ]; then - # FEATURES+=",fuse=1" - #fi - if [[ $DIAGNOSTICS == "yes" ]]; then - post_to_api - fi + [[ "$DIAGNOSTICS" == "yes" ]] && post_to_api FEATURES="${FEATURES#,}" TEMP_DIR=$(mktemp -d) - pushd $TEMP_DIR >/dev/null - if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" + pushd "$TEMP_DIR" >/dev/null || return 1 + + if [[ "$var_os" == "alpine" ]]; then + export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" fi + export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" export CACHER_IP="$APT_CACHER_IP" @@ -1522,14 +1516,13 @@ build_container() { export app="$NSAPP" export PASSWORD="$PW" export VERBOSE="$VERB" - export SSH_ROOT="${SSH}" + export SSH_ROOT="$SSH" export SSH_AUTHORIZED_KEY export CTID="$CT_ID" export CTTYPE="$CT_TYPE" export PCT_OSTYPE="$var_os" export PCT_OSVERSION="$var_version" export PCT_DISK_SIZE="$DISK_SIZE" - #export IPv6="$IPv6" export PCT_OPTIONS=" -features $FEATURES -hostname $HN @@ -1544,12 +1537,12 @@ build_container() { $PW " - # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? + bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || return 1 - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - if [ "$CT_TYPE" == "0" ]; then - cat <>$LXC_CONFIG + local config="/etc/pve/lxc/${CTID}.conf" + + append_usb_passthrough() { + cat <>"$config" # USB passthrough lxc.cgroup2.devices.allow: a lxc.cap.drop: @@ -1561,11 +1554,10 @@ lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create= lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file EOF - fi + } - if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then - cat <>$LXC_CONFIG + append_vaapi_privileged() { + cat <>"$config" # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm @@ -1574,32 +1566,34 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF - fi - else - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then - if [[ -e "/dev/dri/renderD128" ]]; then - if [[ -e "/dev/dri/card0" ]]; then - cat <>$LXC_CONFIG -# VAAPI hardware transcoding -dev0: /dev/dri/card0,gid=44 -dev1: /dev/dri/renderD128,gid=104 -EOF - else - cat <>$LXC_CONFIG -# VAAPI hardware transcoding -dev0: /dev/dri/card1,gid=44 -dev1: /dev/dri/renderD128,gid=104 -EOF - fi + } + + append_vaapi_unprivileged() { + if [[ -e "/dev/dri/renderD128" ]]; then + if [[ -e "/dev/dri/card0" ]]; then + printf "dev0: /dev/dri/card0,gid=44\ndev1: /dev/dri/renderD128,gid=104\n" >>"$config" + else + printf "dev0: /dev/dri/card1,gid=44\ndev1: /dev/dri/renderD128,gid=104\n" >>"$config" fi fi + } + + is_hw_transcoding_app() { + [[ "$APP" =~ ^(Channels|Emby|ErsatzTV|Frigate|Jellyfin|Plex|Scrypted|Tdarr|Unmanic|Ollama|FileFlows)$ ]] + } + + if [[ "$CT_TYPE" == "0" ]]; then + append_usb_passthrough + is_hw_transcoding_app && append_vaapi_privileged + else + is_hw_transcoding_app && append_vaapi_unprivileged fi - # This starts the container and executes -install.sh msg_info "Starting LXC Container" pct start "$CTID" msg_ok "Started LXC Container" - if [ "$var_os" == "alpine" ]; then + + if [[ "$var_os" == "alpine" ]]; then sleep 3 pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories http://dl-cdn.alpinelinux.org/alpine/latest-stable/main @@ -1607,8 +1601,8 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || return 1 } # This function sets the description of the container. From 3ac4b90ff6f4c70cff025681e3d2e3272d08b0a7 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 13:51:22 +0100 Subject: [PATCH 0140/1614] Update build.func --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 482c920..8a83b67 100644 --- a/misc/build.func +++ b/misc/build.func @@ -61,7 +61,7 @@ color() { ADVANCED="${TAB}🧩${TAB}${CL}" FUSE="${TAB}🔧${TAB}${CL}" - preflight_checks + #preflight_checks } # This function enables error handling in the script by setting options and defining a trap for the ERR signal. From b68258ade2ca239a9bd5b7b195b468a85230a8ce Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:00:14 +0100 Subject: [PATCH 0141/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 236 +++++++++++++++++++------------ 1 file changed, 148 insertions(+), 88 deletions(-) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 991687b..2f6a6db 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -1,14 +1,32 @@ #!/usr/bin/env bash - -# Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) +# +# Title: Proxmox LXC Hardware Passthrough & GPU Acceleration Setup +# Description: Enables hardware passthrough for USB, Intel, NVIDIA, AMD GPUs inside privileged LXC containers. +# Installs optional drivers/tools inside the container (vainfo, intel-gpu-tools, OpenCL, etc.) +# Only supports PRIVILEGED containers for GPU passthrough. # License: MIT -# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Execute within the Proxmox shell -# bash -c "$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/misc/hw-acceleration.sh)" +# Author: MickLesk (CanbiZ) +# Repo: https://github.com/community-scripts/ProxmoxVED +# +# Usage: bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/misc/hw-acceleration.sh)" +# +# Requires: +# - Proxmox VE 8.1+ +# - Privileged LXC Containers +# - GPU device available on host +# +# Features: +# - USB Serial Passthrough +# - Intel VAAPI passthrough + (optional) non-free drivers +# - NVIDIA GPU passthrough for LXC (binds /dev/nvidia*) +# - AMD GPU passthrough (experimental) +# - Container driver installation via APT +# - User group assignments (video/render) +# - Interactive menu system via whiptail -set -e -function header_info { +set -euo pipefail + +function header_info() { clear cat <<"EOF" @@ -17,100 +35,142 @@ function header_info { / _ /| |/ |/ / / __ / __/ __/ -_) / -_) __/ _ `/ __/ / _ \/ _ \ /_//_/ |__/|__/ /_/ |_\__/\__/\__/_/\__/_/ \_,_/\__/_/\___/_//_/ + LXC Hardware Integration Tool for Proxmox VE EOF } -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -e -header_info -echo "Loading..." -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." +function msg() { + local type="$1"; shift + case "$type" in + info) printf " \033[36m➤\033[0m %s\n" "$*" ;; + ok) printf " \033[32m✔\033[0m %s\n" "$*" ;; + warn) printf " \033[33m⚠\033[0m %s\n" "$*" >&2 ;; + err) printf " \033[31m✘\033[0m %s\n" "$*" >&2 ;; + esac } -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +function select_lxc_container() { + local lxc_list; local options=() + if ! lxc_list=$(pct list | awk 'NR>1 {print $1}' | xargs -n1); then + msg err "Failed to fetch LXC containers" + exit 1 + fi + for ctid in $lxc_list; do + if [[ -f "/etc/pve/lxc/${ctid}.conf" ]]; then + options+=("$ctid" "LXC ${ctid}" "OFF") + fi + done + if [[ ${#options[@]} -eq 0 ]]; then + msg warn "No containers found" + exit 1 + fi + CTID=$(whiptail --title "Select LXC Container" --checklist \ + "Choose container to apply hardware passthrough:" 15 50 5 \ + "${options[@]}" 3>&1 1>&2 2>&3 | tr -d '"') + if [[ -z "$CTID" ]]; then + msg warn "No container selected" + exit 1 + fi + LXC_CONFIG="/etc/pve/lxc/${CTID}.conf" } -if ! pveversion | grep -Eq "pve-manager/(8\.[1-3])"; then - msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 8.1 or higher" - echo -e "Exiting..." - sleep 2 - exit -fi +function select_hw_options() { + local options=( + "usb" "USB Passthrough" OFF + "intel" "Intel VAAPI GPU" OFF + "nvidia" "NVIDIA GPU" OFF + "amd" "AMD GPU (ROCm)" OFF + ) + SELECTIONS=$(whiptail --title "Hardware Options" --checklist \ + "Select hardware features to passthrough:" 20 50 10 \ + "${options[@]}" 3>&1 1>&2 2>&3 | tr -d '"') + if [[ -z "$SELECTIONS" ]]; then + msg warn "No hardware passthrough options selected" + exit 1 + fi +} -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add Intel HW Acceleration" --yesno "This Will Add Intel HW Acceleration to an existing LXC Container. Proceed?" 8 72 || exit -NODE=$(hostname) -PREV_MENU=() -MSG_MAX_LENGTH=0 -privileged_containers=$(pct list | awk 'NR>1 && system("grep -q \047unprivileged: 1\047 /etc/pve/lxc/" $1 ".conf")') +function add_usb_passthrough() { + if ! ls /dev/ttyUSB* &>/dev/null && ! ls /dev/ttyACM* &>/dev/null; then + msg warn "No USB serial devices found" + return + fi + cat <> "$LXC_CONFIG" +# USB Passthrough +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file +EOF + msg ok "USB passthrough added to $CTID" +} -if [ -z "$privileged_containers" ]; then - whiptail --msgbox "No Privileged Containers Found." 10 58 - exit -fi - -while read -r TAG ITEM; do - OFFSET=2 - ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET - PREV_MENU+=("$TAG" "$ITEM " "OFF") -done < <(echo "$privileged_containers") - -privileged_container=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Privileged Containers on $NODE" --checklist "\nSelect a Container To Add Intel HW Acceleration:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${PREV_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit -header_info -read -r -p "Verbose mode? " prompt -if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - STD="" -else - STD="silent" -fi -header_info - -cat <>/etc/pve/lxc/${privileged_container}.conf -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm +function add_intel_gpu() { + if [[ ! -e /dev/dri/renderD128 ]]; then + msg warn "Intel GPU not detected" + return + fi + cat <> "$LXC_CONFIG" +# Intel VAAPI +lxc.cgroup2.devices.allow: c 226:* rwm lxc.cgroup2.devices.allow: c 29:0 rwm lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF + msg ok "Intel VAAPI passthrough added to $CTID" +} -read -r -p "Do you need the intel-media-va-driver-non-free driver (Debian 12 only)? " prompt -if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then +function add_nvidia_gpu() { + if [[ ! -e /dev/nvidia0 ]]; then + msg warn "NVIDIA device not found" + return + fi + cat <> "$LXC_CONFIG" +# NVIDIA GPU +lxc.cgroup2.devices.allow: c 195:* rwm +lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file +lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file +lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file +lxc.mount.entry: /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file +EOF + msg ok "NVIDIA passthrough added to $CTID" +} + +function add_amd_gpu() { + if [[ ! -e /dev/kfd ]]; then + msg warn "AMD ROCm device not detected" + return + fi + cat <> "$LXC_CONFIG" +# AMD ROCm GPU +lxc.cgroup2.devices.allow: c 226:* rwm +lxc.cgroup2.devices.allow: c 238:* rwm +lxc.mount.entry: /dev/kfd dev/kfd none bind,optional,create=file +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +EOF + msg ok "AMD GPU passthrough added to $CTID" +} + +function main() { header_info - msg_info "Installing Hardware Acceleration (non-free)" - pct exec ${privileged_container} -- bash -c "cat </etc/apt/sources.list.d/non-free.list + select_lxc_container + select_hw_options + for opt in $SELECTIONS; do + case "$opt" in + usb) add_usb_passthrough ;; + intel) add_intel_gpu ;; + nvidia) add_nvidia_gpu ;; + amd) add_amd_gpu ;; + esac + done + msg ok "Hardware passthrough updated in: $LXC_CONFIG" + printf "\nRestart container %s to apply changes.\n\n" "$CTID" +} -deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware -deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware - -deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware -deb-src http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware - -deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware -deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware -EOF" - - pct exec ${privileged_container} -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get update && $STD apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render" - msg_ok "Installed Hardware Acceleration (non-free)" -else - header_info - msg_info "Installing Hardware Acceleration" - pct exec ${privileged_container} -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render" - msg_ok "Installed Hardware Acceleration" -fi -sleep 1 -whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Added tools" "vainfo, execute command 'vainfo'\nintel-gpu-tools, execute command 'intel_gpu_top'" 8 58 - -msg_ok "Completed Successfully!\n" -echo -e "Reboot container ${BL}$privileged_container${CL} to apply the new settings\n" +main From 4b20355aed96b09ad50061213acc048210ef32f6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:02:23 +0100 Subject: [PATCH 0142/1614] Update build.func --- misc/build.func | 152 ++++++++++++++---------------------------------- 1 file changed, 45 insertions(+), 107 deletions(-) diff --git a/misc/build.func b/misc/build.func index 8a83b67..ee60517 100644 --- a/misc/build.func +++ b/misc/build.func @@ -60,8 +60,6 @@ color() { CREATING="${TAB}🚀${TAB}${CL}" ADVANCED="${TAB}🧩${TAB}${CL}" FUSE="${TAB}🔧${TAB}${CL}" - - #preflight_checks } # This function enables error handling in the script by setting options and defining a trap for the ERR signal. @@ -87,72 +85,6 @@ error_handler() { echo -e "\n$error_message\n" } -preflight_checks() { - local missing=0 - local min_disk_mb=2048 - local required_cmds=(curl wget awk grep sed df ip ping dig hostname pct) - - printf "${SEARCH}${BOLD}${DGN}Performing Preflight Checks:${CL}\n" - - for cmd in "${required_cmds[@]}"; do - if ! command -v "$cmd" >/dev/null 2>&1; then - printf "${CROSS}${RD}Missing required command: ${cmd}${CL}\n" - missing=1 - fi - done - - local disk_avail - disk_avail=$(df -Pm / | awk 'NR==2 {print $4}') - if [[ "$disk_avail" -lt "$min_disk_mb" ]]; then - printf "${CROSS}${RD}Disk space is below required threshold: ${disk_avail}MB < ${min_disk_mb}MB${CL}\n" - missing=1 - else - printf "${DISKSIZE}${BOLD}${DGN}Free Disk Space: ${BGN}${disk_avail}MB${CL}\n" - fi - - if ! ping -c1 -W2 1.1.1.1 >/dev/null; then - printf "${CROSS}${RD}No Internet connectivity (1.1.1.1 unreachable)${CL}\n" - missing=1 - else - printf "${CM}${GN}Internet Connectivity OK${CL}\n" - fi - - if ! dig +short google.com | grep -qE '^[0-9.]+'; then - printf "${CROSS}${RD}DNS resolution failed for google.com${CL}\n" - missing=1 - else - printf "${CM}${GN}DNS Resolution OK${CL}\n" - fi - - if ! ip -4 a | grep -q 'inet '; then - printf "${CROSS}${RD}No IPv4 address detected${CL}\n" - missing=1 - else - printf "${CM}${GN}IPv4 Detected${CL}\n" - fi - - if ip -6 a | grep -q 'inet6' && [[ "$DISABLEIP6" != "yes" ]]; then - printf "${CM}${GN}IPv6 Detected${CL}\n" - fi - - if ! pct list &>/dev/null; then - printf "${CROSS}${RD}Proxmox container system not ready (pct not working)${CL}\n" - missing=1 - fi - - if [[ ! -s /etc/network/interfaces ]]; then - printf "${CROSS}${RD}Network config file missing or empty: /etc/network/interfaces${CL}\n" - missing=1 - fi - - if [[ "$missing" -ne 0 ]]; then - printf "\n${CROSS}${RD}Preflight checks failed. Fix above errors and re-run the script.${CL}\n" - exit 1 - fi - - printf "\n${CM}${GN}All preflight checks passed successfully.${CL}\n\n" -} - # This function displays an informational message with logging support. declare -A MSG_INFO_SHOWN SPINNER_ACTIVE=0 @@ -1489,24 +1421,30 @@ start() { # This function collects user settings and integrates all the collected information. build_container() { - if [[ "$CT_TYPE" == "1" ]]; then + # if [ "$VERB" == "yes" ]; then set -x; fi + + if [ "$CT_TYPE" == "1" ]; then FEATURES="keyctl=1,nesting=1" else FEATURES="nesting=1" fi + # 26.03.2025 disabled + #if [ "$ENABLE_FUSE" == "yes" ]; then + # FEATURES+=",fuse=1" + #fi - [[ "$DIAGNOSTICS" == "yes" ]] && post_to_api + if [[ $DIAGNOSTICS == "yes" ]]; then + post_to_api + fi FEATURES="${FEATURES#,}" TEMP_DIR=$(mktemp -d) - pushd "$TEMP_DIR" >/dev/null || return 1 - - if [[ "$var_os" == "alpine" ]]; then - export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" + pushd $TEMP_DIR >/dev/null + if [ "$var_os" == "alpine" ]; then + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" fi - export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" export CACHER_IP="$APT_CACHER_IP" @@ -1516,13 +1454,14 @@ build_container() { export app="$NSAPP" export PASSWORD="$PW" export VERBOSE="$VERB" - export SSH_ROOT="$SSH" + export SSH_ROOT="${SSH}" export SSH_AUTHORIZED_KEY export CTID="$CT_ID" export CTTYPE="$CT_TYPE" export PCT_OSTYPE="$var_os" export PCT_OSVERSION="$var_version" export PCT_DISK_SIZE="$DISK_SIZE" + #export IPv6="$IPv6" export PCT_OPTIONS=" -features $FEATURES -hostname $HN @@ -1537,12 +1476,12 @@ build_container() { $PW " - bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || return 1 + # This executes create_lxc.sh and creates the container and .conf file + bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? - local config="/etc/pve/lxc/${CTID}.conf" - - append_usb_passthrough() { - cat <>"$config" + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + if [ "$CT_TYPE" == "0" ]; then + cat <>$LXC_CONFIG # USB passthrough lxc.cgroup2.devices.allow: a lxc.cap.drop: @@ -1554,10 +1493,11 @@ lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create= lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file EOF - } + fi - append_vaapi_privileged() { - cat <>"$config" + if [ "$CT_TYPE" == "0" ]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then + cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm @@ -1566,34 +1506,32 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF - } - - append_vaapi_unprivileged() { - if [[ -e "/dev/dri/renderD128" ]]; then - if [[ -e "/dev/dri/card0" ]]; then - printf "dev0: /dev/dri/card0,gid=44\ndev1: /dev/dri/renderD128,gid=104\n" >>"$config" - else - printf "dev0: /dev/dri/card1,gid=44\ndev1: /dev/dri/renderD128,gid=104\n" >>"$config" + fi + else + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then + if [[ -e "/dev/dri/renderD128" ]]; then + if [[ -e "/dev/dri/card0" ]]; then + cat <>$LXC_CONFIG +# VAAPI hardware transcoding +dev0: /dev/dri/card0,gid=44 +dev1: /dev/dri/renderD128,gid=104 +EOF + else + cat <>$LXC_CONFIG +# VAAPI hardware transcoding +dev0: /dev/dri/card1,gid=44 +dev1: /dev/dri/renderD128,gid=104 +EOF + fi fi fi - } - - is_hw_transcoding_app() { - [[ "$APP" =~ ^(Channels|Emby|ErsatzTV|Frigate|Jellyfin|Plex|Scrypted|Tdarr|Unmanic|Ollama|FileFlows)$ ]] - } - - if [[ "$CT_TYPE" == "0" ]]; then - append_usb_passthrough - is_hw_transcoding_app && append_vaapi_privileged - else - is_hw_transcoding_app && append_vaapi_unprivileged fi + # This starts the container and executes -install.sh msg_info "Starting LXC Container" pct start "$CTID" msg_ok "Started LXC Container" - - if [[ "$var_os" == "alpine" ]]; then + if [ "$var_os" == "alpine" ]; then sleep 3 pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories http://dl-cdn.alpinelinux.org/alpine/latest-stable/main @@ -1601,8 +1539,8 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || return 1 } # This function sets the description of the container. From bdf3e1c6eebcfc23412aaea61e0f14e6835b783c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:06:24 +0100 Subject: [PATCH 0143/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 137 +++++++++++++++++-------------- 1 file changed, 75 insertions(+), 62 deletions(-) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 2f6a6db..14759e3 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -24,6 +24,8 @@ # - User group assignments (video/render) # - Interactive menu system via whiptail +#!/usr/bin/env bash + set -euo pipefail function header_info() { @@ -49,53 +51,53 @@ function msg() { esac } -function select_lxc_container() { - local lxc_list; local options=() - if ! lxc_list=$(pct list | awk 'NR>1 {print $1}' | xargs -n1); then - msg err "Failed to fetch LXC containers" - exit 1 - fi - for ctid in $lxc_list; do - if [[ -f "/etc/pve/lxc/${ctid}.conf" ]]; then - options+=("$ctid" "LXC ${ctid}" "OFF") - fi - done - if [[ ${#options[@]} -eq 0 ]]; then - msg warn "No containers found" - exit 1 - fi - CTID=$(whiptail --title "Select LXC Container" --checklist \ - "Choose container to apply hardware passthrough:" 15 50 5 \ - "${options[@]}" 3>&1 1>&2 2>&3 | tr -d '"') - if [[ -z "$CTID" ]]; then - msg warn "No container selected" - exit 1 - fi - LXC_CONFIG="/etc/pve/lxc/${CTID}.conf" -} - -function select_hw_options() { - local options=( +function select_hw_features() { + local opts=( "usb" "USB Passthrough" OFF "intel" "Intel VAAPI GPU" OFF "nvidia" "NVIDIA GPU" OFF "amd" "AMD GPU (ROCm)" OFF ) - SELECTIONS=$(whiptail --title "Hardware Options" --checklist \ + SELECTED_FEATURES=$(whiptail --title "Hardware Options" --checklist \ "Select hardware features to passthrough:" 20 50 10 \ - "${options[@]}" 3>&1 1>&2 2>&3 | tr -d '"') - if [[ -z "$SELECTIONS" ]]; then + "${opts[@]}" 3>&1 1>&2 2>&3 | tr -d '"') + if [[ -z "$SELECTED_FEATURES" ]]; then msg warn "No hardware passthrough options selected" exit 1 fi } -function add_usb_passthrough() { - if ! ls /dev/ttyUSB* &>/dev/null && ! ls /dev/ttyACM* &>/dev/null; then - msg warn "No USB serial devices found" - return +function select_lxc_targets() { + local list; local opts=() + if ! list=$(pct list | awk 'NR>1 {print $1 "|" $2}' | xargs -n1); then + msg err "Failed to get container list" + exit 1 fi - cat <> "$LXC_CONFIG" + while IFS="|" read -r id name; do + if [[ -f "/etc/pve/lxc/${id}.conf" ]]; then + opts+=("$id" "${name} (${id})" "OFF") + fi + done <<< "$list" + if [[ ${#opts[@]} -eq 0 ]]; then + msg warn "No containers found" + exit 1 + fi + SELECTED_CTIDS=$(whiptail --title "Select LXC Containers" --checklist \ + "Choose container(s) to apply passthrough:" 20 60 10 \ + "${opts[@]}" 3>&1 1>&2 2>&3 | tr -d '"') + if [[ -z "$SELECTED_CTIDS" ]]; then + msg warn "No containers selected" + exit 1 + fi +} + +function apply_usb() { + local conf="$1" + if ! compgen -G "/dev/ttyUSB* /dev/ttyACM*" >/dev/null; then + msg warn "No USB serial devices found, skipping" + return 1 + fi + cat <> "$conf" # USB Passthrough lxc.cgroup2.devices.allow: a lxc.cap.drop: @@ -107,15 +109,16 @@ lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create= lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file EOF - msg ok "USB passthrough added to $CTID" + return 0 } -function add_intel_gpu() { +function apply_intel() { + local conf="$1" if [[ ! -e /dev/dri/renderD128 ]]; then - msg warn "Intel GPU not detected" - return + msg warn "Intel GPU not detected, skipping" + return 1 fi - cat <> "$LXC_CONFIG" + cat <> "$conf" # Intel VAAPI lxc.cgroup2.devices.allow: c 226:* rwm lxc.cgroup2.devices.allow: c 29:0 rwm @@ -123,15 +126,16 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF - msg ok "Intel VAAPI passthrough added to $CTID" + return 0 } -function add_nvidia_gpu() { +function apply_nvidia() { + local conf="$1" if [[ ! -e /dev/nvidia0 ]]; then - msg warn "NVIDIA device not found" - return + msg warn "NVIDIA device not found, skipping" + return 1 fi - cat <> "$LXC_CONFIG" + cat <> "$conf" # NVIDIA GPU lxc.cgroup2.devices.allow: c 195:* rwm lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file @@ -139,38 +143,47 @@ lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file lxc.mount.entry: /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file EOF - msg ok "NVIDIA passthrough added to $CTID" + return 0 } -function add_amd_gpu() { +function apply_amd() { + local conf="$1" if [[ ! -e /dev/kfd ]]; then - msg warn "AMD ROCm device not detected" - return + msg warn "AMD GPU not found, skipping" + return 1 fi - cat <> "$LXC_CONFIG" + cat <> "$conf" # AMD ROCm GPU lxc.cgroup2.devices.allow: c 226:* rwm lxc.cgroup2.devices.allow: c 238:* rwm lxc.mount.entry: /dev/kfd dev/kfd none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir EOF - msg ok "AMD GPU passthrough added to $CTID" + return 0 } function main() { header_info - select_lxc_container - select_hw_options - for opt in $SELECTIONS; do - case "$opt" in - usb) add_usb_passthrough ;; - intel) add_intel_gpu ;; - nvidia) add_nvidia_gpu ;; - amd) add_amd_gpu ;; - esac + select_hw_features + select_lxc_targets + for ctid in $SELECTED_CTIDS; do + local conf="/etc/pve/lxc/${ctid}.conf" + local updated=0 + for opt in $SELECTED_FEATURES; do + case "$opt" in + usb) apply_usb "$conf" && updated=1 ;; + intel) apply_intel "$conf" && updated=1 ;; + nvidia) apply_nvidia "$conf" && updated=1 ;; + amd) apply_amd "$conf" && updated=1 ;; + esac + done + if [[ "$updated" -eq 1 ]]; then + msg ok "Hardware passthrough updated in: $conf" + printf "\nRestart container %s to apply changes.\n\n" "$ctid" + else + msg warn "No passthrough changes applied for container $ctid" + fi done - msg ok "Hardware passthrough updated in: $LXC_CONFIG" - printf "\nRestart container %s to apply changes.\n\n" "$CTID" } main From 46d1e2e30985b93d8f64e699f2abefe03377b80c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:08:25 +0100 Subject: [PATCH 0144/1614] readd maxun --- ct/{Deferred => }/maxun.sh | 0 install/maxun-install.sh | 178 +++++++++++++++++++++++++++++++++++++ 2 files changed, 178 insertions(+) rename ct/{Deferred => }/maxun.sh (100%) create mode 100644 install/maxun-install.sh diff --git a/ct/Deferred/maxun.sh b/ct/maxun.sh similarity index 100% rename from ct/Deferred/maxun.sh rename to ct/maxun.sh diff --git a/install/maxun-install.sh b/install/maxun-install.sh new file mode 100644 index 0000000..42a74b0 --- /dev/null +++ b/install/maxun-install.sh @@ -0,0 +1,178 @@ +#!/usr/bin/env bash + +# 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/getmaxun/maxun + +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 \ + gpg \ + curl \ + sudo \ + mc \ + redis +msg_ok "Installed Dependencies" + +#configure_lxc "Semantic Search requires a dedicated GPU and at least 16GB RAM. Would you like to install it?" 100 "memory" "16000" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Setting up PostgreSQL Repository" +curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg +echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list +$STD apt-get update +$STD apt-get install -y postgresql-17 +msg_ok "Set up PostgreSQL Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Setup Variables" +DB_NAME=maxun_db +DB_USER=maxun_user +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) +MINIO_USER=minio_usr +MINIO_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) +JWT_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32) +ENCRYPTION_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32) +msg_ok "Set up Variables" + +msg_info "Setup Database" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" +{ + echo "Maxun-Credentials" + echo "Maxun Database User: $DB_USER" + echo "Maxun Database Password: $DB_PASS" + echo "Maxun Database Name: $DB_NAME" + echo "Maxun JWT Secret: $JWT_SECRET" + echo "Maxun Encryption Key: $ENCRYPTION_KEY" +} >> ~/maxun.creds +msg_ok "Set up Database" + +msg_info "Setup MinIO" +cd /tmp +wget -q https://dl.min.io/server/minio/release/linux-amd64/minio +mv minio /usr/local/bin/ +chmod +x /usr/local/bin/minio +mkdir -p /data +cat </etc/systemd/system/minio.service +[Unit] +Description=MinIO +Documentation=https://docs.min.io +Wants=network-online.target +After=network-online.target + +[Service] +User=root +EnvironmentFile=-/etc/default/minio +ExecStart=/usr/local/bin/minio server /data +Restart=always +RestartSec=5 +LimitNOFILE=65536 + +[Install] +WantedBy=multi-user.target +EOF +{ + echo "__________________" + echo "MinIO Admin User: $MINIO_USER" + echo "MinIO Admin Password: $MINIO_PASS" +} >> ~/maxun.creds +cat < /etc/default/minio +MINIO_ROOT_USER=${MINIO_USER} +MINIO_ROOT_PASSWORD=${MINIO_PASS} +EOF +msg_ok "Setup MinIO" + +msg_info "Installing Maxun (Patience)" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/getmaxun/maxun/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/getmaxun/maxun/archive/refs/tags/v${RELEASE}.zip" +unzip -q v${RELEASE}.zip +mv maxun-${RELEASE} /opt/maxun +cat < /opt/maxun/.env +# App Setup +NODE_ENV=development +JWT_SECRET=${JWT_SECRET} +DB_NAME=${DB_NAME} +DB_USER=${DB_USER} +DB_PASSWORD=${DB_PASS} +DB_HOST=localhost +DB_PORT=5432 +ENCRYPTION_KEY=${ENCRYPTION_KEY} +MINIO_ENDPOINT=minio +MINIO_PORT=9000 +MINIO_CONSOLE_PORT=9001 +MINIO_ACCESS_KEY=${MINIO_USER} +MINIO_SECRET_KEY=${MINIO_PASS} +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 + +# Backend and Frontend URLs and Ports +BACKEND_PORT=8080 +FRONTEND_PORT=5173 +BACKEND_URL=localhost:8080 +PUBLIC_URL=localhost:5173 +VITE_BACKEND_URL=localhost:8080 +VITE_PUBLIC_URL=localhost:5173 + +# Telemetry Settings +MAXUN_TELEMETRY=false +EOF + +cd /opt/maxun +$STD npm install --legacy-peer-deps +cd /opt/maxun/maxun-core +$STD npm install --legacy-peer-deps +cd /opt/maxun +$STD npx playwright install --with-deps chromium +$STD npx playwright install-deps +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Maxun" + +msg_info "Creating Service" +cat </etc/systemd/system/maxun.service +[Unit] +Description=Maxun Service +After=network.target postgresql.service redis.service minio.service + +[Service] +WorkingDirectory=/opt/maxun +ExecStart=/usr/bin/npm start +Restart=always +EnvironmentFile=/opt/maxun/.env + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now minio +systemctl enable -q --now maxun +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/v${RELEASE}.zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 3d63800e65e63a8633df5dbfc46e5244a938199e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:09:50 +0100 Subject: [PATCH 0145/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 14759e3..4218ab3 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -52,21 +52,25 @@ function msg() { } function select_hw_features() { - local opts=( - "usb" "USB Passthrough" OFF - "intel" "Intel VAAPI GPU" OFF - "nvidia" "NVIDIA GPU" OFF - "amd" "AMD GPU (ROCm)" OFF - ) - SELECTED_FEATURES=$(whiptail --title "Hardware Options" --checklist \ - "Select hardware features to passthrough:" 20 50 10 \ - "${opts[@]}" 3>&1 1>&2 2>&3 | tr -d '"') + local opts + opts=$( + whiptail --title "🔧 Hardware Integration" --checklist \ + "\nSelect hardware features to passthrough:\n" 20 60 8 \ + "usb" "🖧 USB Passthrough " OFF \ + "intel" "🟦 Intel VAAPI GPU " OFF \ + "nvidia" "🟨 NVIDIA GPU " OFF \ + "amd" "🟥 AMD GPU (ROCm) " OFF \ + 3>&1 1>&2 2>&3 + ) || exit 1 + + SELECTED_FEATURES=$(echo "$opts" | tr -d '"') if [[ -z "$SELECTED_FEATURES" ]]; then - msg warn "No hardware passthrough options selected" + msg warn "No passthrough options selected" exit 1 fi } + function select_lxc_targets() { local list; local opts=() if ! list=$(pct list | awk 'NR>1 {print $1 "|" $2}' | xargs -n1); then From e1a7572e4eaecaf58cb9902c0dcf5658c5a2406c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:15:17 +0100 Subject: [PATCH 0146/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 190 ++++++++++++++++--------------- 1 file changed, 98 insertions(+), 92 deletions(-) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 4218ab3..8c346a3 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -24,13 +24,11 @@ # - User group assignments (video/render) # - Interactive menu system via whiptail -#!/usr/bin/env bash - set -euo pipefail function header_info() { - clear - cat <<"EOF" + clear + cat <<"EOF" __ ___ __ ___ __ __ _ / // / | /| / / / _ |___________ / /__ _______ _/ /_(_)__ ___ @@ -42,66 +40,69 @@ EOF } function msg() { - local type="$1"; shift - case "$type" in + local type="$1" + shift + case "$type" in info) printf " \033[36m➤\033[0m %s\n" "$*" ;; - ok) printf " \033[32m✔\033[0m %s\n" "$*" ;; + ok) printf " \033[32m✔\033[0m %s\n" "$*" ;; warn) printf " \033[33m⚠\033[0m %s\n" "$*" >&2 ;; - err) printf " \033[31m✘\033[0m %s\n" "$*" >&2 ;; - esac + err) printf " \033[31m✘\033[0m %s\n" "$*" >&2 ;; + esac +} + +function detect_features() { + AVAILABLE_FEATURES=() + [[ -e /dev/ttyUSB0 || -e /dev/ttyACM0 ]] && AVAILABLE_FEATURES+=("usb" "🖧 USB Passthrough " OFF) + [[ -e /dev/dri/renderD128 ]] && AVAILABLE_FEATURES+=("intel" "🟦 Intel VAAPI GPU " OFF) + [[ -e /dev/nvidia0 ]] && AVAILABLE_FEATURES+=("nvidia" "🟨 NVIDIA GPU " OFF) + [[ -e /dev/kfd ]] && AVAILABLE_FEATURES+=("amd" "🟥 AMD GPU (ROCm) " OFF) + + if [[ ${#AVAILABLE_FEATURES[@]} -eq 0 ]]; then + msg warn "No supported hardware found on host system." + exit 1 + fi } function select_hw_features() { - local opts - opts=$( - whiptail --title "🔧 Hardware Integration" --checklist \ - "\nSelect hardware features to passthrough:\n" 20 60 8 \ - "usb" "🖧 USB Passthrough " OFF \ - "intel" "🟦 Intel VAAPI GPU " OFF \ - "nvidia" "🟨 NVIDIA GPU " OFF \ - "amd" "🟥 AMD GPU (ROCm) " OFF \ - 3>&1 1>&2 2>&3 - ) || exit 1 + local opts + opts=$(whiptail --title "🔧 Hardware Options" --checklist \ + "\nSelect hardware features to passthrough:\n" 20 60 8 \ + "${AVAILABLE_FEATURES[@]}" 3>&1 1>&2 2>&3) || exit 1 - SELECTED_FEATURES=$(echo "$opts" | tr -d '"') - if [[ -z "$SELECTED_FEATURES" ]]; then - msg warn "No passthrough options selected" - exit 1 - fi + SELECTED_FEATURES=$(echo "$opts" | tr -d '"') + if [[ -z "$SELECTED_FEATURES" ]]; then + msg warn "No passthrough options selected." + exit 1 + fi } - function select_lxc_targets() { - local list; local opts=() - if ! list=$(pct list | awk 'NR>1 {print $1 "|" $2}' | xargs -n1); then - msg err "Failed to get container list" - exit 1 - fi - while IFS="|" read -r id name; do - if [[ -f "/etc/pve/lxc/${id}.conf" ]]; then - opts+=("$id" "${name} (${id})" "OFF") - fi - done <<< "$list" - if [[ ${#opts[@]} -eq 0 ]]; then - msg warn "No containers found" - exit 1 - fi - SELECTED_CTIDS=$(whiptail --title "Select LXC Containers" --checklist \ - "Choose container(s) to apply passthrough:" 20 60 10 \ - "${opts[@]}" 3>&1 1>&2 2>&3 | tr -d '"') - if [[ -z "$SELECTED_CTIDS" ]]; then - msg warn "No containers selected" - exit 1 - fi + local list + local opts=() + list=$(pct list | awk 'NR>1 {print $1 "|" $2}') || return 1 + while IFS="|" read -r id name; do + [[ -f "/etc/pve/lxc/${id}.conf" ]] && opts+=("$id" "$name (CTID: $id)" OFF) + done <<<"$list" + + [[ ${#opts[@]} -eq 0 ]] && { + msg warn "No LXC containers found." + exit 1 + } + + SELECTED_CTIDS=$(whiptail --title "Select LXC Containers" --checklist \ + "Choose container(s) to apply passthrough:" 20 60 10 \ + "${opts[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit 1 + + [[ -z "$SELECTED_CTIDS" ]] && { + msg warn "No containers selected." + exit 1 + } } function apply_usb() { - local conf="$1" - if ! compgen -G "/dev/ttyUSB* /dev/ttyACM*" >/dev/null; then - msg warn "No USB serial devices found, skipping" - return 1 - fi - cat <> "$conf" + local conf="$1" + grep -q "dev/ttyUSB" <<<"$(ls /dev 2>/dev/null)" || return 1 + cat <>"$conf" # USB Passthrough lxc.cgroup2.devices.allow: a lxc.cap.drop: @@ -113,16 +114,12 @@ lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create= lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file EOF - return 0 } function apply_intel() { - local conf="$1" - if [[ ! -e /dev/dri/renderD128 ]]; then - msg warn "Intel GPU not detected, skipping" - return 1 - fi - cat <> "$conf" + local conf="$1" + [[ -e /dev/dri/renderD128 ]] || return 1 + cat <>"$conf" # Intel VAAPI lxc.cgroup2.devices.allow: c 226:* rwm lxc.cgroup2.devices.allow: c 29:0 rwm @@ -130,16 +127,12 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF - return 0 } function apply_nvidia() { - local conf="$1" - if [[ ! -e /dev/nvidia0 ]]; then - msg warn "NVIDIA device not found, skipping" - return 1 - fi - cat <> "$conf" + local conf="$1" + [[ -e /dev/nvidia0 ]] || return 1 + cat <>"$conf" # NVIDIA GPU lxc.cgroup2.devices.allow: c 195:* rwm lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file @@ -147,47 +140,60 @@ lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file lxc.mount.entry: /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file EOF - return 0 } function apply_amd() { - local conf="$1" - if [[ ! -e /dev/kfd ]]; then - msg warn "AMD GPU not found, skipping" - return 1 - fi - cat <> "$conf" + local conf="$1" + [[ -e /dev/kfd ]] || return 1 + cat <>"$conf" # AMD ROCm GPU lxc.cgroup2.devices.allow: c 226:* rwm lxc.cgroup2.devices.allow: c 238:* rwm lxc.mount.entry: /dev/kfd dev/kfd none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir EOF - return 0 } function main() { - header_info - select_hw_features - select_lxc_targets - for ctid in $SELECTED_CTIDS; do - local conf="/etc/pve/lxc/${ctid}.conf" - local updated=0 - for opt in $SELECTED_FEATURES; do - case "$opt" in - usb) apply_usb "$conf" && updated=1 ;; - intel) apply_intel "$conf" && updated=1 ;; - nvidia) apply_nvidia "$conf" && updated=1 ;; - amd) apply_amd "$conf" && updated=1 ;; - esac + header_info + detect_features + select_hw_features + select_lxc_targets + + local updated_cts=() + for ctid in $SELECTED_CTIDS; do + local conf="/etc/pve/lxc/${ctid}.conf" + local updated=0 + + for opt in $SELECTED_FEATURES; do + case "$opt" in + usb) apply_usb "$conf" && updated=1 ;; + intel) apply_intel "$conf" && updated=1 ;; + nvidia) apply_nvidia "$conf" && updated=1 ;; + amd) apply_amd "$conf" && updated=1 ;; + esac + done + + if [[ "$updated" -eq 1 ]]; then + updated_cts+=("$ctid") + fi done - if [[ "$updated" -eq 1 ]]; then - msg ok "Hardware passthrough updated in: $conf" - printf "\nRestart container %s to apply changes.\n\n" "$ctid" + + if [[ ${#updated_cts[@]} -gt 0 ]]; then + msg ok "Hardware passthrough applied to: ${updated_cts[*]}" + echo + if whiptail --title "Restart Containers" --yesno \ + "Restart the following containers now?\n\n${updated_cts[*]}" 12 50; then + for ctid in "${updated_cts[@]}"; do + pct restart "$ctid" + done + msg ok "Restarted containers: ${updated_cts[*]}" + else + msg info "You can restart them manually later." + fi else - msg warn "No passthrough changes applied for container $ctid" + msg warn "No changes were applied to any container." fi - done } main From e5c251f21c6a745f2ae0c56528c5bbee9efa7e0d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:21:16 +0100 Subject: [PATCH 0147/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 59 ++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 8c346a3..9c0a6c3 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -24,6 +24,8 @@ # - User group assignments (video/render) # - Interactive menu system via whiptail +#!/usr/bin/env bash + set -euo pipefail function header_info() { @@ -52,10 +54,10 @@ function msg() { function detect_features() { AVAILABLE_FEATURES=() - [[ -e /dev/ttyUSB0 || -e /dev/ttyACM0 ]] && AVAILABLE_FEATURES+=("usb" "🖧 USB Passthrough " OFF) - [[ -e /dev/dri/renderD128 ]] && AVAILABLE_FEATURES+=("intel" "🟦 Intel VAAPI GPU " OFF) - [[ -e /dev/nvidia0 ]] && AVAILABLE_FEATURES+=("nvidia" "🟨 NVIDIA GPU " OFF) - [[ -e /dev/kfd ]] && AVAILABLE_FEATURES+=("amd" "🟥 AMD GPU (ROCm) " OFF) + [[ -e /dev/ttyUSB0 || -e /dev/ttyACM0 ]] && AVAILABLE_FEATURES+=("usb" "USB Passthrough" OFF) + [[ -e /dev/dri/renderD128 ]] && AVAILABLE_FEATURES+=("intel" "Intel VAAPI GPU" OFF) + [[ -e /dev/nvidia0 ]] && AVAILABLE_FEATURES+=("nvidia" "NVIDIA GPU" OFF) + [[ -e /dev/kfd ]] && AVAILABLE_FEATURES+=("amd" "AMD GPU (ROCm)" OFF) if [[ ${#AVAILABLE_FEATURES[@]} -eq 0 ]]; then msg warn "No supported hardware found on host system." @@ -65,15 +67,15 @@ function detect_features() { function select_hw_features() { local opts - opts=$(whiptail --title "🔧 Hardware Options" --checklist \ - "\nSelect hardware features to passthrough:\n" 20 60 8 \ + opts=$(whiptail --title "Hardware Options" --checklist \ + "Select hardware features to passthrough:" 20 60 10 \ "${AVAILABLE_FEATURES[@]}" 3>&1 1>&2 2>&3) || exit 1 SELECTED_FEATURES=$(echo "$opts" | tr -d '"') - if [[ -z "$SELECTED_FEATURES" ]]; then + [[ -z "$SELECTED_FEATURES" ]] && { msg warn "No passthrough options selected." exit 1 - fi + } } function select_lxc_targets() { @@ -101,7 +103,8 @@ function select_lxc_targets() { function apply_usb() { local conf="$1" - grep -q "dev/ttyUSB" <<<"$(ls /dev 2>/dev/null)" || return 1 + grep -q "ttyUSB\|ttyACM" <<<"$(ls /dev 2>/dev/null)" || return 1 + grep -q "ttyUSB" "$conf" 2>/dev/null && return 0 cat <>"$conf" # USB Passthrough lxc.cgroup2.devices.allow: a @@ -119,6 +122,7 @@ EOF function apply_intel() { local conf="$1" [[ -e /dev/dri/renderD128 ]] || return 1 + grep -q "renderD128" "$conf" 2>/dev/null && return 0 cat <>"$conf" # Intel VAAPI lxc.cgroup2.devices.allow: c 226:* rwm @@ -132,6 +136,7 @@ EOF function apply_nvidia() { local conf="$1" [[ -e /dev/nvidia0 ]] || return 1 + grep -q "nvidia0" "$conf" 2>/dev/null && return 0 cat <>"$conf" # NVIDIA GPU lxc.cgroup2.devices.allow: c 195:* rwm @@ -145,6 +150,7 @@ EOF function apply_amd() { local conf="$1" [[ -e /dev/kfd ]] || return 1 + grep -q "/dev/kfd" "$conf" 2>/dev/null && return 0 cat <>"$conf" # AMD ROCm GPU lxc.cgroup2.devices.allow: c 226:* rwm @@ -154,6 +160,26 @@ lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir EOF } +function install_drivers() { + local ctid="$1" + for opt in $SELECTED_FEATURES; do + case "$opt" in + intel) + msg info "Installing Intel drivers in CT $ctid..." + pct exec "$ctid" -- bash -c "apt-get update && apt-get install -y va-driver-all vainfo intel-gpu-tools ocl-icd-libopencl1 intel-opencl-icd && adduser \$(id -un 0) video && adduser \$(id -un 0) render" >/dev/null 2>&1 + ;; + nvidia) + msg info "Installing NVIDIA drivers/tools in CT $ctid..." + pct exec "$ctid" -- bash -c "apt-get update && apt-get install -y nvidia-container-runtime nvidia-utils-525" >/dev/null 2>&1 || true + ;; + amd) + msg info "Installing AMD ROCm tools in CT $ctid..." + pct exec "$ctid" -- bash -c "apt-get update && apt-get install -y rocm-smi rocm-utils" >/dev/null 2>&1 || true + ;; + esac + done +} + function main() { header_info detect_features @@ -164,7 +190,6 @@ function main() { for ctid in $SELECTED_CTIDS; do local conf="/etc/pve/lxc/${ctid}.conf" local updated=0 - for opt in $SELECTED_FEATURES; do case "$opt" in usb) apply_usb "$conf" && updated=1 ;; @@ -173,26 +198,24 @@ function main() { amd) apply_amd "$conf" && updated=1 ;; esac done - if [[ "$updated" -eq 1 ]]; then updated_cts+=("$ctid") + install_drivers "$ctid" fi done if [[ ${#updated_cts[@]} -gt 0 ]]; then - msg ok "Hardware passthrough applied to: ${updated_cts[*]}" - echo - if whiptail --title "Restart Containers" --yesno \ - "Restart the following containers now?\n\n${updated_cts[*]}" 12 50; then + msg ok "Updated passthrough in container(s): ${updated_cts[*]}" + if whiptail --title "Restart Containers" --yesno "Restart now?\n${updated_cts[*]}" 10 60; then for ctid in "${updated_cts[@]}"; do pct restart "$ctid" done - msg ok "Restarted containers: ${updated_cts[*]}" + msg ok "Containers restarted: ${updated_cts[*]}" else - msg info "You can restart them manually later." + msg info "Reboot manually to apply changes." fi else - msg warn "No changes were applied to any container." + msg warn "No passthrough or driver changes were applied." fi } From 1be9bd2bd4b944dcbf6cdd8ab0ffefc68c4f5665 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:30:33 +0100 Subject: [PATCH 0148/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 61 +++++++++++++++++++------------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 9c0a6c3..3e77797 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -66,12 +66,10 @@ function detect_features() { } function select_hw_features() { - local opts - opts=$(whiptail --title "Hardware Options" --checklist \ + SELECTED_FEATURES=$(whiptail --title "Hardware Options" --checklist \ "Select hardware features to passthrough:" 20 60 10 \ - "${AVAILABLE_FEATURES[@]}" 3>&1 1>&2 2>&3) || exit 1 + "${AVAILABLE_FEATURES[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit 1 - SELECTED_FEATURES=$(echo "$opts" | tr -d '"') [[ -z "$SELECTED_FEATURES" ]] && { msg warn "No passthrough options selected." exit 1 @@ -79,17 +77,19 @@ function select_hw_features() { } function select_lxc_targets() { - local list local opts=() - list=$(pct list | awk 'NR>1 {print $1 "|" $2}') || return 1 - while IFS="|" read -r id name; do - [[ -f "/etc/pve/lxc/${id}.conf" ]] && opts+=("$id" "$name (CTID: $id)" OFF) - done <<<"$list" + while IFS= read -r line; do + local id name conf + id=$(awk '{print $1}' <<<"$line") + name=$(awk '{print $2}' <<<"$line") + conf="/etc/pve/lxc/${id}.conf" + [[ -f "$conf" ]] && opts+=("$id" "$name (CTID: $id)" OFF) + done < <(pct list | tail -n +2) - [[ ${#opts[@]} -eq 0 ]] && { - msg warn "No LXC containers found." + if [[ ${#opts[@]} -eq 0 ]]; then + msg warn "No containers found. Make sure you have running LXCs." exit 1 - } + fi SELECTED_CTIDS=$(whiptail --title "Select LXC Containers" --checklist \ "Choose container(s) to apply passthrough:" 20 60 10 \ @@ -165,16 +165,31 @@ function install_drivers() { for opt in $SELECTED_FEATURES; do case "$opt" in intel) - msg info "Installing Intel drivers in CT $ctid..." - pct exec "$ctid" -- bash -c "apt-get update && apt-get install -y va-driver-all vainfo intel-gpu-tools ocl-icd-libopencl1 intel-opencl-icd && adduser \$(id -un 0) video && adduser \$(id -un 0) render" >/dev/null 2>&1 + msg info "Installing Intel drivers/tools in CT $ctid..." + pct exec "$ctid" -- bash -c " + apt-get update -qq + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + va-driver-all vainfo intel-gpu-tools \ + ocl-icd-libopencl1 intel-opencl-icd >/dev/null + adduser root video >/dev/null 2>&1 || true + adduser root render >/dev/null 2>&1 || true + " ;; nvidia) - msg info "Installing NVIDIA drivers/tools in CT $ctid..." - pct exec "$ctid" -- bash -c "apt-get update && apt-get install -y nvidia-container-runtime nvidia-utils-525" >/dev/null 2>&1 || true + msg info "Installing NVIDIA container tools in CT $ctid..." + pct exec "$ctid" -- bash -c " + apt-get update -qq + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + nvidia-container-runtime nvidia-utils-525 >/dev/null 2>&1 || true + " ;; amd) msg info "Installing AMD ROCm tools in CT $ctid..." - pct exec "$ctid" -- bash -c "apt-get update && apt-get install -y rocm-smi rocm-utils" >/dev/null 2>&1 || true + pct exec "$ctid" -- bash -c " + apt-get update -qq + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + rocm-smi rocm-utils >/dev/null 2>&1 || true + " ;; esac done @@ -198,21 +213,19 @@ function main() { amd) apply_amd "$conf" && updated=1 ;; esac done - if [[ "$updated" -eq 1 ]]; then - updated_cts+=("$ctid") - install_drivers "$ctid" - fi + [[ "$updated" -eq 1 ]] && updated_cts+=("$ctid") + install_drivers "$ctid" done if [[ ${#updated_cts[@]} -gt 0 ]]; then - msg ok "Updated passthrough in container(s): ${updated_cts[*]}" - if whiptail --title "Restart Containers" --yesno "Restart now?\n${updated_cts[*]}" 10 60; then + msg ok "Hardware passthrough updated in: ${updated_cts[*]}" + if whiptail --yesno "Restart updated container(s)?\n${updated_cts[*]}" 10 60; then for ctid in "${updated_cts[@]}"; do pct restart "$ctid" done msg ok "Containers restarted: ${updated_cts[*]}" else - msg info "Reboot manually to apply changes." + msg info "Please restart the container(s) manually." fi else msg warn "No passthrough or driver changes were applied." From 7a971b0bb3a597f16afad126738417fbf4b4dff0 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:43:19 +0100 Subject: [PATCH 0149/1614] Create gpu-nvidia.func --- scripts/tools/gpu-nvidia.func | 133 ++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 scripts/tools/gpu-nvidia.func diff --git a/scripts/tools/gpu-nvidia.func b/scripts/tools/gpu-nvidia.func new file mode 100644 index 0000000..9d041b4 --- /dev/null +++ b/scripts/tools/gpu-nvidia.func @@ -0,0 +1,133 @@ +#!/usr/bin/env bash + +# NVIDIA GPU Integration for Proxmox LXC +# modular nvidia.func for LXC passthrough +# Author: CanbiZ +# License: MIT + +set -euo pipefail + +function nvidia_exit() { + printf "⚠️ User exited script\n" + exit 0 +} + +function nvidia_check_driver_installed() { + if ! command -v nvidia-smi &>/dev/null; then + return 1 + fi + return 0 +} + +function nvidia_get_driver_version() { + nvidia-smi --query-gpu=driver_version --format=csv,noheader,nounits 2>/dev/null | head -n1 +} + +function nvidia_get_cuda_version() { + nvidia-smi --query-gpu=cuda_version --format=csv,noheader,nounits 2>/dev/null | head -n1 +} + +function nvidia_validate_driver_version() { + if ! nvidia_check_driver_installed; then + printf "✘ NVIDIA drivers not found on host\n" + nvidia_exit + fi + local version + version=$(nvidia_get_driver_version) + local major=${version%%.*} + if ((major < 500)); then + printf "⚠ Detected old NVIDIA driver version: %s\n" "$version" + read -r -p "Proceed anyway? [y/N] " confirm + [[ "${confirm,,}" =~ ^(y|yes)$ ]] || nvidia_exit + fi +} + +function nvidia_validate_cuda_version() { + if ! nvidia_check_driver_installed; then + printf "✘ NVIDIA drivers not found on host\n" + nvidia_exit + fi + local version + version=$(nvidia_get_cuda_version) + local major=${version%%.*} + if ((major < 11)); then + printf "⚠ Detected old CUDA version: %s\n" "$version" + read -r -p "Proceed anyway? [y/N] " confirm + [[ "${confirm,,}" =~ ^(y|yes)$ ]] || nvidia_exit + fi +} + +function nvidia_setup_kernel_modules() { + local modfile="/etc/modules-load.d/nvidia.conf" + local udevfile="/etc/udev/rules.d/70-nvidia.rules" + + printf "nvidia\nnvidia_uvm\nnvidia_drm\n" >"$modfile" + + cat <"$udevfile" +KERNEL=="nvidia", RUN+="/bin/bash -c '/usr/bin/nvidia-smi -L && chmod 666 /dev/nvidia*'" +KERNEL=="nvidia_uvm", RUN+="/bin/bash -c '/usr/bin/nvidia-modprobe -c0 -u && chmod 0666 /dev/nvidia-uvm*'" +EOF + + printf "✔ NVIDIA kernel modules and udev rules applied\n" + printf "⚠ Please reboot the Proxmox host for changes to take effect\n" +} + +function nvidia_select_gpu_minor() { + local menu=() + local maxwidth=0 + while IFS= read -r devdir; do + local pci=${devdir##*/} + local info="/proc/driver/nvidia/gpus/${pci}/information" + [[ -f "$info" ]] || continue + local model minor + model=$(awk -F': ' '/Model:/ {print $2}' "$info") + minor=$(awk '/Device Minor/ {print $NF}' "$info") + menu+=("$minor" "$model" "OFF") + ((${#model} > maxwidth)) && maxwidth=${#model} + done < <(find /proc/driver/nvidia/gpus -mindepth 1 -type d) + + if ((${#menu[@]} == 0)); then + printf "✘ No NVIDIA GPU found\n" + return 1 + fi + + if ((${#menu[@]} == 3)); then + printf "%s\n" "${menu[0]}" + else + whiptail --title "NVIDIA GPU Selection" --radiolist \ + "Select the GPU to passthrough:" 15 $((maxwidth + 40)) 6 \ + "${menu[@]}" 3>&1 1>&2 2>&3 + fi +} + +function nvidia_lxc_passthrough() { + local container_id="$1" + local minor="$2" + local config="/etc/pve/lxc/${container_id}.conf" + + local devices=( + "/dev/nvidia${minor}" + "/dev/nvidiactl" + "/dev/nvidia-uvm" + "/dev/nvidia-uvm-tools" + ) + + local devnum_list=() + + for dev in "${devices[@]}"; do + [[ -e "$dev" ]] || continue + local major + major=$(stat -c '%t' "$dev") + local dec_major=$((16#$major)) + devnum_list+=("$dec_major") + echo "lxc.mount.entry: $dev ${dev##*/} none bind,optional,create=file" >>"$config" + done + + echo "lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir" >>"$config" + + for num in "${devnum_list[@]}"; do + echo "lxc.cgroup2.devices.allow: c ${num}:* rwm" >>"$config" + done + + printf "✔ NVIDIA passthrough configured for CT %s\n" "$container_id" +} From c8110be7602e5ea4fef6d6602b7b3ef0a821ba84 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:50:34 +0100 Subject: [PATCH 0150/1614] gpu things --- scripts/tools/gpu-amd.func | 61 ++++++++ scripts/tools/gpu-intel.func | 62 ++++++++ scripts/tools/hw-acceleration.sh | 241 +++++++++++++------------------ 3 files changed, 227 insertions(+), 137 deletions(-) create mode 100644 scripts/tools/gpu-amd.func create mode 100644 scripts/tools/gpu-intel.func diff --git a/scripts/tools/gpu-amd.func b/scripts/tools/gpu-amd.func new file mode 100644 index 0000000..412d0a0 --- /dev/null +++ b/scripts/tools/gpu-amd.func @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# AMD GPU Helper Functions for Proxmox LXC / ROCm passthrough +# Author: CanbiZ +# License: MIT + +set -euo pipefail + +function exit_script() { + printf "⚠️ User exited script\n" + exit 0 +} + +function msg() { + local type="$1" + shift + case "$type" in + info) printf " \033[36m➤\033[0m %s\n" "$@" ;; + ok) printf " \033[32m✔\033[0m %s\n" "$@" ;; + warn) printf " \033[33m⚠\033[0m %s\n" "$@" >&2 ;; + err) printf " \033[31m✘\033[0m %s\n" "$@" >&2 ;; + esac +} + +function amd_gpu_available() { + lspci | grep -qi 'VGA.*AMD' && [[ -e /dev/kfd ]] +} + +function passthrough_amd_to_lxc() { + local ctid="$1" + local conf="/etc/pve/lxc/${ctid}.conf" + + if ! amd_gpu_available; then + msg warn "No AMD GPU with ROCm support detected" + return 1 + fi + + { + echo "# AMD ROCm GPU" + echo "lxc.cgroup2.devices.allow: c 226:* rwm" + echo "lxc.cgroup2.devices.allow: c 238:* rwm" + echo "lxc.mount.entry: /dev/kfd dev/kfd none bind,optional,create=file" + echo "lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir" + } >>"$conf" + + msg ok "AMD ROCm passthrough applied to CT $ctid" + return 0 +} + +function install_amd_tools_in_ct() { + local ctid="$1" + msg info "Installing AMD GPU tools in CT $ctid..." + + pct exec "$ctid" -- bash -c \ + "apt-get update && \ + apt-get install -y rocm-smi rocm-utils && \ + adduser \$(id -un 0) video && \ + adduser \$(id -un 0) render" >/dev/null 2>&1 || true + + msg ok "Installed ROCm tools inside CT $ctid" +} diff --git a/scripts/tools/gpu-intel.func b/scripts/tools/gpu-intel.func new file mode 100644 index 0000000..43e82e1 --- /dev/null +++ b/scripts/tools/gpu-intel.func @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# Intel GPU Helper Functions for Proxmox LXC / VAAPI passthrough +# Author: CanbiZ +# License: MIT + +set -euo pipefail + +function exit_script() { + printf "⚠️ User exited script\n" + exit 0 +} + +function msg() { + local type="$1" + shift + case "$type" in + info) printf " \033[36m➤\033[0m %s\n" "$@" ;; + ok) printf " \033[32m✔\033[0m %s\n" "$@" ;; + warn) printf " \033[33m⚠\033[0m %s\n" "$@" >&2 ;; + err) printf " \033[31m✘\033[0m %s\n" "$@" >&2 ;; + esac +} + +function intel_gpu_available() { + [[ -e /dev/dri/renderD128 ]] && lspci | grep -qi 'VGA.*Intel' +} + +function passthrough_intel_to_lxc() { + local ctid="$1" + local conf="/etc/pve/lxc/${ctid}.conf" + + if ! intel_gpu_available; then + msg warn "No Intel iGPU detected on host" + return 1 + fi + + { + echo "# Intel iGPU (VAAPI)" + echo "lxc.cgroup2.devices.allow: c 226:* rwm" + echo "lxc.cgroup2.devices.allow: c 29:0 rwm" + echo "lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file" + echo "lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir" + echo "lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file" + } >>"$conf" + + msg ok "Intel VAAPI passthrough applied to CT $ctid" + return 0 +} + +function install_intel_tools_in_ct() { + local ctid="$1" + msg info "Installing Intel tools in CT $ctid..." + + pct exec "$ctid" -- bash -c \ + "apt-get update && \ + apt-get install -y va-driver-all vainfo intel-gpu-tools ocl-icd-libopencl1 intel-opencl-icd && \ + adduser \$(id -un 0) video && \ + adduser \$(id -un 0) render" >/dev/null 2>&1 + + msg ok "Installed VAAPI & GPU tools inside CT $ctid" +} diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 3e77797..2d412c6 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -23,11 +23,19 @@ # - Container driver installation via APT # - User group assignments (video/render) # - Interactive menu system via whiptail - -#!/usr/bin/env bash +# +# Proxmox LXC Hardware Passthrough & GPU Acceleration Setup +# https://github.com/community-scripts/ProxmoxVED set -euo pipefail +TEMP_DIR=$(mktemp -d) +trap 'rm -rf $TEMP_DIR' EXIT + +source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-nvidia.func) +source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-intel.func) +source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-amd.func) + function header_info() { clear cat <<"EOF" @@ -45,66 +53,82 @@ function msg() { local type="$1" shift case "$type" in - info) printf " \033[36m➤\033[0m %s\n" "$*" ;; - ok) printf " \033[32m✔\033[0m %s\n" "$*" ;; - warn) printf " \033[33m⚠\033[0m %s\n" "$*" >&2 ;; - err) printf " \033[31m✘\033[0m %s\n" "$*" >&2 ;; + info) printf " \033[36m➤\033[0m %s\n" "$@" ;; + ok) printf " \033[32m✔\033[0m %s\n" "$@" ;; + warn) printf " \033[33m⚠\033[0m %s\n" "$@" >&2 ;; + err) printf " \033[31m✘\033[0m %s\n" "$@" >&2 ;; esac } -function detect_features() { - AVAILABLE_FEATURES=() - [[ -e /dev/ttyUSB0 || -e /dev/ttyACM0 ]] && AVAILABLE_FEATURES+=("usb" "USB Passthrough" OFF) - [[ -e /dev/dri/renderD128 ]] && AVAILABLE_FEATURES+=("intel" "Intel VAAPI GPU" OFF) - [[ -e /dev/nvidia0 ]] && AVAILABLE_FEATURES+=("nvidia" "NVIDIA GPU" OFF) - [[ -e /dev/kfd ]] && AVAILABLE_FEATURES+=("amd" "AMD GPU (ROCm)" OFF) +function prompt_features() { + local features=() + printf "\nAvailable features:\n" + if [[ -e /dev/ttyUSB0 || -e /dev/ttyACM0 ]]; then + echo " [1] USB Passthrough" + features+=("usb") + fi + if [[ -e /dev/dri/renderD128 ]]; then + echo " [2] Intel iGPU (VAAPI)" + features+=("intel") + fi + if [[ -e /dev/nvidia0 ]]; then + echo " [3] NVIDIA GPU" + features+=("nvidia") + fi + if [[ -e /dev/kfd ]]; then + echo " [4] AMD GPU (ROCm)" + features+=("amd") + fi - if [[ ${#AVAILABLE_FEATURES[@]} -eq 0 ]]; then - msg warn "No supported hardware found on host system." + if [[ ${#features[@]} -eq 0 ]]; then + msg err "No supported hardware found on host." + exit 1 + fi + + echo + read -rp "Enter number(s) separated by space (e.g. 1 3): " choices + SELECTED_FEATURES=() + for i in $choices; do + case "$i" in + 1) SELECTED_FEATURES+=("usb") ;; + 2) SELECTED_FEATURES+=("intel") ;; + 3) SELECTED_FEATURES+=("nvidia") ;; + 4) SELECTED_FEATURES+=("amd") ;; + esac + done + + if [[ ${#SELECTED_FEATURES[@]} -eq 0 ]]; then + msg warn "No valid feature selected." exit 1 fi } -function select_hw_features() { - SELECTED_FEATURES=$(whiptail --title "Hardware Options" --checklist \ - "Select hardware features to passthrough:" 20 60 10 \ - "${AVAILABLE_FEATURES[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit 1 - - [[ -z "$SELECTED_FEATURES" ]] && { - msg warn "No passthrough options selected." - exit 1 - } -} - -function select_lxc_targets() { - local opts=() - while IFS= read -r line; do - local id name conf - id=$(awk '{print $1}' <<<"$line") - name=$(awk '{print $2}' <<<"$line") - conf="/etc/pve/lxc/${id}.conf" - [[ -f "$conf" ]] && opts+=("$id" "$name (CTID: $id)" OFF) - done < <(pct list | tail -n +2) - - if [[ ${#opts[@]} -eq 0 ]]; then - msg warn "No containers found. Make sure you have running LXCs." +function select_lxc_cts() { + mapfile -t containers < <(pct list | awk 'NR>1 {print $1 "|" $2}') + if [[ ${#containers[@]} -eq 0 ]]; then + msg warn "No LXC containers found." exit 1 fi - SELECTED_CTIDS=$(whiptail --title "Select LXC Containers" --checklist \ - "Choose container(s) to apply passthrough:" 20 60 10 \ - "${opts[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit 1 + echo + echo "Available Containers:" + for entry in "${containers[@]}"; do + ctid="${entry%%|*}" + name="${entry##*|}" + echo " [$ctid] $name" + done - [[ -z "$SELECTED_CTIDS" ]] && { + echo + read -rp "Enter container ID(s) separated by space: " SELECTED_CTIDS + if [[ -z "$SELECTED_CTIDS" ]]; then msg warn "No containers selected." exit 1 - } + fi } -function apply_usb() { +function apply_usb_passthrough() { local conf="$1" - grep -q "ttyUSB\|ttyACM" <<<"$(ls /dev 2>/dev/null)" || return 1 - grep -q "ttyUSB" "$conf" 2>/dev/null && return 0 + grep -q "ttyUSB" "$conf" 2>/dev/null && return cat <>"$conf" # USB Passthrough lxc.cgroup2.devices.allow: a @@ -119,116 +143,59 @@ lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create= EOF } -function apply_intel() { - local conf="$1" - [[ -e /dev/dri/renderD128 ]] || return 1 - grep -q "renderD128" "$conf" 2>/dev/null && return 0 - cat <>"$conf" -# Intel VAAPI -lxc.cgroup2.devices.allow: c 226:* rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file -EOF -} - -function apply_nvidia() { - local conf="$1" - [[ -e /dev/nvidia0 ]] || return 1 - grep -q "nvidia0" "$conf" 2>/dev/null && return 0 - cat <>"$conf" -# NVIDIA GPU -lxc.cgroup2.devices.allow: c 195:* rwm -lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file -lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file -lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file -lxc.mount.entry: /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file -EOF -} - -function apply_amd() { - local conf="$1" - [[ -e /dev/kfd ]] || return 1 - grep -q "/dev/kfd" "$conf" 2>/dev/null && return 0 - cat <>"$conf" -# AMD ROCm GPU -lxc.cgroup2.devices.allow: c 226:* rwm -lxc.cgroup2.devices.allow: c 238:* rwm -lxc.mount.entry: /dev/kfd dev/kfd none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -EOF -} - -function install_drivers() { - local ctid="$1" - for opt in $SELECTED_FEATURES; do - case "$opt" in - intel) - msg info "Installing Intel drivers/tools in CT $ctid..." - pct exec "$ctid" -- bash -c " - apt-get update -qq - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - va-driver-all vainfo intel-gpu-tools \ - ocl-icd-libopencl1 intel-opencl-icd >/dev/null - adduser root video >/dev/null 2>&1 || true - adduser root render >/dev/null 2>&1 || true - " - ;; - nvidia) - msg info "Installing NVIDIA container tools in CT $ctid..." - pct exec "$ctid" -- bash -c " - apt-get update -qq - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - nvidia-container-runtime nvidia-utils-525 >/dev/null 2>&1 || true - " - ;; - amd) - msg info "Installing AMD ROCm tools in CT $ctid..." - pct exec "$ctid" -- bash -c " - apt-get update -qq - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - rocm-smi rocm-utils >/dev/null 2>&1 || true - " - ;; - esac - done -} - function main() { header_info - detect_features - select_hw_features - select_lxc_targets + prompt_features + select_lxc_cts local updated_cts=() + for ctid in $SELECTED_CTIDS; do local conf="/etc/pve/lxc/${ctid}.conf" local updated=0 - for opt in $SELECTED_FEATURES; do - case "$opt" in - usb) apply_usb "$conf" && updated=1 ;; - intel) apply_intel "$conf" && updated=1 ;; - nvidia) apply_nvidia "$conf" && updated=1 ;; - amd) apply_amd "$conf" && updated=1 ;; + + for feature in "${SELECTED_FEATURES[@]}"; do + case "$feature" in + usb) + msg info "Applying USB passthrough to CT $ctid..." + apply_usb_passthrough "$conf" && updated=1 + ;; + intel) + msg info "Applying Intel VAAPI passthrough to CT $ctid..." + passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" && updated=1 + ;; + amd) + msg info "Applying AMD GPU passthrough to CT $ctid..." + passthrough_amd_to_lxc "$ctid" && install_amd_tools_in_ct "$ctid" && updated=1 + ;; + nvidia) + msg info "Checking NVIDIA GPU on host..." + check_nvidia_driver_status && check_cuda_version + gpu_minor=$(select_nvidia_gpu) || continue + passthrough_nvidia_to_lxc "$ctid" "$gpu_minor" && updated=1 + ;; esac done - [[ "$updated" -eq 1 ]] && updated_cts+=("$ctid") - install_drivers "$ctid" + + if [[ "$updated" -eq 1 ]]; then + updated_cts+=("$ctid") + fi done + echo if [[ ${#updated_cts[@]} -gt 0 ]]; then - msg ok "Hardware passthrough updated in: ${updated_cts[*]}" - if whiptail --yesno "Restart updated container(s)?\n${updated_cts[*]}" 10 60; then + msg ok "Updated: ${updated_cts[*]}" + read -rp "Restart updated container(s)? [y/N]: " restart + if [[ "${restart,,}" == "y" ]]; then for ctid in "${updated_cts[@]}"; do pct restart "$ctid" + msg ok "Restarted container $ctid" done - msg ok "Containers restarted: ${updated_cts[*]}" else - msg info "Please restart the container(s) manually." + msg info "Manual restart required for: ${updated_cts[*]}" fi else - msg warn "No passthrough or driver changes were applied." + msg warn "No passthrough applied." fi } From 69a2c237020ffa6c20ec22b158a96ee9039cdaba Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:53:00 +0100 Subject: [PATCH 0151/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 2d412c6..712fd0a 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -188,7 +188,7 @@ function main() { read -rp "Restart updated container(s)? [y/N]: " restart if [[ "${restart,,}" == "y" ]]; then for ctid in "${updated_cts[@]}"; do - pct restart "$ctid" + pct reboot "$ctid" msg ok "Restarted container $ctid" done else From 8730d651d853f599ac983416b6a99580ff73a5c4 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Thu, 27 Mar 2025 10:20:22 -0400 Subject: [PATCH 0152/1614] reactive-resume: have browserless and minio listen on localhost only Mostly. --- install/reactive-resume-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh index 092e1ee..f9a25eb 100644 --- a/install/reactive-resume-install.sh +++ b/install/reactive-resume-install.sh @@ -87,6 +87,7 @@ cat </opt/minio/.env MINIO_ROOT_USER="storageadmin" MINIO_ROOT_PASSWORD="${MINIO_PASS}" MINIO_VOLUMES=/opt/minio +MINIO_OPTS="--address :9000 --console-address 127.0.0.1:9001" EOF cat </opt/${APPLICATION}/.env NODE_ENV=production @@ -98,11 +99,11 @@ ACCESS_TOKEN_SECRET=${ACCESS_TOKEN} REFRESH_TOKEN_SECRET=${REFRESH_TOKEN} CHROME_PORT=8080 CHROME_TOKEN=${CHROME_TOKEN} -CHROME_URL=ws://${LOCAL_IP}:8080 +CHROME_URL=ws://localhost:8080 CHROME_IGNORE_HTTPS_ERRORS=true MAIL_FROM=noreply@locahost # SMTP_URL=smtp://username:password@smtp.server.mail:587 # -STORAGE_ENDPOINT=${LOCAL_IP} +STORAGE_ENDPOINT=localhost STORAGE_PORT=9000 STORAGE_REGION=us-east-1 STORAGE_BUCKET=rxresume @@ -123,7 +124,7 @@ STORAGE_SKIP_BUCKET_CHECK=false EOF cat </opt/browserless/.env DEBUG=browserless*,-**:verbose -HOST=${LOCAL_IP} +HOST=localhost PORT=8080 TOKEN=${CHROME_TOKEN} EOF From c88bea8220e26070266916b8c6eaad7de9b92d03 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 15:22:43 +0100 Subject: [PATCH 0153/1614] fixes --- scripts/tools/gpu-amd.func | 19 +++-- scripts/tools/gpu-intel.func | 37 +++++++-- scripts/tools/gpu-nvidia.func | 99 ++++++++++++------------ scripts/tools/hw-acceleration.sh | 125 ++++++++++--------------------- 4 files changed, 130 insertions(+), 150 deletions(-) diff --git a/scripts/tools/gpu-amd.func b/scripts/tools/gpu-amd.func index 412d0a0..08fed44 100644 --- a/scripts/tools/gpu-amd.func +++ b/scripts/tools/gpu-amd.func @@ -35,6 +35,8 @@ function passthrough_amd_to_lxc() { return 1 fi + grep -q "/dev/kfd" "$conf" 2>/dev/null && return 0 + { echo "# AMD ROCm GPU" echo "lxc.cgroup2.devices.allow: c 226:* rwm" @@ -49,13 +51,18 @@ function passthrough_amd_to_lxc() { function install_amd_tools_in_ct() { local ctid="$1" - msg info "Installing AMD GPU tools in CT $ctid..." - pct exec "$ctid" -- bash -c \ - "apt-get update && \ - apt-get install -y rocm-smi rocm-utils && \ - adduser \$(id -un 0) video && \ - adduser \$(id -un 0) render" >/dev/null 2>&1 || true + if pct exec "$ctid" -- grep -qi alpine /etc/os-release; then + msg warn "Skipping tool installation: Alpine container detected" + return 0 + fi + + msg info "Installing AMD GPU tools in CT $ctid..." + pct exec "$ctid" -- bash -c " + apt-get update && + DEBIAN_FRONTEND=noninteractive apt-get install -y rocm-smi rocm-utils && + adduser \$(id -un 0) video && + adduser \$(id -un 0) render" >/dev/null 2>&1 || true msg ok "Installed ROCm tools inside CT $ctid" } diff --git a/scripts/tools/gpu-intel.func b/scripts/tools/gpu-intel.func index 43e82e1..233ecb4 100644 --- a/scripts/tools/gpu-intel.func +++ b/scripts/tools/gpu-intel.func @@ -26,6 +26,11 @@ function intel_gpu_available() { [[ -e /dev/dri/renderD128 ]] && lspci | grep -qi 'VGA.*Intel' } +function is_alpine_ct() { + local ctid="$1" + pct exec "$ctid" -- sh -c 'grep -qi alpine /etc/os-release' >/dev/null 2>&1 +} + function passthrough_intel_to_lxc() { local ctid="$1" local conf="/etc/pve/lxc/${ctid}.conf" @@ -50,13 +55,33 @@ function passthrough_intel_to_lxc() { function install_intel_tools_in_ct() { local ctid="$1" + + if is_alpine_ct "$ctid"; then + msg warn "Skipping Intel tool install for Alpine CT $ctid" + return 0 + fi + + read -rp "Install non-free intel-media-va-driver (Debian only)? [y/N]: " confirm + if [[ "${confirm,,}" =~ ^(y|yes)$ ]]; then + msg info "Enabling non-free sources in $ctid..." + pct exec "$ctid" -- bash -c " +cat </etc/apt/sources.list.d/non-free.list +deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware +deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware +deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware +EOF + " + fi + msg info "Installing Intel tools in CT $ctid..." - pct exec "$ctid" -- bash -c \ - "apt-get update && \ - apt-get install -y va-driver-all vainfo intel-gpu-tools ocl-icd-libopencl1 intel-opencl-icd && \ - adduser \$(id -un 0) video && \ - adduser \$(id -un 0) render" >/dev/null 2>&1 + pct exec "$ctid" -- bash -c " + apt-get update -qq + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + va-driver-all vainfo intel-gpu-tools ocl-icd-libopencl1 intel-opencl-icd intel-media-va-driver-non-free >/dev/null 2>&1 + adduser root video >/dev/null 2>&1 || true + adduser root render >/dev/null 2>&1 || true + " - msg ok "Installed VAAPI & GPU tools inside CT $ctid" + msg ok "Installed Intel VAAPI tools in $ctid" } diff --git a/scripts/tools/gpu-nvidia.func b/scripts/tools/gpu-nvidia.func index 9d041b4..da22311 100644 --- a/scripts/tools/gpu-nvidia.func +++ b/scripts/tools/gpu-nvidia.func @@ -1,7 +1,6 @@ #!/usr/bin/env bash # NVIDIA GPU Integration for Proxmox LXC -# modular nvidia.func for LXC passthrough # Author: CanbiZ # License: MIT @@ -12,11 +11,19 @@ function nvidia_exit() { exit 0 } +function msg() { + local type="$1" + shift + case "$type" in + info) printf " \033[36m➤\033[0m %s\n" "$@" ;; + ok) printf " \033[32m✔\033[0m %s\n" "$@" ;; + warn) printf " \033[33m⚠\033[0m %s\n" "$@" >&2 ;; + err) printf " \033[31m✘\033[0m %s\n" "$@" >&2 ;; + esac +} + function nvidia_check_driver_installed() { - if ! command -v nvidia-smi &>/dev/null; then - return 1 - fi - return 0 + command -v nvidia-smi &>/dev/null } function nvidia_get_driver_version() { @@ -29,30 +36,30 @@ function nvidia_get_cuda_version() { function nvidia_validate_driver_version() { if ! nvidia_check_driver_installed; then - printf "✘ NVIDIA drivers not found on host\n" + msg err "NVIDIA drivers not found" nvidia_exit fi - local version - version=$(nvidia_get_driver_version) - local major=${version%%.*} + local ver major + ver=$(nvidia_get_driver_version) + major=${ver%%.*} if ((major < 500)); then - printf "⚠ Detected old NVIDIA driver version: %s\n" "$version" - read -r -p "Proceed anyway? [y/N] " confirm + msg warn "Detected old NVIDIA driver version: $ver" + read -rp "Continue anyway? [y/N]: " confirm [[ "${confirm,,}" =~ ^(y|yes)$ ]] || nvidia_exit fi } function nvidia_validate_cuda_version() { if ! nvidia_check_driver_installed; then - printf "✘ NVIDIA drivers not found on host\n" + msg err "NVIDIA drivers not found" nvidia_exit fi - local version - version=$(nvidia_get_cuda_version) - local major=${version%%.*} + local ver major + ver=$(nvidia_get_cuda_version) + major=${ver%%.*} if ((major < 11)); then - printf "⚠ Detected old CUDA version: %s\n" "$version" - read -r -p "Proceed anyway? [y/N] " confirm + msg warn "Detected old CUDA version: $ver" + read -rp "Continue anyway? [y/N]: " confirm [[ "${confirm,,}" =~ ^(y|yes)$ ]] || nvidia_exit fi } @@ -68,43 +75,34 @@ KERNEL=="nvidia", RUN+="/bin/bash -c '/usr/bin/nvidia-smi -L && chmod 666 /dev/n KERNEL=="nvidia_uvm", RUN+="/bin/bash -c '/usr/bin/nvidia-modprobe -c0 -u && chmod 0666 /dev/nvidia-uvm*'" EOF - printf "✔ NVIDIA kernel modules and udev rules applied\n" - printf "⚠ Please reboot the Proxmox host for changes to take effect\n" + msg ok "NVIDIA modules configured" + msg warn "Reboot the host to apply kernel changes" } function nvidia_select_gpu_minor() { - local menu=() - local maxwidth=0 - while IFS= read -r devdir; do - local pci=${devdir##*/} - local info="/proc/driver/nvidia/gpus/${pci}/information" + local menu=() max=0 + while IFS= read -r path; do + local dev="${path##*/}" + local info="/proc/driver/nvidia/gpus/${dev}/information" [[ -f "$info" ]] || continue local model minor model=$(awk -F': ' '/Model:/ {print $2}' "$info") minor=$(awk '/Device Minor/ {print $NF}' "$info") menu+=("$minor" "$model" "OFF") - ((${#model} > maxwidth)) && maxwidth=${#model} + (( ${#model} > max )) && max=${#model} done < <(find /proc/driver/nvidia/gpus -mindepth 1 -type d) - if ((${#menu[@]} == 0)); then - printf "✘ No NVIDIA GPU found\n" - return 1 - fi + [[ ${#menu[@]} -eq 0 ]] && msg err "No NVIDIA GPU found" && return 1 + [[ ${#menu[@]} -eq 3 ]] && printf "%s" "${menu[0]}" && return - if ((${#menu[@]} == 3)); then - printf "%s\n" "${menu[0]}" - else - whiptail --title "NVIDIA GPU Selection" --radiolist \ - "Select the GPU to passthrough:" 15 $((maxwidth + 40)) 6 \ - "${menu[@]}" 3>&1 1>&2 2>&3 - fi + whiptail --title "NVIDIA GPU Selection" --radiolist \ + "Select GPU for passthrough:" 15 $((max + 40)) 6 \ + "${menu[@]}" 3>&1 1>&2 2>&3 } function nvidia_lxc_passthrough() { - local container_id="$1" - local minor="$2" - local config="/etc/pve/lxc/${container_id}.conf" - + local ctid="$1" minor="$2" + local conf="/etc/pve/lxc/${ctid}.conf" local devices=( "/dev/nvidia${minor}" "/dev/nvidiactl" @@ -112,22 +110,19 @@ function nvidia_lxc_passthrough() { "/dev/nvidia-uvm-tools" ) - local devnum_list=() - + local devnums=() for dev in "${devices[@]}"; do [[ -e "$dev" ]] || continue - local major - major=$(stat -c '%t' "$dev") - local dec_major=$((16#$major)) - devnum_list+=("$dec_major") - echo "lxc.mount.entry: $dev ${dev##*/} none bind,optional,create=file" >>"$config" + local major_hex + major_hex=$(stat -c '%t' "$dev") + devnums+=($((16#$major_hex))) + echo "lxc.mount.entry: $dev ${dev##*/} none bind,optional,create=file" >>"$conf" done - echo "lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir" >>"$config" + echo "lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir" >>"$conf" - for num in "${devnum_list[@]}"; do - echo "lxc.cgroup2.devices.allow: c ${num}:* rwm" >>"$config" + for n in "${devnums[@]}"; do + echo "lxc.cgroup2.devices.allow: c ${n}:* rwm" >>"$conf" done - printf "✔ NVIDIA passthrough configured for CT %s\n" "$container_id" -} + msg ok "NVIDIA passt diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 712fd0a..886c514 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -1,39 +1,16 @@ #!/usr/bin/env bash -# + # Title: Proxmox LXC Hardware Passthrough & GPU Acceleration Setup -# Description: Enables hardware passthrough for USB, Intel, NVIDIA, AMD GPUs inside privileged LXC containers. -# Installs optional drivers/tools inside the container (vainfo, intel-gpu-tools, OpenCL, etc.) -# Only supports PRIVILEGED containers for GPU passthrough. -# License: MIT -# Author: MickLesk (CanbiZ) -# Repo: https://github.com/community-scripts/ProxmoxVED -# -# Usage: bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/misc/hw-acceleration.sh)" -# -# Requires: -# - Proxmox VE 8.1+ -# - Privileged LXC Containers -# - GPU device available on host -# -# Features: -# - USB Serial Passthrough -# - Intel VAAPI passthrough + (optional) non-free drivers -# - NVIDIA GPU passthrough for LXC (binds /dev/nvidia*) -# - AMD GPU passthrough (experimental) -# - Container driver installation via APT -# - User group assignments (video/render) -# - Interactive menu system via whiptail -# -# Proxmox LXC Hardware Passthrough & GPU Acceleration Setup -# https://github.com/community-scripts/ProxmoxVED +# Maintainer: https://github.com/community-scripts/ProxmoxVED +# Includes: gpu-intel.func, gpu-nvidia.func, gpu-amd.func set -euo pipefail TEMP_DIR=$(mktemp -d) trap 'rm -rf $TEMP_DIR' EXIT -source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-nvidia.func) source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-intel.func) +source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-nvidia.func) source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-amd.func) function header_info() { @@ -62,31 +39,14 @@ function msg() { function prompt_features() { local features=() - printf "\nAvailable features:\n" - if [[ -e /dev/ttyUSB0 || -e /dev/ttyACM0 ]]; then - echo " [1] USB Passthrough" - features+=("usb") - fi - if [[ -e /dev/dri/renderD128 ]]; then - echo " [2] Intel iGPU (VAAPI)" - features+=("intel") - fi - if [[ -e /dev/nvidia0 ]]; then - echo " [3] NVIDIA GPU" - features+=("nvidia") - fi - if [[ -e /dev/kfd ]]; then - echo " [4] AMD GPU (ROCm)" - features+=("amd") - fi - - if [[ ${#features[@]} -eq 0 ]]; then - msg err "No supported hardware found on host." - exit 1 - fi - + printf "\nAvailable passthrough options:\n" + [[ -e /dev/ttyUSB0 || -e /dev/ttyACM0 ]] && echo " [1] USB" && features+=("usb") + [[ -e /dev/dri/renderD128 ]] && echo " [2] Intel VAAPI" && features+=("intel") + [[ -e /dev/nvidia0 ]] && echo " [3] NVIDIA GPU" && features+=("nvidia") + [[ -e /dev/kfd ]] && echo " [4] AMD GPU" && features+=("amd") + [[ ${#features[@]} -eq 0 ]] && msg err "No supported hardware detected." && exit 1 echo - read -rp "Enter number(s) separated by space (e.g. 1 3): " choices + read -rp "Select hardware (e.g. 1 3): " choices SELECTED_FEATURES=() for i in $choices; do case "$i" in @@ -96,20 +56,12 @@ function prompt_features() { 4) SELECTED_FEATURES+=("amd") ;; esac done - - if [[ ${#SELECTED_FEATURES[@]} -eq 0 ]]; then - msg warn "No valid feature selected." - exit 1 - fi + [[ ${#SELECTED_FEATURES[@]} -eq 0 ]] && msg warn "No valid feature selected." && exit 1 } function select_lxc_cts() { mapfile -t containers < <(pct list | awk 'NR>1 {print $1 "|" $2}') - if [[ ${#containers[@]} -eq 0 ]]; then - msg warn "No LXC containers found." - exit 1 - fi - + [[ ${#containers[@]} -eq 0 ]] && msg warn "No LXC containers found." && exit 1 echo echo "Available Containers:" for entry in "${containers[@]}"; do @@ -117,20 +69,21 @@ function select_lxc_cts() { name="${entry##*|}" echo " [$ctid] $name" done - echo read -rp "Enter container ID(s) separated by space: " SELECTED_CTIDS - if [[ -z "$SELECTED_CTIDS" ]]; then - msg warn "No containers selected." - exit 1 - fi + [[ -z "$SELECTED_CTIDS" ]] && msg warn "No containers selected." && exit 1 +} + +function is_alpine_container() { + local ctid="$1" + pct exec "$ctid" -- sh -c 'grep -qi alpine /etc/os-release' >/dev/null 2>&1 } function apply_usb_passthrough() { local conf="$1" grep -q "ttyUSB" "$conf" 2>/dev/null && return cat <>"$conf" -# USB Passthrough +# USB Serial Passthrough lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm @@ -157,45 +110,45 @@ function main() { for feature in "${SELECTED_FEATURES[@]}"; do case "$feature" in usb) - msg info "Applying USB passthrough to CT $ctid..." + msg info "Adding USB passthrough to CT $ctid..." apply_usb_passthrough "$conf" && updated=1 ;; intel) - msg info "Applying Intel VAAPI passthrough to CT $ctid..." + msg info "Intel passthrough setup for CT $ctid" passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" && updated=1 ;; - amd) - msg info "Applying AMD GPU passthrough to CT $ctid..." - passthrough_amd_to_lxc "$ctid" && install_amd_tools_in_ct "$ctid" && updated=1 - ;; nvidia) - msg info "Checking NVIDIA GPU on host..." - check_nvidia_driver_status && check_cuda_version - gpu_minor=$(select_nvidia_gpu) || continue - passthrough_nvidia_to_lxc "$ctid" "$gpu_minor" && updated=1 + msg info "Validating NVIDIA setup..." + nvidia_validate_driver_version + nvidia_validate_cuda_version + local minor + minor=$(nvidia_select_gpu_minor) + nvidia_lxc_passthrough "$ctid" "$minor" && updated=1 + ;; + amd) + msg info "Applying AMD passthrough to CT $ctid..." + passthrough_amd_to_lxc "$ctid" && install_amd_tools_in_ct "$ctid" && updated=1 ;; esac done - if [[ "$updated" -eq 1 ]]; then - updated_cts+=("$ctid") - fi + [[ "$updated" -eq 1 ]] && updated_cts+=("$ctid") done echo if [[ ${#updated_cts[@]} -gt 0 ]]; then - msg ok "Updated: ${updated_cts[*]}" - read -rp "Restart updated container(s)? [y/N]: " restart - if [[ "${restart,,}" == "y" ]]; then + msg ok "Updated containers: ${updated_cts[*]}" + read -rp "Restart updated container(s)? [y/N]: " confirm + if [[ "${confirm,,}" == "y" ]]; then for ctid in "${updated_cts[@]}"; do pct reboot "$ctid" - msg ok "Restarted container $ctid" + msg ok "Restarted CT $ctid" done else - msg info "Manual restart required for: ${updated_cts[*]}" + msg info "Restart skipped." fi else - msg warn "No passthrough applied." + msg warn "No passthrough changes applied." fi } From c3743269401e7798ef6b9c817bdf1175192ba945 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 15:28:17 +0100 Subject: [PATCH 0154/1614] Update gpu-intel.func --- scripts/tools/gpu-intel.func | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/tools/gpu-intel.func b/scripts/tools/gpu-intel.func index 233ecb4..6e86a26 100644 --- a/scripts/tools/gpu-intel.func +++ b/scripts/tools/gpu-intel.func @@ -64,13 +64,11 @@ function install_intel_tools_in_ct() { read -rp "Install non-free intel-media-va-driver (Debian only)? [y/N]: " confirm if [[ "${confirm,,}" =~ ^(y|yes)$ ]]; then msg info "Enabling non-free sources in $ctid..." - pct exec "$ctid" -- bash -c " -cat </etc/apt/sources.list.d/non-free.list + pct exec "$ctid" -- tee /etc/apt/sources.list.d/non-free.list >/dev/null < Date: Thu, 27 Mar 2025 15:54:31 +0100 Subject: [PATCH 0155/1614] Update maxun-install.sh --- install/maxun-install.sh | 55 ++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/install/maxun-install.sh b/install/maxun-install.sh index 42a74b0..df7bb1a 100644 --- a/install/maxun-install.sh +++ b/install/maxun-install.sh @@ -5,7 +5,7 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/getmaxun/maxun -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -15,11 +15,26 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gpg \ - curl \ - sudo \ - mc \ - redis + gpg \ + openssl \ + redis \ + libgbm1 \ + libnss3 \ + libatk1.0-0 \ + libatk-bridge2.0-0 \ + libdrm2 \ + libxkbcommon0 \ + libglib2.0-0 \ + libdbus-1-3 \ + libx11-xcb1 \ + libxcb1 \ + libxcomposite1 \ + libxcursor1 \ + libxdamage1 \ + libxext6 \ + libxi6 \ + libxtst6 \ + netcat msg_ok "Installed Dependencies" #configure_lxc "Semantic Search requires a dedicated GPU and at least 16GB RAM. Would you like to install it?" 100 "memory" "16000" @@ -65,7 +80,7 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" echo "Maxun Database Name: $DB_NAME" echo "Maxun JWT Secret: $JWT_SECRET" echo "Maxun Encryption Key: $ENCRYPTION_KEY" -} >> ~/maxun.creds +} >>~/maxun.creds msg_ok "Set up Database" msg_info "Setup MinIO" @@ -96,11 +111,12 @@ EOF echo "__________________" echo "MinIO Admin User: $MINIO_USER" echo "MinIO Admin Password: $MINIO_PASS" -} >> ~/maxun.creds -cat < /etc/default/minio +} >>~/maxun.creds +cat </etc/default/minio MINIO_ROOT_USER=${MINIO_USER} MINIO_ROOT_PASSWORD=${MINIO_PASS} EOF +systemctl enable -q --now minio msg_ok "Setup MinIO" msg_info "Installing Maxun (Patience)" @@ -109,8 +125,7 @@ RELEASE=$(curl -s https://api.github.com/repos/getmaxun/maxun/releases/latest | wget -q "https://github.com/getmaxun/maxun/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip mv maxun-${RELEASE} /opt/maxun -cat < /opt/maxun/.env -# App Setup +cat </opt/maxun/.env NODE_ENV=development JWT_SECRET=${JWT_SECRET} DB_NAME=${DB_NAME} @@ -127,15 +142,13 @@ MINIO_SECRET_KEY=${MINIO_PASS} REDIS_HOST=127.0.0.1 REDIS_PORT=6379 -# Backend and Frontend URLs and Ports BACKEND_PORT=8080 FRONTEND_PORT=5173 -BACKEND_URL=localhost:8080 -PUBLIC_URL=localhost:5173 -VITE_BACKEND_URL=localhost:8080 -VITE_PUBLIC_URL=localhost:5173 +BACKEND_URL=http://localhost:8080 +PUBLIC_URL=http://localhost:5173 +VITE_BACKEND_URL=http://localhost:8080 +VITE_PUBLIC_URL=http://localhost:5173 -# Telemetry Settings MAXUN_TELEMETRY=false EOF @@ -149,6 +162,11 @@ $STD npx playwright install-deps echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Maxun" +msg_info "Running DB Migrations" +cd /opt/maxun +node -e "require('./server/src/db/migrate')().then(() => { console.log('Migrations completed'); })" +msg_ok "DB Migrations completed" + msg_info "Creating Service" cat </etc/systemd/system/maxun.service [Unit] @@ -157,14 +175,13 @@ After=network.target postgresql.service redis.service minio.service [Service] WorkingDirectory=/opt/maxun -ExecStart=/usr/bin/npm start +ExecStart=/usr/bin/npm run server Restart=always EnvironmentFile=/opt/maxun/.env [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now minio systemctl enable -q --now maxun msg_ok "Created Service" From 6757bffb49339a6b3833cd13b08225710bcb0621 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Mar 2025 16:08:37 +0100 Subject: [PATCH 0156/1614] Update build.func --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index ee60517..26460e5 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1539,7 +1539,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? } From 616080970608fe0d4559719e9a476349023e597f Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Thu, 27 Mar 2025 16:12:55 +0100 Subject: [PATCH 0157/1614] Update var in CT files --- ct/Deferred/ampache.sh | 14 +++++++------- ct/Deferred/babybuddy.sh | 14 +++++++------- ct/Deferred/documenso.sh | 14 +++++++------- ct/Deferred/ghostfolio.sh | 14 +++++++------- ct/Deferred/hoodik.sh | 14 +++++++------- ct/Deferred/koel.sh | 14 +++++++------- ct/Deferred/mattermost.sh | 10 +++++----- ct/Deferred/netbootxyz.sh | 10 +++++----- ct/Deferred/nginxproxymanager.sh | 14 +++++++------- ct/Deferred/pixelfed.sh | 12 ++++++------ ct/Deferred/roundcubemail.sh | 14 +++++++------- ct/Deferred/squirrelserversmanager.sh | 14 +++++++------- ct/Deferred/timescaledb.sh | 14 +++++++------- ct/Deferred/wallabag.sh | 14 +++++++------- ct/alpine-gitea.sh | 14 +++++++------- ct/alpine-mariadb.sh | 14 +++++++------- ct/alpine-node-red.sh | 14 +++++++------- ct/alpine-postgresql.sh | 14 +++++++------- ct/alpine-prometheus.sh | 14 +++++++------- ct/alpine-tinyauth.sh | 14 +++++++------- ct/alpine-wireguard.sh | 14 +++++++------- ct/alpine.sh | 14 +++++++------- ct/docspell.sh | 14 +++++++------- ct/freepbx.sh | 12 ++++++------ ct/frigate.sh | 14 +++++++------- ct/fumadocs.sh | 14 +++++++------- ct/healthchecks.sh | 14 +++++++------- ct/librenms.sh | 14 +++++++------- ct/manyfold.sh | 14 +++++++------- ct/maxun.sh | 14 +++++++------- ct/meilisearch.sh | 14 +++++++------- ct/openproject.sh | 14 +++++++------- ct/openziti-tunnel.sh | 14 +++++++------- ct/polaris.sh | 14 +++++++------- ct/reactive-resume.sh | 14 +++++++------- ct/slskd.sh | 14 +++++++------- ct/ubuntu.sh | 12 ++++++------ 37 files changed, 252 insertions(+), 252 deletions(-) diff --git a/ct/Deferred/ampache.sh b/ct/Deferred/ampache.sh index 28b5fad..a64bce6 100644 --- a/ct/Deferred/ampache.sh +++ b/ct/Deferred/ampache.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: APP="Ampache" -var_tags="music" -var_disk="5" -var_cpu="4" -var_ram="2048" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-music}" +var_disk="${var_disk:-5}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-2048}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/Deferred/babybuddy.sh b/ct/Deferred/babybuddy.sh index 897c3af..e7730f9 100644 --- a/ct/Deferred/babybuddy.sh +++ b/ct/Deferred/babybuddy.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: APP="BabyBuddy" -var_tags="baby" -var_disk="5" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-baby}" +var_disk="${var_disk:-5}" +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 diff --git a/ct/Deferred/documenso.sh b/ct/Deferred/documenso.sh index 39f3856..15fc527 100644 --- a/ct/Deferred/documenso.sh +++ b/ct/Deferred/documenso.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: APP="Documenso" -var_tags="document" -var_disk="12" -var_cpu="6" -var_ram="6144" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-document}" +var_disk="${var_disk:-12}" +var_cpu="${var_cpu:-6}" +var_ram="${var_ram:-6144}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/Deferred/ghostfolio.sh b/ct/Deferred/ghostfolio.sh index 20f04c8..663c069 100644 --- a/ct/Deferred/ghostfolio.sh +++ b/ct/Deferred/ghostfolio.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: APP="Ghostfolio" -var_tags="portfolio" -var_disk="6" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-portfolio}" +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 diff --git a/ct/Deferred/hoodik.sh b/ct/Deferred/hoodik.sh index 4efb63f..7add9bf 100644 --- a/ct/Deferred/hoodik.sh +++ b/ct/Deferred/hoodik.sh @@ -7,13 +7,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ APP="Hoodik" # shellcheck disable=SC2034 -var_tags="sharing" -var_disk="7" -var_cpu="4" -var_ram="2048" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-sharing}" +var_disk="${var_disk:-7}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-2048}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/Deferred/koel.sh b/ct/Deferred/koel.sh index 50744db..ef8a11e 100644 --- a/ct/Deferred/koel.sh +++ b/ct/Deferred/koel.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ ## App Default Values APP="Koel" -var_tags="music;player;homelab" -var_disk="9" -var_cpu="3" -var_ram="3072" -var_os="debian" -var_version="12" -var_verbose="yes" +var_tags="${var_tags:-music;player;homelab}" +var_disk="${var_disk:-9}" +var_cpu="${var_cpu:-3}" +var_ram="${var_ram:-3072}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_verbose="${var_verbose:-yes}" # App Output & Base Settings header_info "$APP" diff --git a/ct/Deferred/mattermost.sh b/ct/Deferred/mattermost.sh index d3f3c69..ecef586 100644 --- a/ct/Deferred/mattermost.sh +++ b/ct/Deferred/mattermost.sh @@ -5,11 +5,11 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE APP="Mattermost" -var_disk="10" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="12" +var_disk="${var_disk:-10}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" variables color catch_errors diff --git a/ct/Deferred/netbootxyz.sh b/ct/Deferred/netbootxyz.sh index b091c01..f30f91f 100644 --- a/ct/Deferred/netbootxyz.sh +++ b/ct/Deferred/netbootxyz.sh @@ -19,11 +19,11 @@ EOF header_info echo -e "Loading..." APP="netboot.xyz" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="12" +var_disk="${var_disk:-2}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" variables color catch_errors diff --git a/ct/Deferred/nginxproxymanager.sh b/ct/Deferred/nginxproxymanager.sh index 01ccfff..2bed4f9 100644 --- a/ct/Deferred/nginxproxymanager.sh +++ b/ct/Deferred/nginxproxymanager.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://nginxproxymanager.com/ APP="Nginx Proxy Manager" -var_tags="proxy" -var_cpu="2" -var_ram="1024" -var_disk="4" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-proxy}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-4}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/Deferred/pixelfed.sh b/ct/Deferred/pixelfed.sh index 0814424..6db134f 100644 --- a/ct/Deferred/pixelfed.sh +++ b/ct/Deferred/pixelfed.sh @@ -6,12 +6,12 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: APP="Pixelfed" -var_tags="pictures" -var_disk="7" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="12" +var_tags="${var_tags:-pictures}" +var_disk="${var_disk:-7}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" header_info "$APP" variables diff --git a/ct/Deferred/roundcubemail.sh b/ct/Deferred/roundcubemail.sh index 9882143..949288a 100644 --- a/ct/Deferred/roundcubemail.sh +++ b/ct/Deferred/roundcubemail.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: APP="Roundcubemail" -var_tags="mail" -var_disk="5" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-mail}" +var_disk="${var_disk:-5}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/Deferred/squirrelserversmanager.sh b/ct/Deferred/squirrelserversmanager.sh index 2351eef..5156959 100644 --- a/ct/Deferred/squirrelserversmanager.sh +++ b/ct/Deferred/squirrelserversmanager.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: APP="Squirrel Servers Manager" -var_tags="manager" -var_disk="10" -var_cpu="2" -var_ram="4096" -var_os="alpine" -var_version="3.21" -var_unprivileged="1" +var_tags="${var_tags:-manager}" +var_disk="${var_disk:-10}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" variables color diff --git a/ct/Deferred/timescaledb.sh b/ct/Deferred/timescaledb.sh index a62b7bb..77ba031 100644 --- a/ct/Deferred/timescaledb.sh +++ b/ct/Deferred/timescaledb.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: APP="TimescaleDB" -var_tags="database" -var_cpu="1" -var_ram="1024" -var_disk="5" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-database}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-5}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/Deferred/wallabag.sh b/ct/Deferred/wallabag.sh index dbfd4a9..2115bea 100644 --- a/ct/Deferred/wallabag.sh +++ b/ct/Deferred/wallabag.sh @@ -7,13 +7,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # App Default Values APP="Wallabag" -var_tags="ai;document" -var_cpu="2" -var_ram="2048" -var_disk="7" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-ai;document}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-7}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" # App Output & Base Settings header_info "$APP" diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 41071c3..8062438 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://gitea.io APP="Alpine-Gitea" -var_tags="alpine;git" -var_cpu="1" -var_ram="256" -var_disk="1" -var_os="alpine" -var_version="3.21" -var_unprivileged="1" +var_tags="${var_tags:-alpine;git}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/alpine-mariadb.sh b/ct/alpine-mariadb.sh index ed82cb5..e944fd2 100644 --- a/ct/alpine-mariadb.sh +++ b/ct/alpine-mariadb.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://mariadb.org APP="Alpine-MariaDB" -var_tags="alpine;database" -var_cpu="1" -var_ram="256" -var_disk="1" -var_os="alpine" -var_version="3.21" -var_unprivileged="1" +var_tags="${var_tags:-alpine;database}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/alpine-node-red.sh b/ct/alpine-node-red.sh index 69ce346..ca2e8ca 100644 --- a/ct/alpine-node-red.sh +++ b/ct/alpine-node-red.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://redis.io/ APP="Alpine-Node-Red" -var_tags="alpine;automation" -var_cpu="1" -var_ram="256" -var_disk="1" -var_os="alpine" -var_version="3.21" -var_unprivileged="1" +var_tags="${var_tags:-alpine;automation}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/alpine-postgresql.sh b/ct/alpine-postgresql.sh index 69ddf7a..788e801 100644 --- a/ct/alpine-postgresql.sh +++ b/ct/alpine-postgresql.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://postgresql.org/ APP="Alpine-Postgresql" -var_tags="alpine;database" -var_cpu="1" -var_ram="256" -var_disk="1" -var_os="alpine" -var_version="3.21" -var_unprivileged="1" +var_tags="${var_tags:-alpine;database}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/alpine-prometheus.sh b/ct/alpine-prometheus.sh index 044ced6..d43d529 100644 --- a/ct/alpine-prometheus.sh +++ b/ct/alpine-prometheus.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://prometheus.io/ APP="Alpine-Prometheus" -var_tags="alpine;monitoring" -var_cpu="1" -var_ram="256" -var_disk="1" -var_os="alpine" -var_version="3.21" -var_unprivileged="1" +var_tags="${var_tags:-alpine;monitoring}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 6ce6f1c..525e5ef 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://github.com/steveiliop56/tinyauth APP="tinyauth" -var_tags="alpine;auth" -var_cpu="1" -var_ram="512" -var_disk="2" -var_os="alpine" -var_version="3.21" -var_unprivileged="1" +var_tags="${var_tags:-alpine;auth}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-2}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/alpine-wireguard.sh b/ct/alpine-wireguard.sh index e079019..236e366 100644 --- a/ct/alpine-wireguard.sh +++ b/ct/alpine-wireguard.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://www.wireguard.com/ APP="Alpine-Wireguard" -var_tags="alpine;vpn" -var_cpu="1" -var_ram="256" -var_disk="1" -var_os="alpine" -var_version="3.21" -var_unprivileged="1" +var_tags="${var_tags:-alpine;vpn}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/alpine.sh b/ct/alpine.sh index dc93ecc..341e0b5 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://alpinelinux.org/ APP="Alpine" -var_tags="os;alpine" -var_cpu="1" -var_ram="512" -var_disk="0.1" -var_os="alpine" -var_version="3.21" -var_unprivileged="1" +var_tags="${var_tags:-os;alpine}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-0.1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/docspell.sh b/ct/docspell.sh index 144b6cd..1bb035c 100644 --- a/ct/docspell.sh +++ b/ct/docspell.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: APP="Docspell" -var_tags="document" -var_disk="7" -var_cpu="4" -var_ram="2048" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-document}" +var_disk="${var_disk:-7}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-2048}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/freepbx.sh b/ct/freepbx.sh index a09fbbb..5797075 100644 --- a/ct/freepbx.sh +++ b/ct/freepbx.sh @@ -7,12 +7,12 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ APP="FreePBX" var_tags="" -var_cpu="1" -var_ram="1024" -var_disk="20" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-20}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/frigate.sh b/ct/frigate.sh index 660623c..85b436a 100644 --- a/ct/frigate.sh +++ b/ct/frigate.sh @@ -7,13 +7,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # App Default Values APP="Frigate" -var_tags="nvr" -var_cpu="4" -var_ram="4096" -var_disk="20" -var_os="debian" -var_version="11" -var_unprivileged="0" +var_tags="${var_tags:-nvr}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-20}" +var_os="${var_os:-debian}" +var_version="${var_version:-11}" +var_unprivileged="${var_unprivileged:-0}" # App Output header_info "$APP" diff --git a/ct/fumadocs.sh b/ct/fumadocs.sh index d0f6221..8f866e5 100644 --- a/ct/fumadocs.sh +++ b/ct/fumadocs.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://github.com/fuma-nama/fumadoc APP="Fumadocs" -var_tags="documentation" -var_cpu="3" -var_ram="2048" -var_disk="7" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-documentation}" +var_cpu="${var_cpu:-3}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-7}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/healthchecks.sh b/ct/healthchecks.sh index 85bdf75..408ae33 100644 --- a/ct/healthchecks.sh +++ b/ct/healthchecks.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: APP="healthchecks" -var_tags="monitoring" -var_cpu="4" -var_ram="4096" -var_disk="20" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-monitoring}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-20}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/librenms.sh b/ct/librenms.sh index 84e231e..72291ff 100644 --- a/ct/librenms.sh +++ b/ct/librenms.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://librenms.org APP="Librenms" -var_tags="monitoring" -var_cpu="2" -var_ram="2048" -var_disk="4" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-monitoring}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-4}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/manyfold.sh b/ct/manyfold.sh index d2d434b..eec4feb 100644 --- a/ct/manyfold.sh +++ b/ct/manyfold.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://github.com/manyfold3d/manyfold APP="Manyfold" -var_tags="network" -var_cpu="4" -var_ram="4096" -var_disk="15" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-network}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-15}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/maxun.sh b/ct/maxun.sh index 31733a4..fe3572f 100644 --- a/ct/maxun.sh +++ b/ct/maxun.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://github.com/getmaxun/maxun APP="Maxun" -var_tags="scraper" -var_disk="7" -var_cpu="2" -var_ram="3072" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-scraper}" +var_disk="${var_disk:-7}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-3072}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/meilisearch.sh b/ct/meilisearch.sh index f50676c..64c15dc 100644 --- a/ct/meilisearch.sh +++ b/ct/meilisearch.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://www.meilisearch.com/ APP="Meilisearch" -var_tags="full-text-search" -var_cpu="2" -var_ram="4096" -var_disk="5" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-full-text-search}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-5}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/openproject.sh b/ct/openproject.sh index 9a56870..ce3fda3 100644 --- a/ct/openproject.sh +++ b/ct/openproject.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://github.com/opf/openproject APP="OpenProject" -var_tags="project-management,erp" -var_cpu="2" -var_ram="4096" -var_disk="8" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-project-management,erp}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/openziti-tunnel.sh b/ct/openziti-tunnel.sh index 6ab46c1..0063f7f 100644 --- a/ct/openziti-tunnel.sh +++ b/ct/openziti-tunnel.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://github.com/openziti/ziti APP="openziti-tunnel" -var_tags="network;openziti-tunnel" -var_cpu="1" -var_ram="512" -var_disk="2" -var_os="ubuntu" -var_version="24.04" -var_unprivileged="1" +var_tags="${var_tags:-network;openziti-tunnel}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-2}" +var_os="${var_os:-ubuntu}" +var_version="${var_version:-24.04}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/polaris.sh b/ct/polaris.sh index 23ebf4a..65f4d7e 100644 --- a/ct/polaris.sh +++ b/ct/polaris.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://github.com/agersant/polaris APP="Polaris" -var_tags="music" -var_cpu="3" -var_ram="2048" -var_disk="7" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-music}" +var_cpu="${var_cpu:-3}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-7}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/reactive-resume.sh b/ct/reactive-resume.sh index cbe76c6..1091a1d 100644 --- a/ct/reactive-resume.sh +++ b/ct/reactive-resume.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://rxresu.me APP="Reactive-Resume" -var_tags="documents" -var_cpu="2" -var_ram="3072" -var_disk="8" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-documents}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-3072}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/slskd.sh b/ct/slskd.sh index b11ebea..0970eaf 100644 --- a/ct/slskd.sh +++ b/ct/slskd.sh @@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://github.com/slskd/slskd, https://soularr.net APP="slskd" -var_tags="arr;p2p" -var_cpu="1" -var_ram="512" -var_disk="4" -var_os="debian" -var_version="12" -var_unprivileged="1" +var_tags="${var_tags:-arr;p2p}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-4}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index dcbb94a..1901951 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -7,12 +7,12 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ echo -e "Loading..." APP="Ubuntu" -var_tags="os" -var_cpu="1" -var_ram="512" -var_disk="2" -var_os="ubuntu" -var_version="24.04" +var_tags="${var_tags:-os}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-2}" +var_os="${var_os:-ubuntu}" +var_version="${var_version:-24.04}" header_info "$APP" variables From 2f81bce8a2e309ecbc2380c633e9435437789203 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Thu, 27 Mar 2025 12:36:14 -0400 Subject: [PATCH 0158/1614] switched to debian --- ct/openziti-controller.sh | 4 ++-- frontend/public/json/openziti-controller.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/openziti-controller.sh b/ct/openziti-controller.sh index 0ccc2ea..1a6aa25 100644 --- a/ct/openziti-controller.sh +++ b/ct/openziti-controller.sh @@ -10,8 +10,8 @@ var_tags="network;openziti-controller" var_cpu="2" var_ram="1024" var_disk="8" -var_os="ubuntu" -var_version="24.04" +var_os="debian" +var_version="12" var_unprivileged="1" header_info "$APP" diff --git a/frontend/public/json/openziti-controller.json b/frontend/public/json/openziti-controller.json index c91ea0c..cfe49bf 100644 --- a/frontend/public/json/openziti-controller.json +++ b/frontend/public/json/openziti-controller.json @@ -21,8 +21,8 @@ "cpu": 2, "ram": 1024, "hdd": 8, - "os": "Ubuntu", - "version": "24.04" + "os": "Debian", + "version": "12" } } ], From a74d61f8c9dcb913245a356aad27af0c612f0fa5 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Thu, 27 Mar 2025 13:41:28 -0400 Subject: [PATCH 0159/1614] improve auto configuration --- install/openziti-controller-install.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh index 3a9b66c..4d06ecf 100644 --- a/install/openziti-controller-install.sh +++ b/install/openziti-controller-install.sh @@ -25,10 +25,26 @@ $STD apt-get update $STD apt-get install -y openziti-controller openziti-console msg_ok "Installed openziti" +msg_info "Starting configuration" read -r -p "Would you like to go through the auto configuration now? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - msg_info "Starting Configuration" - env VERBOSE=0 bash /opt/openziti/etc/controller/bootstrap.bash + IPADDRESS=$(hostname -I | awk '{print $1}') + GEN_FQDN="controller.${IPADDRESS}.sslip.io" + read -r -p "Please enter the controller FQDN [${GEN_FQDN}]: " ZITI_CTRL_ADVERTISED_ADDRESS + ZITI_CTRL_ADVERTISED_ADDRESS=${ZITI_CTRL_ADVERTISED_ADDRESS:-$GEN_FQDN} + read -r -p "Please enter the controller port [1280]: " ZITI_CTRL_ADVERTISED_PORT + ZITI_CTRL_ADVERTISED_PORT=${ZITI_CTRL_ADVERTISED_PORT:-1280} + read -r -p "Please enter the controller admin user [admin]: " ZITI_USER + ZITI_USER=${ZITI_USER:-admin} + GEN_PWD=$(head -c128 /dev/urandom | LC_ALL=C tr -dc 'A-Za-z0-9!@#$%^*_+~' | cut -c 1-12) + read -r -p "Please enter the controller admin password [${GEN_PWD}]:" ZITI_PWD + ZITI_PWD=${ZITI_PWD:-$GEN_PWD} + env VERBOSE=0 \ + ZITI_CTRL_ADVERTISED_ADDRESS="$ZITI_CTRL_ADVERTISED_ADDRESS" \ + ZITI_CTRL_ADVERTISED_PORT="$ZITI_CTRL_ADVERTISED_PORT" \ + ZITI_USER="$ZITI_USER" \ + ZITI_PWD="$ZITI_PWD" \ + bash /opt/openziti/etc/controller/bootstrap.bash msg_ok "Configuration Completed" systemctl enable -q --now ziti-controller else From 973bd62fd9e0ebaa591e8509e2cc3d1ebe76dff9 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Thu, 27 Mar 2025 15:01:43 -0400 Subject: [PATCH 0160/1614] switch to writing env file --- install/openziti-controller-install.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh index 4d06ecf..767ba38 100644 --- a/install/openziti-controller-install.sh +++ b/install/openziti-controller-install.sh @@ -25,7 +25,6 @@ $STD apt-get update $STD apt-get install -y openziti-controller openziti-console msg_ok "Installed openziti" -msg_info "Starting configuration" read -r -p "Would you like to go through the auto configuration now? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then IPADDRESS=$(hostname -I | awk '{print $1}') @@ -39,12 +38,12 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then GEN_PWD=$(head -c128 /dev/urandom | LC_ALL=C tr -dc 'A-Za-z0-9!@#$%^*_+~' | cut -c 1-12) read -r -p "Please enter the controller admin password [${GEN_PWD}]:" ZITI_PWD ZITI_PWD=${ZITI_PWD:-$GEN_PWD} - env VERBOSE=0 \ - ZITI_CTRL_ADVERTISED_ADDRESS="$ZITI_CTRL_ADVERTISED_ADDRESS" \ - ZITI_CTRL_ADVERTISED_PORT="$ZITI_CTRL_ADVERTISED_PORT" \ - ZITI_USER="$ZITI_USER" \ - ZITI_PWD="$ZITI_PWD" \ - bash /opt/openziti/etc/controller/bootstrap.bash + CONFIG_FILE="/opt/openziti/etc/controller/bootstrap.env" + sed -i "s|^ZITI_CTRL_ADVERTISED_ADDRESS=.*|ZITI_CTRL_ADVERTISED_ADDRESS='${ZITI_CTRL_ADVERTISED_ADDRESS}'|" "$CONFIG_FILE" + sed -i "s|^ZITI_CTRL_ADVERTISED_PORT=.*|ZITI_CTRL_ADVERTISED_PORT='${ZITI_CTRL_ADVERTISED_PORT}'|" "$CONFIG_FILE" + sed -i "s|^ZITI_USER=.*|ZITI_USER='${ZITI_USER}'|" "$CONFIG_FILE" + sed -i "s|^ZITI_PWD=.*|ZITI_PWD='${ZITI_PWD}'|" "$CONFIG_FILE" + env VERBOSE=0 bash /opt/openziti/etc/controller/bootstrap.bash msg_ok "Configuration Completed" systemctl enable -q --now ziti-controller else From b0dedc8a71a95e28840a8f100b2329c3e5eb7785 Mon Sep 17 00:00:00 2001 From: Edward Moscardini <57814088+emoscardini@users.noreply.github.com> Date: Thu, 27 Mar 2025 15:37:29 -0400 Subject: [PATCH 0161/1614] Update frontend/public/json/openziti-controller.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit switch to lowercase Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- frontend/public/json/openziti-controller.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/openziti-controller.json b/frontend/public/json/openziti-controller.json index cfe49bf..2089e67 100644 --- a/frontend/public/json/openziti-controller.json +++ b/frontend/public/json/openziti-controller.json @@ -21,7 +21,7 @@ "cpu": 2, "ram": 1024, "hdd": 8, - "os": "Debian", + "os": "debian", "version": "12" } } From 0a3178b29fedaf30cfdab4ba3d405becc80a8870 Mon Sep 17 00:00:00 2001 From: Edward Moscardini <57814088+emoscardini@users.noreply.github.com> Date: Thu, 27 Mar 2025 15:37:59 -0400 Subject: [PATCH 0162/1614] Update install/openziti-controller-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit remove space from redirect Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/openziti-controller-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh index 767ba38..2df0d31 100644 --- a/install/openziti-controller-install.sh +++ b/install/openziti-controller-install.sh @@ -20,7 +20,7 @@ msg_ok "Installed Dependencies" msg_info "Installing openziti" mkdir -p --mode=0755 /usr/share/keyrings curl -sSLf https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg -echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main" > /etc/apt/sources.list.d/openziti.list +echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main" >/etc/apt/sources.list.d/openziti.list $STD apt-get update $STD apt-get install -y openziti-controller openziti-console msg_ok "Installed openziti" From 8d8cd67fdd4ff2905b45c14ada8eb2e3c5028ce8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 28 Mar 2025 12:37:10 +0100 Subject: [PATCH 0163/1614] Update build.func --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index 26460e5..0ea9cbf 100644 --- a/misc/build.func +++ b/misc/build.func @@ -12,6 +12,7 @@ variables() { DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. + CT_TYPE="" # sets the CT_TYPE variable to an empty string. } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) From b5d7d3d8f769332e65f1724fd7ba2e4468a89a73 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 28 Mar 2025 12:43:34 +0100 Subject: [PATCH 0164/1614] fixes --- ct/alpine-gitea.sh | 2 ++ misc/build.func | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 8062438..ec85eff 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -33,6 +33,8 @@ function update_script() { msg_info "Restarting Gitea" $STD rc-service gitea restart msg_ok "Restarted Gitea" + + exit 0 } start diff --git a/misc/build.func b/misc/build.func index 0ea9cbf..64a3c31 100644 --- a/misc/build.func +++ b/misc/build.func @@ -12,7 +12,6 @@ variables() { DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. - CT_TYPE="" # sets the CT_TYPE variable to an empty string. } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) @@ -30,15 +29,13 @@ color() { # Formatting CL=$(echo "\033[m") - UL=$(echo "\033[4m") BOLD=$(echo "\033[1m") - BFR="\\r\\033[K" HOLD=" " TAB=" " # Icons CM="${TAB}✔️${TAB}" - CROSS="${TAB}✖️${TAB}" + CROSS="${TAB}✖️${TAB}${CL}" INFO="${TAB}💡${TAB}${CL}" OS="${TAB}🖥️${TAB}${CL}" OSVERSION="${TAB}🌟${TAB}${CL}" From fa8ec4c416a539f7f748c51ed72fa07e5fd06bde Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 28 Mar 2025 12:45:08 +0100 Subject: [PATCH 0165/1614] fixes --- ct/alpine-gitea.sh | 3 +++ ct/alpine-mariadb.sh | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index ec85eff..ccae1a6 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -42,3 +42,6 @@ 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}:3000${CL}" diff --git a/ct/alpine-mariadb.sh b/ct/alpine-mariadb.sh index e944fd2..4c564f3 100644 --- a/ct/alpine-mariadb.sh +++ b/ct/alpine-mariadb.sh @@ -21,16 +21,19 @@ catch_errors function update_script() { msg_info "Updating Alpine Packages" - apk update && apk upgrade + $STD apk update + $STD apk upgrade msg_ok "Updated Alpine Packages" msg_info "Updating MariaDB" - apk upgrade mariadb mariadb-client + $STD apk upgrade mariadb mariadb-client msg_ok "Updated MariaDB" msg_info "Restarting MariaDB" - rc-service mariadb restart + $STD rc-service mariadb restart msg_ok "Restarted MariaDB" + + exit 0 } start From ae16c9f27bc80d1e08bb9463efbcf63b72d4c9d3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 28 Mar 2025 12:50:40 +0100 Subject: [PATCH 0166/1614] fixes --- ct/alpine-mariadb.sh | 3 +++ ct/alpine-node-red.sh | 18 +++++++++++------- ct/alpine-postgresql.sh | 12 +++++++++--- ct/alpine-prometheus.sh | 12 +++++++++--- ct/alpine-tinyauth.sh | 38 ++++++++++++++++++++++---------------- 5 files changed, 54 insertions(+), 29 deletions(-) diff --git a/ct/alpine-mariadb.sh b/ct/alpine-mariadb.sh index 4c564f3..c79bf3f 100644 --- a/ct/alpine-mariadb.sh +++ b/ct/alpine-mariadb.sh @@ -41,3 +41,6 @@ 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 IP:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}${IP}:3306${CL}" diff --git a/ct/alpine-node-red.sh b/ct/alpine-node-red.sh index ca2e8ca..73ee7b0 100644 --- a/ct/alpine-node-red.sh +++ b/ct/alpine-node-red.sh @@ -3,7 +3,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Copyright (c) 2021-2025 community-scripts ORG # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://redis.io/ +# Source: https://nodered.org APP="Alpine-Node-Red" var_tags="${var_tags:-alpine;automation}" @@ -21,20 +21,23 @@ catch_errors function update_script() { msg_info "Updating Alpine Packages" - apk update && apk upgrade + $STD apk update + $STD apk upgrade msg_ok "Updated Alpine Packages" msg_info "Updating Node.js and npm" - apk upgrade nodejs npm + $STD apk upgrade nodejs npm msg_ok "Updated Node.js and npm" msg_info "Updating Node-RED" - npm install -g --unsafe-perm node-red + $STD npm install -g --unsafe-perm node-red msg_ok "Updated Node-RED" msg_info "Restarting Node-RED" - rc-service nodered restart + $STD rc-service nodered restart msg_ok "Restarted Node-RED" + + exit 0 } start @@ -42,5 +45,6 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable on port 1880. - ${BL}http://:1880${CL} \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}:1880${CL}" diff --git a/ct/alpine-postgresql.sh b/ct/alpine-postgresql.sh index 788e801..2ebb0aa 100644 --- a/ct/alpine-postgresql.sh +++ b/ct/alpine-postgresql.sh @@ -21,16 +21,19 @@ catch_errors function update_script() { msg_info "Updating Alpine Packages" - apk update && apk upgrade + $STD apk update + $STD apk upgrade msg_ok "Updated Alpine Packages" msg_info "Updating PostgreSQL" - apk upgrade postgresql postgresql-contrib + $STD apk upgrade postgresql postgresql-contrib msg_ok "Updated PostgreSQL" msg_info "Restarting PostgreSQL" - rc-service postgresql restart + $STD rc-service postgresql restart msg_ok "Restarted PostgreSQL" + + exit 0 } start @@ -38,3 +41,6 @@ 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 IP:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}${IP}:5432${CL}" diff --git a/ct/alpine-prometheus.sh b/ct/alpine-prometheus.sh index d43d529..4139176 100644 --- a/ct/alpine-prometheus.sh +++ b/ct/alpine-prometheus.sh @@ -21,16 +21,19 @@ catch_errors function update_script() { msg_info "Updating Alpine Packages" - apk update && apk upgrade + $STD apk update + $STD apk upgrade msg_ok "Updated Alpine Packages" msg_info "Updating Prometheus" - apk upgrade prometheus + $STD apk upgrade prometheus msg_ok "Updated Prometheus" msg_info "Restarting Prometheus" - rc-service prometheus restart + $STD rc-service prometheus restart msg_ok "Restarted Prometheus" + + exit 0 } start @@ -38,3 +41,6 @@ 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}:9090${CL}" diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 525e5ef..8f816f5 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -20,25 +20,28 @@ color catch_errors function update_script() { - header_info - if [ ! -d /opt/tinyauth ]; then - msg_error "No ${APP} Installation Found!" - exit 1 - fi - msg_info "Updating Alpine Packages" - $STD apk update && apk upgrade - msg_ok "Updated Alpine Packages" + header_info + if [ ! -d /opt/tinyauth ]; then + msg_error "No ${APP} Installation Found!" + exit 1 + fi + msg_info "Updating Alpine Packages" + $STD apk update + $STD apk upgrade + msg_ok "Updated Alpine Packages" - echo "DEBUG: CT_TYPE before update_script=${CT_TYPE:-UNDEFINED}" - echo "DEBUG: var_unprivileged=${var_unprivileged:-UNDEFINED}" + echo "DEBUG: CT_TYPE before update_script=${CT_TYPE:-UNDEFINED}" + echo "DEBUG: var_unprivileged=${var_unprivileged:-UNDEFINED}" - msg_info "Updating tinyauth" - $STD apk upgrade tinyauth - msg_ok "Updated tinyauth" + msg_info "Updating tinyauth" + $STD apk upgrade tinyauth + msg_ok "Updated tinyauth" - msg_info "Restarting tinyauth" - $STD rc-service tinyauth restart - msg_ok "Restarted tinyauth" + msg_info "Restarting tinyauth" + $STD rc-service tinyauth restart + msg_ok "Restarted tinyauth" + + exit 0 } start @@ -46,3 +49,6 @@ 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}:xxxx${CL}" From d7b491421ecbd1c0587ad4dbf7d57ca79da8ae6c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 28 Mar 2025 12:57:13 +0100 Subject: [PATCH 0167/1614] push to main --- ct/alpine-gitea.sh | 2 +- ct/alpine-mariadb.sh | 46 -------------------- ct/alpine-node-red.sh | 50 ---------------------- ct/alpine-prometheus.sh | 2 +- install/alpine-mariadb-install.sh | 64 ---------------------------- install/alpine-node-red-install.sh | 61 -------------------------- install/alpine-postgresql-install.sh | 3 +- 7 files changed, 4 insertions(+), 224 deletions(-) delete mode 100644 ct/alpine-mariadb.sh delete mode 100644 ct/alpine-node-red.sh delete mode 100644 install/alpine-mariadb-install.sh delete mode 100644 install/alpine-node-red-install.sh diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index ccae1a6..dedd6f0 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/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 diff --git a/ct/alpine-mariadb.sh b/ct/alpine-mariadb.sh deleted file mode 100644 index c79bf3f..0000000 --- a/ct/alpine-mariadb.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/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://mariadb.org - -APP="Alpine-MariaDB" -var_tags="${var_tags:-alpine;database}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-256}" -var_disk="${var_disk:-1}" -var_os="${var_os:-alpine}" -var_version="${var_version:-3.21}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade - msg_ok "Updated Alpine Packages" - - msg_info "Updating MariaDB" - $STD apk upgrade mariadb mariadb-client - msg_ok "Updated MariaDB" - - msg_info "Restarting MariaDB" - $STD rc-service mariadb restart - msg_ok "Restarted MariaDB" - - exit 0 -} - -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 IP:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}${IP}:3306${CL}" diff --git a/ct/alpine-node-red.sh b/ct/alpine-node-red.sh deleted file mode 100644 index 73ee7b0..0000000 --- a/ct/alpine-node-red.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/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://nodered.org - -APP="Alpine-Node-Red" -var_tags="${var_tags:-alpine;automation}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-256}" -var_disk="${var_disk:-1}" -var_os="${var_os:-alpine}" -var_version="${var_version:-3.21}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade - msg_ok "Updated Alpine Packages" - - msg_info "Updating Node.js and npm" - $STD apk upgrade nodejs npm - msg_ok "Updated Node.js and npm" - - msg_info "Updating Node-RED" - $STD npm install -g --unsafe-perm node-red - msg_ok "Updated Node-RED" - - msg_info "Restarting Node-RED" - $STD rc-service nodered restart - msg_ok "Restarted Node-RED" - - exit 0 -} - -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}:1880${CL}" diff --git a/ct/alpine-prometheus.sh b/ct/alpine-prometheus.sh index 4139176..bb3066e 100644 --- a/ct/alpine-prometheus.sh +++ b/ct/alpine-prometheus.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/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 diff --git a/install/alpine-mariadb-install.sh b/install/alpine-mariadb-install.sh deleted file mode 100644 index 3d596d1..0000000 --- a/install/alpine-mariadb-install.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://mariadb.org/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies" -$STD apk add \ - newt \ - curl \ - openssh \ - nano \ - mc \ - gpg - -msg_ok "Installed Dependencies" - -msg_info "Installing MariaDB" -$STD apk add --no-cache mariadb mariadb-client -$STD rc-update add mariadb default -$STD rc-service mariadb start -msg_ok "Installed MariaDB" - -msg_info "Configuring MariaDB" -mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql >/dev/null 2>&1 -$STD rc-service mariadb restart -msg_ok "MariaDB Configured" - -read -r -p "Would you like to install Adminer with lighthttpd? " prompt -if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - msg_info "Installing Adminer" - $STD apk add --no-cache lighttpd php php-cgi php-mysqli php-mbstring php-zip php-gd php-json php-curl jq - sed -i 's|server.modules += ( "mod_cgi" )|server.modules += ( "mod_cgi", "mod_fastcgi" )|' /etc/lighttpd/lighttpd.conf - echo 'fastcgi.server += ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/var/run/php-cgi.sock" )))' >>/etc/lighttpd/lighttpd.conf - ADMINER_VERSION=$(curl -s https://api.github.com/repos/vrana/adminer/releases/latest | jq -r '.tag_name' | sed 's/v//') - wget -q -O /var/www/adminer.php "https://github.com/vrana/adminer/releases/download/v${ADMINER_VERSION}/adminer-${ADMINER_VERSION}.php" - chown lighttpd:lighttpd /var/www/adminer.php - chmod 755 /var/www/adminer.php - msg_ok "Adminer Installed" - - msg_info "Starting Lighttpd" - $STD rc-update add lighttpd default - $STD rc-service lighttpd restart - msg_ok "Lighttpd Started" - - echo -e "Adminer is available at: ${BL}http://$(hostname -I | awk '{print $1}')/adminer${CL}" -else - echo -e "Skipped Adminer Installation..." -fi - -motd_ssh -customize - -msg_info "Cleaning up" -msg_ok "Cleaned" diff --git a/install/alpine-node-red-install.sh b/install/alpine-node-red-install.sh deleted file mode 100644 index 2b938b1..0000000 --- a/install/alpine-node-red-install.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://nodered.org/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies" -$STD apk add --no-cache \ - newt \ - curl \ - openssh \ - nano \ - mc \ - gpg \ - git \ - nodejs \ - npm -msg_ok "Installed Dependencies" - -msg_info "Creating Node-RED User" -adduser -D -H -s /sbin/nologin -G users nodered -msg_ok "Created Node-RED User" - -msg_info "Installing Node-RED" -npm install -g --unsafe-perm node-red -msg_ok "Installed Node-RED" - -msg_info "Creating Node-RED Service" -service_path="/etc/init.d/nodered" - -echo '#!/sbin/openrc-run -description="Node-RED Service" - -command="/usr/bin/node-red" -command_args="--max-old-space-size=128 -v" -command_user="nodered" -pidfile="/var/run/nodered.pid" - -depend() { - use net -}' >$service_path - -chmod +x $service_path -$STD rc-update add nodered default -msg_ok "Created Node-RED Service" - -msg_info "Starting Node-RED" -$STD service nodered start -msg_ok "Started Node-RED" - -motd_ssh -customize diff --git a/install/alpine-postgresql-install.sh b/install/alpine-postgresql-install.sh index 8e76130..a4ce2dc 100644 --- a/install/alpine-postgresql-install.sh +++ b/install/alpine-postgresql-install.sh @@ -18,6 +18,7 @@ $STD apk add \ newt \ curl \ openssh \ + sudo \ nano \ mc \ gpg @@ -25,7 +26,7 @@ $STD apk add \ msg_ok "Installed Dependencies" msg_info "Installing PostgreSQL and Dependencies" -apk add --no-cache postgresql postgresql-contrib +$STD apk add --no-cache postgresql postgresql-contrib msg_ok "Installed PostgreSQL" msg_info "Initializing PostgreSQL Database" From b6d3bbf32d51b1cb6f1fcc281f466811642719b4 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 28 Mar 2025 11:57:38 +0000 Subject: [PATCH 0168/1614] Update .app files --- ct/headers/alpine-mariadb | 6 ------ ct/headers/alpine-node-red | 6 ------ 2 files changed, 12 deletions(-) delete mode 100644 ct/headers/alpine-mariadb delete mode 100644 ct/headers/alpine-node-red diff --git a/ct/headers/alpine-mariadb b/ct/headers/alpine-mariadb deleted file mode 100644 index 1279f83..0000000 --- a/ct/headers/alpine-mariadb +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ _ __ ___ _ ____ ____ - / | / /___ (_)___ ___ / |/ /___ ______(_)___ _/ __ \/ __ ) - / /| | / / __ \/ / __ \/ _ \______/ /|_/ / __ `/ ___/ / __ `/ / / / __ | - / ___ |/ / /_/ / / / / / __/_____/ / / / /_/ / / / / /_/ / /_/ / /_/ / -/_/ |_/_/ .___/_/_/ /_/\___/ /_/ /_/\__,_/_/ /_/\__,_/_____/_____/ - /_/ diff --git a/ct/headers/alpine-node-red b/ct/headers/alpine-node-red deleted file mode 100644 index 0763276..0000000 --- a/ct/headers/alpine-node-red +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ _ _ __ __ ____ __ - / | / /___ (_)___ ___ / | / /___ ____/ /__ / __ \___ ____/ / - / /| | / / __ \/ / __ \/ _ \______/ |/ / __ \/ __ / _ \______/ /_/ / _ \/ __ / - / ___ |/ / /_/ / / / / / __/_____/ /| / /_/ / /_/ / __/_____/ _, _/ __/ /_/ / -/_/ |_/_/ .___/_/_/ /_/\___/ /_/ |_/\____/\__,_/\___/ /_/ |_|\___/\__,_/ - /_/ From 99698c10ccf2de542cc6c8abf63aeb2fff9d276d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 28 Mar 2025 13:02:44 +0100 Subject: [PATCH 0169/1614] Update polaris.sh --- ct/polaris.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/polaris.sh b/ct/polaris.sh index 65f4d7e..9cb58cd 100644 --- a/ct/polaris.sh +++ b/ct/polaris.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE From 14d379fb3367308c738e1b649d1ae97cfaf3368d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 28 Mar 2025 13:06:02 +0100 Subject: [PATCH 0170/1614] Update polaris.sh --- ct/polaris.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/polaris.sh b/ct/polaris.sh index 9cb58cd..2a05cbf 100644 --- a/ct/polaris.sh +++ b/ct/polaris.sh @@ -1,5 +1,5 @@ #!/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: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE @@ -37,4 +37,4 @@ 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}meilisearch: http://${IP}:5050${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5050${CL}" From d3f17bdfeddc1cc512d61a1201d0f91e63f77db6 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Fri, 28 Mar 2025 12:36:04 +0000 Subject: [PATCH 0171/1614] Update versions.json --- frontend/public/json/versions.json | 214 ++++++++++++++--------------- 1 file changed, 107 insertions(+), 107 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 0a4692f..c3370cc 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,4 +1,104 @@ [ + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-03-28T10:33:13Z" + }, + { + "name": "cockpit-project/cockpit", + "version": "336.2", + "date": "2025-03-28T10:16:47Z" + }, + { + "name": "YunoHost/yunohost", + "version": "debian/12.0.12", + "date": "2025-03-16T11:59:24Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1702", + "date": "2025-03-28T05:57:28Z" + }, + { + "name": "gethomepage/homepage", + "version": "v1.1.1", + "date": "2025-03-28T04:12:31Z" + }, + { + "name": "documenso/documenso", + "version": "v1.10.0-rc.3", + "date": "2025-03-28T03:45:54Z" + }, + { + "name": "theonedev/onedev", + "version": "v11.8.1", + "date": "2025-03-28T00:13:20Z" + }, + { + "name": "StarFleetCPTN/GoMFT", + "version": "v.0.2.3", + "date": "2025-03-27T23:54:49Z" + }, + { + "name": "Bubka/2FAuth", + "version": "v5.5.0", + "date": "2025-03-27T22:35:02Z" + }, + { + "name": "ellite/Wallos", + "version": "v2.48.1", + "date": "2025-03-27T22:02:16Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" + }, + { + "name": "home-assistant/core", + "version": "2025.3.4", + "date": "2025-03-21T20:22:46Z" + }, + { + "name": "gristlabs/grist-core", + "version": "v1.5.0", + "date": "2025-03-27T19:59:55Z" + }, + { + "name": "hivemq/hivemq-community-edition", + "version": "2025.2", + "date": "2025-03-27T19:21:13Z" + }, + { + "name": "fallenbagel/jellyseerr", + "version": "preview-music-support", + "date": "2025-03-27T16:54:41Z" + }, + { + "name": "immich-app/immich", + "version": "v1.130.3", + "date": "2025-03-27T16:38:04Z" + }, + { + "name": "msgbyte/tianji", + "version": "v1.19.4", + "date": "2025-03-27T16:25:34Z" + }, + { + "name": "zwave-js/zwave-js-ui", + "version": "v10.1.3", + "date": "2025-03-27T15:51:38Z" + }, + { + "name": "home-assistant/operating-system", + "version": "15.0", + "date": "2025-03-17T10:26:18Z" + }, + { + "name": "tailscale/tailscale", + "version": "v1.82.0", + "date": "2025-03-27T13:08:18Z" + }, { "name": "n8n-io/n8n", "version": "n8n@1.84.3", @@ -14,16 +114,6 @@ "version": "v1.29.3", "date": "2025-03-12T11:56:30Z" }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-03-27T10:33:31Z" - }, - { - "name": "home-assistant/core", - "version": "2025.3.4", - "date": "2025-03-21T20:22:46Z" - }, { "name": "evcc-io/evcc", "version": "0.202.1", @@ -34,26 +124,21 @@ "version": "v1.5.1", "date": "2025-01-01T16:15:52Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1699", - "date": "2025-03-27T05:57:08Z" - }, { "name": "openobserve/openobserve", "version": "v0.14.5-rc6", "date": "2025-03-27T05:15:49Z" }, - { - "name": "StarFleetCPTN/GoMFT", - "version": "v0.2.1", - "date": "2025-03-27T02:08:19Z" - }, { "name": "element-hq/synapse", "version": "v1.127.1", "date": "2025-03-26T21:44:28Z" }, + { + "name": "wazuh/wazuh", + "version": "coverity-w13-4.12.0", + "date": "2025-03-26T21:11:43Z" + }, { "name": "duplicati/duplicati", "version": "v2.1.0.112-2.1.0.112_canary_2025-03-26", @@ -61,8 +146,8 @@ }, { "name": "ollama/ollama", - "version": "v0.6.2", - "date": "2025-03-18T03:11:33Z" + "version": "v0.6.3-rc1", + "date": "2025-03-26T20:39:01Z" }, { "name": "runtipi/runtipi", @@ -74,31 +159,11 @@ "version": "v0.7.8", "date": "2025-03-26T19:59:07Z" }, - { - "name": "tailscale/tailscale", - "version": "v1.82.0", - "date": "2025-03-26T19:50:59Z" - }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, { "name": "semaphoreui/semaphore", "version": "v2.13.2", "date": "2025-03-26T19:13:48Z" }, - { - "name": "wazuh/wazuh", - "version": "coverity-w11-4.12.0", - "date": "2025-03-14T20:04:02Z" - }, - { - "name": "immich-app/immich", - "version": "v1.130.2", - "date": "2025-03-26T16:01:25Z" - }, { "name": "dgtlmoon/changedetection.io", "version": "0.49.9", @@ -134,16 +199,6 @@ "version": "v0.26.4", "date": "2025-03-26T05:16:46Z" }, - { - "name": "theonedev/onedev", - "version": "v11.8.0", - "date": "2025-03-26T04:41:15Z" - }, - { - "name": "cockpit-project/cockpit", - "version": "336.1", - "date": "2025-03-26T04:10:14Z" - }, { "name": "esphome/esphome", "version": "2025.3.2", @@ -194,16 +249,6 @@ "version": "jenkins-2.503", "date": "2025-03-25T14:01:20Z" }, - { - "name": "zwave-js/zwave-js-ui", - "version": "v10.1.2", - "date": "2025-03-25T13:56:22Z" - }, - { - "name": "msgbyte/tianji", - "version": "v1.19.3", - "date": "2025-03-25T13:50:19Z" - }, { "name": "crowdsecurity/crowdsec", "version": "v1.6.8", @@ -229,11 +274,6 @@ "version": "v2.9.1", "date": "2025-01-08T15:22:53Z" }, - { - "name": "fallenbagel/jellyseerr", - "version": "preview-OIDC", - "date": "2025-03-25T00:28:11Z" - }, { "name": "influxdata/influxdb", "version": "v3.0.0-0.beta.2", @@ -299,11 +339,6 @@ "version": "v2.10.3.4602", "date": "2025-03-23T11:00:37Z" }, - { - "name": "YunoHost/yunohost", - "version": "debian/12.0.12", - "date": "2025-03-16T11:59:24Z" - }, { "name": "nicolargo/glances", "version": "v4.3.1", @@ -329,11 +364,6 @@ "version": "sdk/v0.23.0", "date": "2025-03-22T17:26:10Z" }, - { - "name": "documenso/documenso", - "version": "v1.10.0-rc.1", - "date": "2025-03-22T06:34:33Z" - }, { "name": "netbox-community/netbox", "version": "v4.2.6", @@ -379,11 +409,6 @@ "version": "v1.10.4", "date": "2025-03-20T18:56:10Z" }, - { - "name": "ellite/Wallos", - "version": "v2.48.0", - "date": "2025-03-20T16:57:43Z" - }, { "name": "neo4j/neo4j", "version": "4.4.42", @@ -469,21 +494,11 @@ "version": "v0.92.4", "date": "2025-03-17T16:00:19Z" }, - { - "name": "home-assistant/operating-system", - "version": "15.0", - "date": "2025-03-17T10:26:18Z" - }, { "name": "webmin/webmin", "version": "2.303", "date": "2025-03-17T04:54:50Z" }, - { - "name": "gethomepage/homepage", - "version": "v1.0.4", - "date": "2025-03-16T22:19:31Z" - }, { "name": "autobrr/autobrr", "version": "v1.60.0", @@ -809,11 +824,6 @@ "version": "v0.18.3", "date": "2025-02-21T20:51:12Z" }, - { - "name": "gristlabs/grist-core", - "version": "v1.4.2", - "date": "2025-02-18T21:43:36Z" - }, { "name": "prometheus-pve/prometheus-pve-exporter", "version": "v3.5.2", @@ -939,11 +949,6 @@ "version": "1.7.6", "date": "2025-02-01T09:50:52Z" }, - { - "name": "hivemq/hivemq-community-edition", - "version": "2025.1", - "date": "2025-01-29T10:04:27Z" - }, { "name": "rustdesk/rustdesk-server", "version": "1.1.14", @@ -1044,11 +1049,6 @@ "version": "v1.7.3", "date": "2024-11-27T21:26:11Z" }, - { - "name": "Bubka/2FAuth", - "version": "v5.4.3", - "date": "2024-11-27T14:02:18Z" - }, { "name": "lldap/lldap", "version": "v0.6.1", From 972ff921b5e31d1eaf59aca852ece82a1525dfaa Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Sat, 29 Mar 2025 12:33:11 +0000 Subject: [PATCH 0172/1614] Update versions.json --- frontend/public/json/versions.json | 226 ++++++++++++++--------------- 1 file changed, 113 insertions(+), 113 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index c3370cc..6ffe8cc 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,8 +1,113 @@ [ + { + "name": "theonedev/onedev", + "version": "v11.8.4", + "date": "2025-03-29T08:28:12Z" + }, + { + "name": "tobychui/zoraxy", + "version": "v3.1.9", + "date": "2025-03-01T02:24:33Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1705", + "date": "2025-03-29T05:54:06Z" + }, + { + "name": "inspircd/inspircd", + "version": "v4.7.0", + "date": "2025-03-29T03:50:50Z" + }, { "name": "fhem/fhem-mirror", "version": "6.2", - "date": "2025-03-28T10:33:13Z" + "date": "2025-03-29T01:59:30Z" + }, + { + "name": "bunkerity/bunkerweb", + "version": "v1.6.1", + "date": "2025-03-15T17:29:17Z" + }, + { + "name": "OliveTin/OliveTin", + "version": "2025.3.28", + "date": "2025-03-29T00:18:56Z" + }, + { + "name": "msgbyte/tianji", + "version": "v1.19.5", + "date": "2025-03-28T22:03:01Z" + }, + { + "name": "homarr-labs/homarr", + "version": "v1.13.1", + "date": "2025-03-28T21:58:30Z" + }, + { + "name": "TasmoAdmin/TasmoAdmin", + "version": "v4.2.3", + "date": "2025-02-09T23:07:48Z" + }, + { + "name": "home-assistant/core", + "version": "2025.3.4", + "date": "2025-03-21T20:22:46Z" + }, + { + "name": "gristlabs/grist-core", + "version": "v1.5.0", + "date": "2025-03-28T20:43:51Z" + }, + { + "name": "grocy/grocy", + "version": "v4.5.0", + "date": "2025-03-28T19:02:22Z" + }, + { + "name": "Brandawg93/PeaNUT", + "version": "v5.6.1", + "date": "2025-03-28T18:40:22Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" + }, + { + "name": "pocketbase/pocketbase", + "version": "v0.26.5", + "date": "2025-03-28T17:41:23Z" + }, + { + "name": "NodeBB/NodeBB", + "version": "v4.2.0", + "date": "2025-03-19T18:34:01Z" + }, + { + "name": "louislam/uptime-kuma", + "version": "2.0.0-beta.2-temp", + "date": "2025-03-28T08:45:58Z" + }, + { + "name": "zitadel/zitadel", + "version": "v2.71.5", + "date": "2025-03-28T15:34:27Z" + }, + { + "name": "emqx/emqx", + "version": "e5.9.0-beta.2", + "date": "2025-03-28T15:06:27Z" + }, + { + "name": "goauthentik/authentik", + "version": "version/2025.2.3", + "date": "2025-03-28T14:28:34Z" + }, + { + "name": "hakimel/reveal.js", + "version": "5.2.1", + "date": "2025-03-28T13:00:23Z" }, { "name": "cockpit-project/cockpit", @@ -14,11 +119,6 @@ "version": "debian/12.0.12", "date": "2025-03-16T11:59:24Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1702", - "date": "2025-03-28T05:57:28Z" - }, { "name": "gethomepage/homepage", "version": "v1.1.1", @@ -29,11 +129,6 @@ "version": "v1.10.0-rc.3", "date": "2025-03-28T03:45:54Z" }, - { - "name": "theonedev/onedev", - "version": "v11.8.1", - "date": "2025-03-28T00:13:20Z" - }, { "name": "StarFleetCPTN/GoMFT", "version": "v.0.2.3", @@ -49,26 +144,16 @@ "version": "v2.48.1", "date": "2025-03-27T22:02:16Z" }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, - { - "name": "home-assistant/core", - "version": "2025.3.4", - "date": "2025-03-21T20:22:46Z" - }, - { - "name": "gristlabs/grist-core", - "version": "v1.5.0", - "date": "2025-03-27T19:59:55Z" - }, { "name": "hivemq/hivemq-community-edition", "version": "2025.2", "date": "2025-03-27T19:21:13Z" }, + { + "name": "TriliumNext/Notes", + "version": "v0.92.4", + "date": "2025-03-17T16:00:19Z" + }, { "name": "fallenbagel/jellyseerr", "version": "preview-music-support", @@ -79,11 +164,6 @@ "version": "v1.130.3", "date": "2025-03-27T16:38:04Z" }, - { - "name": "msgbyte/tianji", - "version": "v1.19.4", - "date": "2025-03-27T16:25:34Z" - }, { "name": "zwave-js/zwave-js-ui", "version": "v10.1.3", @@ -151,8 +231,8 @@ }, { "name": "runtipi/runtipi", - "version": "nightly", - "date": "2025-03-26T20:06:34Z" + "version": "v3.10.0", + "date": "2025-03-15T14:38:16Z" }, { "name": "glanceapp/glance", @@ -194,11 +274,6 @@ "version": "v1.34.0", "date": "2025-03-26T08:48:34Z" }, - { - "name": "pocketbase/pocketbase", - "version": "v0.26.4", - "date": "2025-03-26T05:16:46Z" - }, { "name": "esphome/esphome", "version": "2025.3.2", @@ -234,11 +309,6 @@ "version": "v1.3.0", "date": "2025-03-25T15:55:02Z" }, - { - "name": "emqx/emqx", - "version": "v5.8.6", - "date": "2025-03-25T15:22:13Z" - }, { "name": "hansmi/prometheus-paperless-exporter", "version": "v0.0.7", @@ -264,11 +334,6 @@ "version": "pmm-6401-v1.114.0", "date": "2025-03-25T07:58:34Z" }, - { - "name": "zitadel/zitadel", - "version": "v2.70.6", - "date": "2025-03-25T07:11:32Z" - }, { "name": "caddyserver/caddy", "version": "v2.9.1", @@ -354,11 +419,6 @@ "version": "v0.24.2", "date": "2025-03-23T04:01:50Z" }, - { - "name": "OliveTin/OliveTin", - "version": "2025.3.23", - "date": "2025-03-23T01:38:55Z" - }, { "name": "hoarder-app/hoarder", "version": "sdk/v0.23.0", @@ -384,11 +444,6 @@ "version": "v2.7.6", "date": "2025-03-21T19:24:53Z" }, - { - "name": "homarr-labs/homarr", - "version": "v1.12.0", - "date": "2025-03-21T19:14:59Z" - }, { "name": "photoprism/photoprism", "version": "250321-57590c48b", @@ -424,21 +479,11 @@ "version": "v4.0.7", "date": "2025-02-26T19:07:11Z" }, - { - "name": "NodeBB/NodeBB", - "version": "v4.2.0", - "date": "2025-03-19T18:34:01Z" - }, { "name": "seanmorley15/AdventureLog", "version": "v0.9.0", "date": "2025-03-19T13:30:02Z" }, - { - "name": "hakimel/reveal.js", - "version": "5.2.0", - "date": "2025-03-19T11:03:56Z" - }, { "name": "Luligu/matterbridge", "version": "2.2.5", @@ -479,21 +524,11 @@ "version": "v0.8.5.11", "date": "2025-03-17T19:25:25Z" }, - { - "name": "goauthentik/authentik", - "version": "version/2025.2.2", - "date": "2025-03-17T19:16:49Z" - }, { "name": "Sonarr/Sonarr", "version": "v4.0.14.2939", "date": "2025-03-17T19:12:37Z" }, - { - "name": "TriliumNext/Notes", - "version": "v0.92.4", - "date": "2025-03-17T16:00:19Z" - }, { "name": "webmin/webmin", "version": "2.303", @@ -524,11 +559,6 @@ "version": "v1.0.0-beta18", "date": "2025-03-15T20:24:04Z" }, - { - "name": "bunkerity/bunkerweb", - "version": "v1.6.1", - "date": "2025-03-15T17:29:17Z" - }, { "name": "henrygd/beszel", "version": "v0.10.2", @@ -634,11 +664,6 @@ "version": "v2.0.0.4645", "date": "2017-03-07T18:56:06Z" }, - { - "name": "Brandawg93/PeaNUT", - "version": "v5.6.0", - "date": "2025-03-08T19:02:31Z" - }, { "name": "YuukanOO/seelf", "version": "v2.4.2", @@ -724,21 +749,6 @@ "version": "2.8.0", "date": "2025-03-02T04:30:50Z" }, - { - "name": "inspircd/inspircd", - "version": "v4.6.0", - "date": "2025-03-01T10:29:31Z" - }, - { - "name": "tobychui/zoraxy", - "version": "v3.1.9", - "date": "2025-03-01T02:24:33Z" - }, - { - "name": "grocy/grocy", - "version": "v4.4.2", - "date": "2025-02-28T16:26:05Z" - }, { "name": "jordan-dalby/ByteStash", "version": "v1.5.7", @@ -889,11 +899,6 @@ "version": "v1.9.0", "date": "2025-02-11T13:26:42Z" }, - { - "name": "TasmoAdmin/TasmoAdmin", - "version": "v4.2.3", - "date": "2025-02-09T23:07:48Z" - }, { "name": "dani-garcia/vaultwarden", "version": "1.33.2", @@ -1014,11 +1019,6 @@ "version": "v0.24.6", "date": "2024-12-22T20:24:35Z" }, - { - "name": "louislam/uptime-kuma", - "version": "2.0.0-beta.1", - "date": "2024-12-20T08:56:43Z" - }, { "name": "IceWhaleTech/CasaOS", "version": "v0.4.15", From de9abe2c0c00a45da3e227913c414f3a9caeb5c1 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Sat, 29 Mar 2025 23:59:47 +0100 Subject: [PATCH 0173/1614] Add GoMFT rewrite to testing --- ct/gomft.sh | 84 +++++++++++++++++++++++++++++++ install/gomft-install.sh | 103 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 187 insertions(+) create mode 100644 ct/gomft.sh create mode 100644 install/gomft-install.sh diff --git a/ct/gomft.sh b/ct/gomft.sh new file mode 100644 index 0000000..49e527f --- /dev/null +++ b/ct/gomft.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/StarFleetCPTN/GoMFT + +APP="GoMFT" +var_tags="backup" +var_cpu="1" +var_ram="512" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d "/opt/gomft" ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -fsSL https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if ! dpkg -l | grep -q "^ii.*build-essential"; then + $STD apt-get install -y build-essential + fi + + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop gomft + msg_ok "Stopped $APP" + + msg_info "Updating $APP to ${RELEASE}" + rm -f /opt/gomft/gomft + temp_file=$(mktemp) + curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v.${RELEASE}.tar.gz" -o $temp_file + tar -xzf $temp_file + cp -rf GoMFT-v.${RELEASE}/* /opt/gomft + cd /opt/gomft + rm -f /opt/gomft/node_modules + $STD npm ci + $STD node build.js + $STD go mod download + $STD go get -u github.com/a-h/templ + $STD $HOME/go/bin/templ generate + export CGO_ENABLED=1 + export GOOS=linux + $STD go build -o gomft + chmod +x /opt/gomft/gomft + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to ${RELEASE}" + + msg_info "Cleaning Up" + rm -f $temp_file + rm -rf GoMFT-v.${RELEASE} + msg_ok "Cleanup Complete" + + msg_info "Starting $APP" + systemctl start gomft + msg_ok "Started $APP" + + msg_ok "Update Successful" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + 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}:8080${CL}" diff --git a/install/gomft-install.sh b/install/gomft-install.sh new file mode 100644 index 0000000..6a130e1 --- /dev/null +++ b/install/gomft-install.sh @@ -0,0 +1,103 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/StarFleetCPTN/GoMFT + +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 \ + sqlite3 \ + rclone \ + tzdata \ + ca-certificates \ + build-essential +msg_ok "Installed Dependencies" + +msg_info "Setting up Golang" +set +o pipefail +temp_file=$(mktemp) +golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) +wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file" +tar -C /usr/local -xzf "$temp_file" +ln -sf /usr/local/go/bin/go /usr/local/bin/go +set -o pipefail +msg_ok "Setup Golang" + +msg_info "Setup ${APPLICATION} (Patience)" +temp_file=$(mktemp) +RELEASE=$(curl -fsSL https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v.${RELEASE}.tar.gz" -o $temp_file +tar -xzf $temp_file +mv GoMFT-v.${RELEASE}/ /opt/gomft +cd /opt/gomft +$STD go mod download +$STD go install github.com/a-h/templ/cmd/templ@latest +$STD $HOME/go/bin/templ generate +export CGO_ENABLED=1 +export GOOS=linux +$STD go build -o gomft +chmod +x /opt/gomft/gomft +JWT_SECRET_KEY=$(openssl rand -base64 24 | tr -d '/+=') + +cat </opt/gomft/.env +SERVER_ADDRESS=:8080 +DATA_DIR=/opt/gomft/data/gomft +BACKUP_DIR=/opt/gomft/data/gomft/backups +JWT_SECRET=$JWT_SECRET_KEY +BASE_URL=http://localhost:8080 + +# Email configuration +EMAIL_ENABLED=false +EMAIL_HOST=smtp.example.com +EMAIL_PORT=587 +EMAIL_FROM_EMAIL=gomft@example.com +EMAIL_FROM_NAME=GoMFT +EMAIL_REPLY_TO= +EMAIL_ENABLE_TLS=true +EMAIL_REQUIRE_AUTH=true +EMAIL_USERNAME=smtp_username +EMAIL_PASSWORD=smtp_password +EOF + +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Setup ${APPLICATION}" + +msg_info "Creating Service" +cat </etc/systemd/system/gomft.service +[Unit] +Description=GoMFT Service +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/gomft +ExecStart=/opt/gomft/./gomft +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now gomft +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f $temp_file +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" + +motd_ssh +customize From 7e76675cc6422982a052db780ed052e21381e3ce Mon Sep 17 00:00:00 2001 From: tremor021 Date: Sun, 30 Mar 2025 00:00:06 +0100 Subject: [PATCH 0174/1614] Add GoMFT rewrite to testing --- ct/gomft.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/gomft.sh b/ct/gomft.sh index 49e527f..662c790 100644 --- a/ct/gomft.sh +++ b/ct/gomft.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: Slaviša Arežina (tremor021) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE From af04aae08abfb90d62a4f40fa72915944be36f81 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Sun, 30 Mar 2025 00:06:36 +0100 Subject: [PATCH 0175/1614] Update frontend --- ct/gomft.sh | 2 +- install/gomft-install.sh | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ct/gomft.sh b/ct/gomft.sh index 662c790..49e527f 100644 --- a/ct/gomft.sh +++ b/ct/gomft.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: Slaviša Arežina (tremor021) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE diff --git a/install/gomft-install.sh b/install/gomft-install.sh index 6a130e1..30d1961 100644 --- a/install/gomft-install.sh +++ b/install/gomft-install.sh @@ -19,7 +19,8 @@ $STD apt-get install -y \ rclone \ tzdata \ ca-certificates \ - build-essential + build-essential \ + gnupg msg_ok "Installed Dependencies" msg_info "Setting up Golang" @@ -32,6 +33,17 @@ ln -sf /usr/local/go/bin/go /usr/local/bin/go set -o pipefail msg_ok "Setup Golang" +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + msg_info "Setup ${APPLICATION} (Patience)" temp_file=$(mktemp) RELEASE=$(curl -fsSL https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') @@ -39,8 +51,11 @@ curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v.${RELEASE tar -xzf $temp_file mv GoMFT-v.${RELEASE}/ /opt/gomft cd /opt/gomft +$STD npm ci +$STD node build.js $STD go mod download $STD go install github.com/a-h/templ/cmd/templ@latest +$STD go get -u github.com/a-h/templ $STD $HOME/go/bin/templ generate export CGO_ENABLED=1 export GOOS=linux From 099c9924475a7cfbf00bd166803ce731d9438d44 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Sun, 30 Mar 2025 00:14:04 +0100 Subject: [PATCH 0176/1614] Update GoMFT --- install/gomft-install.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install/gomft-install.sh b/install/gomft-install.sh index 30d1961..a8b3c0c 100644 --- a/install/gomft-install.sh +++ b/install/gomft-install.sh @@ -23,16 +23,6 @@ $STD apt-get install -y \ gnupg msg_ok "Installed Dependencies" -msg_info "Setting up Golang" -set +o pipefail -temp_file=$(mktemp) -golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file" -tar -C /usr/local -xzf "$temp_file" -ln -sf /usr/local/go/bin/go /usr/local/bin/go -set -o pipefail -msg_ok "Setup Golang" - msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg @@ -44,6 +34,16 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" +msg_info "Setting up Golang" +set +o pipefail +temp_file=$(mktemp) +golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) +wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file" +tar -C /usr/local -xzf "$temp_file" +ln -sf /usr/local/go/bin/go /usr/local/bin/go +set -o pipefail +msg_ok "Setup Golang" + msg_info "Setup ${APPLICATION} (Patience)" temp_file=$(mktemp) RELEASE=$(curl -fsSL https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') From 5deeb15cfe4fa467f374aa8d9d4392855d536444 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Sun, 30 Mar 2025 00:20:38 +0100 Subject: [PATCH 0177/1614] Update GoMFT --- ct/gomft.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/gomft.sh b/ct/gomft.sh index 49e527f..662c790 100644 --- a/ct/gomft.sh +++ b/ct/gomft.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: Slaviša Arežina (tremor021) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE From cea8e04b89610a5af18dac0cae0334762bbdb28d Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Sun, 30 Mar 2025 19:16:32 +0200 Subject: [PATCH 0178/1614] Added app: Bar-Assistant --- ct/bar-assistant.sh | 136 +++++++++++++++++++++++++ install/bar-assistant-install.sh | 168 +++++++++++++++++++++++++++++++ 2 files changed, 304 insertions(+) create mode 100644 ct/bar-assistant.sh create mode 100644 install/bar-assistant-install.sh diff --git a/ct/bar-assistant.sh b/ct/bar-assistant.sh new file mode 100644 index 0000000..de694ef --- /dev/null +++ b/ct/bar-assistant.sh @@ -0,0 +1,136 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/karlomikus/bar-assistant +# Source: https://github.com/karlomikus/vue-salt-rim +# Source: https://www.meilisearch.com/ + +APP="Bar-Assistant" +var_tags="${var_tags:-network}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-15}" +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 [[ ! -d /opt/manyfold ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE_MEILISEARCH=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + RELEASE_BARASSISTANT=$(curl -s https://api.github.com/repos/benjaminjonard/manyfold/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + RELEASE_SALTRIM=$(curl -s https://api.github.com/repos/karlomikus/vue-salt-rim/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE_BARASSISTANT}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Service" + systemctl stop nginx + msg_ok "Stopped Service" + + msg_info "Updating ${APP} to v${RELEASE_BARASSISTANT}" + cd /opt + mv /opt/bar-assistant /opt/bar-assistant-backup + curl -fsSL "https://github.com/karlomikus/bar-assistant/archive/refs/tags/v${RELEASE_BARASSISTANT}.zip" -o barassistant.zip + unzip -q barassistant.zip + mv /opt/barassistant-${RELEASE_BARASSISTANT}/ /opt/bar-assistant + cp /opt/bar-assistant-backup/.env /opt/bar-assistant/.env + cp /opt/bar-assistant-backup/storage/bar-assistant /opt/bar-assistant/storage/bar-assistant + cd /opt/bar-assistant + composer install + php artisan migrate --force + php artisan storage:link + php artisan bar:setup-meilisearch + php artisan scout:sync-index-settings + php artisan config:cache + php artisan route:cache + php artisan event:cache + echo "${RELEASE_BARASSISTANT}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE_BARASSISTANT}" + + msg_info "Starting Service" + systemctl start service nginx + msg_ok "Started Service" + + msg_info "Cleaning up" + rm -rf /opt/barassistant.zip + rm -rf /opt/bar-assistant-backup + msg_ok "Cleaned" + else + msg_ok "No update required. ${APP} is already at v${RELEASE_BARASSISTANT}" + fi + + if [[ ! -f /opt/vue-salt-rim_version.txt ]] || [[ "${RELEASE_SALTRIM}" != "$(cat /opt/vue-salt-rim_version.txt)" ]]; then + msg_info "Stopping Service" + systemctl stop nginx + msg_ok "Stopped Service" + + msg_info "Updating Salt Rim to v${RELEASE_SALTRIM}" + cd /opt + mv /opt/vue-salt-rim /opt/vue-salt-rim-backup + curl -fsSL "https://github.com/karlomikus/vue-salt-rim/archive/refs/tags/v${RELEASE_SALTRIM}.zip" -o saltrim.zip + unzip -q saltrim.zip + mv /opt/vue-salt-rim-${RELEASE_SALTRIM}/ /opt/vue-salt-rim + cp /opt/vue-salt-rim-backup/public/config.js /opt/vue-salt-rim/public/config.js + cd /opt/vue-salt-rim + npm run build + echo "${RELEASE_SALTRIM}" >/opt/vue-salt-rim_version.txt + msg_ok "Updated $APP to v${RELEASE_SALTRIM}" + + msg_info "Starting Service" + systemctl start service nginx + msg_ok "Started Service" + + msg_info "Cleaning up" + rm -rf /opt/saltrim.zip + rm -rf /opt/vue-salt-rim-backup + msg_ok "Cleaned" + else + msg_ok "No update required. Salt Rim is already at v${RELEASE_SALTRIM}" + fi + + if [[ ! -f /opt/meilisearch_version.txt ]] || [[ "${RELEASE_MEILISEARCH}" != "$(cat /opt/meilisearch_version.txt)" ]]; then + msg_info "Stopping Service" + systemctl stop meilisearch + msg_ok "Stopped Service" + + msg_info "Updating Meilisearch to v${RELEASE_MEILISEARCH}" + cd /opt + RELEASE=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -o meilisearch.deb + $STD dpkg -i meilisearch.deb + echo "${RELEASE_MEILISEARCH}" >/opt/meilisearch_version.txt + msg_ok "Updated Meilisearch to v${RELEASE_MEILISEARCH}" + + msg_info "Starting Service" + systemctl start meilisearch + msg_ok "Started Service" + + msg_info "Cleaning up" + rm -rf "/opt/meilisearch.deb" + msg_ok "Cleaned" + msg_ok "Updated Meilisearch" + else + msg_ok "No update required. Meilisearch is already at v${RELEASE_MEILISEARCH}" + 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}${CL}" diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh new file mode 100644 index 0000000..4d9e25f --- /dev/null +++ b/install/bar-assistant-install.sh @@ -0,0 +1,168 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/karlomikus/bar-assistant +# Source: https://github.com/karlomikus/vue-salt-rim +# Source: https://www.meilisearch.com/ + +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 \ + php-{ffi,opcache,redis,zip,pdo-sqlite,bcmath,pdo,curl,dom,fpm} \ + composer \ + redis-server \ + npm \ + nginx +msg_ok "Installed Dependencies" + +msg_info "Installing MeiliSearch" +cd /opt +RELEASE_MEILISEARCH=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -o meilisearch.deb +$STD dpkg -i meilisearch.deb +curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml -o /etc/meilisearch.toml +MASTER_KEY=$(openssl rand -base64 12) +LOCAL_IP="$(hostname -I | awk '{print $1}')" +sed -i \ + -e 's|^env =.*|env = "production"|' \ + -e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \ + -e 's|^db_path =.*|db_path = "/var/lib/meilisearch/data"|' \ + -e 's|^dump_dir =.*|dump_dir = "/var/lib/meilisearch/dumps"|' \ + -e 's|^snapshot_dir =.*|snapshot_dir = "/var/lib/meilisearch/snapshots"|' \ + -e 's|^# no_analytics = true|no_analytics = true|' \ + -e 's|^http_addr =.*|http_addr = "0.0.0.0:7700"|' \ + /etc/meilisearch.toml +echo "${RELEASE_MEILISEARCH}" >/opt/meilisearch_version.txt +msg_ok "Installed MeiliSearch" + +msg_info "Creating MeiliSearch service" +cat </etc/systemd/system/meilisearch.service +[Unit] +Description=Meilisearch +After=network.target + +[Service] +ExecStart=/usr/bin/meilisearch --config-file-path /etc/meilisearch.toml +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now meilisearch +msg_ok "Created Service MeiliSearch" + +msg_info "Installing Bar Assistant" +RELEASE_BARASSISTANT=$(curl -s https://api.github.com/repos/karlomikus/bar-assistant/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +cd /opt +curl -fsSL "https://github.com/karlomikus/bar-assistant/archive/refs/tags/v${RELEASE_BARASSISTANT}.zip" -o barassistant.zip +unzip -q barassistant.zip +mv /opt/barassistant-${RELEASE_BARASSISTANT}/ /opt/bar-assistant +cd /opt/bar-assistant +cp /opt/bar-assistant/.env.dist /opt/bar-assistant/.env +MeiliSearch_API_KEY=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"key":"[^"]*"' | head -n 1 | sed 's/"key":"//;s/"//') +MeiliSearch_API_KEY_UID=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"uid":"[^"]*"' | head -n 1 | sed 's/"uid":"//;s/"//') + +composer install +php artisan key:generate +touch storage/bar-assistant/database.ba3.sqlite +php artisan migrate --force +php artisan storage:link +php artisan bar:setup-meilisearch +php artisan scout:sync-index-settings +php artisan config:cache +php artisan route:cache +php artisan event:cache +echo "${RELEASE_BARASSISTANT}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Bar Assistant" + +msg_info "Installing Salt Rim" +RELEASE_SALTRIM=$(curl -s https://api.github.com/repos/karlomikus/vue-salt-rim/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +cd /opt +curl -fsSL "https://github.com/karlomikus/vue-salt-rim/archive/refs/tags/v${RELEASE_SALTRIM}.zip" -o saltrim.zip +unzip -q saltrim.zip +mv /opt/vue-salt-rim-${RELEASE_SALTRIM}/ /opt/vue-salt-rim +cd /opt/vue-salt-rim +cat </opt/vue-salt-rim/public/config.js +window.srConfig = {} +window.srConfig.API_URL = "http://my-bar.com" +window.srConfig.MEILISEARCH_URL = "http://my-milisearch.com" +EOF +npm run build +echo "${RELEASE_SALTRIM}" >/opt/vue-salt-rim_version.txt +msg_ok "Installed Salt Rim" + +msg_info "Creating Service" +cat </etc/nginx/sites-available/barassistant.conf +server { + listen 80; + listen [::]:80; + server_name example.com; + root /opt/bar-assistant/public; + + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-Content-Type-Options "nosniff"; + + index index.php; + + charset utf-8; + + location / { + try_files $uri $uri/ /index.php?$query_string; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + error_page 404 /index.php; + + location ~ ^/index\.php(/|$) { + fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + include fastcgi_params; + fastcgi_hide_header X-Powered-By; + } + + location ~ /\.(?!well-known).* { + deny all; + } +} +EOF + +cat </etc/nginx/sites-available/saltrim.conf +server { + listen 8080 default_server; + listen [::]:8080 default_server; + server_name _; + root /opt/vue-salt-rim/dist; + + location / { + try_files $uri $uri/ /index.html; + } +} +EOF + +ln -s /etc/nginx/sites-available/barassistant.conf /etc/nginx/sites-enabled/ +ln -s /etc/nginx/sites-available/saltrim.conf /etc/nginx/sites-enabled/ +rm -f /etc/nginx/sites-enabled/default +$STD systemctl reload nginx +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/meilisearch.deb +rm -rf "/opt/barassistant.zip" +rm -rf "/opt/saltrim.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From c0bf8b9f3a7bd21628ebdd3d93222b0d0c0b9f8e Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Sun, 30 Mar 2025 19:18:47 +0200 Subject: [PATCH 0179/1614] Fix path --- ct/bar-assistant.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/bar-assistant.sh b/ct/bar-assistant.sh index de694ef..c8d1038 100644 --- a/ct/bar-assistant.sh +++ b/ct/bar-assistant.sh @@ -25,7 +25,7 @@ function update_script() { header_info check_container_storage check_container_resources - if [[ ! -d /opt/manyfold ]]; then + if [[ ! -d /opt/bar-assistant ]]; then msg_error "No ${APP} Installation Found!" exit fi From 6a2ea6b45b76ca9bc415ba21e6913d4f505f1f87 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Sun, 30 Mar 2025 19:22:54 +0200 Subject: [PATCH 0180/1614] Create bar-assistant --- ct/headers/bar-assistant | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/bar-assistant diff --git a/ct/headers/bar-assistant b/ct/headers/bar-assistant new file mode 100644 index 0000000..ee941a6 --- /dev/null +++ b/ct/headers/bar-assistant @@ -0,0 +1,6 @@ + ____ ___ _ __ __ + / __ )____ ______ / | __________(_)____/ /_____ _____ / /_ + / __ / __ `/ ___/_____/ /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ + / /_/ / /_/ / / /_____/ ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_____/\__,_/_/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ + From 8155c9058de504ad38d42db18528297c824da4d4 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Sun, 30 Mar 2025 19:29:28 +0200 Subject: [PATCH 0181/1614] Fix typo --- ct/bar-assistant.sh | 2 +- install/bar-assistant-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/bar-assistant.sh b/ct/bar-assistant.sh index c8d1038..a898c60 100644 --- a/ct/bar-assistant.sh +++ b/ct/bar-assistant.sh @@ -43,7 +43,7 @@ function update_script() { mv /opt/bar-assistant /opt/bar-assistant-backup curl -fsSL "https://github.com/karlomikus/bar-assistant/archive/refs/tags/v${RELEASE_BARASSISTANT}.zip" -o barassistant.zip unzip -q barassistant.zip - mv /opt/barassistant-${RELEASE_BARASSISTANT}/ /opt/bar-assistant + mv /opt/bar-assistant-${RELEASE_BARASSISTANT}/ /opt/bar-assistant cp /opt/bar-assistant-backup/.env /opt/bar-assistant/.env cp /opt/bar-assistant-backup/storage/bar-assistant /opt/bar-assistant/storage/bar-assistant cd /opt/bar-assistant diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 4d9e25f..3548b62 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -65,7 +65,7 @@ RELEASE_BARASSISTANT=$(curl -s https://api.github.com/repos/karlomikus/bar-assis cd /opt curl -fsSL "https://github.com/karlomikus/bar-assistant/archive/refs/tags/v${RELEASE_BARASSISTANT}.zip" -o barassistant.zip unzip -q barassistant.zip -mv /opt/barassistant-${RELEASE_BARASSISTANT}/ /opt/bar-assistant +mv /opt/bar-assistant-${RELEASE_BARASSISTANT}/ /opt/bar-assistant cd /opt/bar-assistant cp /opt/bar-assistant/.env.dist /opt/bar-assistant/.env MeiliSearch_API_KEY=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"key":"[^"]*"' | head -n 1 | sed 's/"key":"//;s/"//') From d8c5e591e9e976fcbcca1807cfa0794e3319fbd5 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Sun, 30 Mar 2025 20:05:35 +0200 Subject: [PATCH 0182/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 3548b62..1fb20ed 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -70,17 +70,21 @@ cd /opt/bar-assistant cp /opt/bar-assistant/.env.dist /opt/bar-assistant/.env MeiliSearch_API_KEY=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"key":"[^"]*"' | head -n 1 | sed 's/"key":"//;s/"//') MeiliSearch_API_KEY_UID=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"uid":"[^"]*"' | head -n 1 | sed 's/"uid":"//;s/"//') - -composer install -php artisan key:generate +sed -i -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=127.0.0.1|" \ + -e "s|^MEILISEARCH_KEY=|MEILISEARCH_KEY=${MASTER_KEY}|" \ + -e "s|^MEILISEARCH_API_KEY=|MEILISEARCH_API_KEY=${MeiliSearch_API_KEY}|" \ + -e "s|^MEILISEARCH_API_KEY_UID=|MEILISEARCH_API_KEY_UID=${MeiliSearch_API_KEY_UID}|" \ + /opt/bar-assistant/.env +$STD composer install --no-interaction +$STD php artisan key:generate touch storage/bar-assistant/database.ba3.sqlite -php artisan migrate --force -php artisan storage:link -php artisan bar:setup-meilisearch -php artisan scout:sync-index-settings -php artisan config:cache -php artisan route:cache -php artisan event:cache +$STD php artisan migrate --force +$STD php artisan storage:link +$STD php artisan bar:setup-meilisearch +$STD php artisan scout:sync-index-settings +$STD php artisan config:cache +$STD php artisan route:cache +$STD php artisan event:cache echo "${RELEASE_BARASSISTANT}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Bar Assistant" From e9430760e7daeff8ba63984e24f477651204cf25 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Sun, 30 Mar 2025 20:20:30 +0200 Subject: [PATCH 0183/1614] Fix sed --- install/bar-assistant-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 1fb20ed..9eb42e1 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -70,7 +70,7 @@ cd /opt/bar-assistant cp /opt/bar-assistant/.env.dist /opt/bar-assistant/.env MeiliSearch_API_KEY=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"key":"[^"]*"' | head -n 1 | sed 's/"key":"//;s/"//') MeiliSearch_API_KEY_UID=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"uid":"[^"]*"' | head -n 1 | sed 's/"uid":"//;s/"//') -sed -i -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=127.0.0.1|" \ +sed -i -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://127.0.0.1:7700|" \ -e "s|^MEILISEARCH_KEY=|MEILISEARCH_KEY=${MASTER_KEY}|" \ -e "s|^MEILISEARCH_API_KEY=|MEILISEARCH_API_KEY=${MeiliSearch_API_KEY}|" \ -e "s|^MEILISEARCH_API_KEY_UID=|MEILISEARCH_API_KEY_UID=${MeiliSearch_API_KEY_UID}|" \ From 9c49a624665cee24b3ec2cba1ef7ec10c3024840 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Sun, 30 Mar 2025 21:42:17 +0200 Subject: [PATCH 0184/1614] Fix salt rim config --- install/bar-assistant-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 9eb42e1..414cda2 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -31,7 +31,6 @@ curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/m $STD dpkg -i meilisearch.deb curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml -o /etc/meilisearch.toml MASTER_KEY=$(openssl rand -base64 12) -LOCAL_IP="$(hostname -I | awk '{print $1}')" sed -i \ -e 's|^env =.*|env = "production"|' \ -e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \ @@ -95,10 +94,11 @@ curl -fsSL "https://github.com/karlomikus/vue-salt-rim/archive/refs/tags/v${RELE unzip -q saltrim.zip mv /opt/vue-salt-rim-${RELEASE_SALTRIM}/ /opt/vue-salt-rim cd /opt/vue-salt-rim +LOCAL_IP=$(hostname -I | awk '{print $1}') cat </opt/vue-salt-rim/public/config.js window.srConfig = {} -window.srConfig.API_URL = "http://my-bar.com" -window.srConfig.MEILISEARCH_URL = "http://my-milisearch.com" +window.srConfig.API_URL = "http://${LOCAL_IP}" +window.srConfig.MEILISEARCH_URL = "http://127.0.0.1:7700" EOF npm run build echo "${RELEASE_SALTRIM}" >/opt/vue-salt-rim_version.txt From fb1e9f2f4ed058b69dab9da1ad9bf72751ee6bd9 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Sun, 30 Mar 2025 21:44:33 +0200 Subject: [PATCH 0185/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 414cda2..0f20963 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -100,7 +100,8 @@ window.srConfig = {} window.srConfig.API_URL = "http://${LOCAL_IP}" window.srConfig.MEILISEARCH_URL = "http://127.0.0.1:7700" EOF -npm run build +$STD npm install +$STD npm run build echo "${RELEASE_SALTRIM}" >/opt/vue-salt-rim_version.txt msg_ok "Installed Salt Rim" From 09d14df2eb9e9b9b9dc9899e0ca500ee7845fc9b Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Sun, 30 Mar 2025 21:52:02 +0200 Subject: [PATCH 0186/1614] Fix nginx --- install/bar-assistant-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 0f20963..452c237 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -121,7 +121,7 @@ server { charset utf-8; location / { - try_files $uri $uri/ /index.php?$query_string; + try_files \$uri \$uri/ /index.php?\$query_string; } location = /favicon.ico { access_log off; log_not_found off; } @@ -131,7 +131,7 @@ server { location ~ ^/index\.php(/|$) { fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; - fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name; include fastcgi_params; fastcgi_hide_header X-Powered-By; } @@ -150,7 +150,7 @@ server { root /opt/vue-salt-rim/dist; location / { - try_files $uri $uri/ /index.html; + try_files \$uri \$uri/ /index.html; } } EOF From 2da05bd74216c9395754f66f4375bb227cdac563 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Sun, 30 Mar 2025 22:05:25 +0200 Subject: [PATCH 0187/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 452c237..7bd33c8 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -69,7 +69,8 @@ cd /opt/bar-assistant cp /opt/bar-assistant/.env.dist /opt/bar-assistant/.env MeiliSearch_API_KEY=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"key":"[^"]*"' | head -n 1 | sed 's/"key":"//;s/"//') MeiliSearch_API_KEY_UID=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"uid":"[^"]*"' | head -n 1 | sed 's/"uid":"//;s/"//') -sed -i -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://127.0.0.1:7700|" \ +LOCAL_IP=$(hostname -I | awk '{print $1}') +sed -i -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://${LOCAL_IP}:7700|" \ -e "s|^MEILISEARCH_KEY=|MEILISEARCH_KEY=${MASTER_KEY}|" \ -e "s|^MEILISEARCH_API_KEY=|MEILISEARCH_API_KEY=${MeiliSearch_API_KEY}|" \ -e "s|^MEILISEARCH_API_KEY_UID=|MEILISEARCH_API_KEY_UID=${MeiliSearch_API_KEY_UID}|" \ @@ -94,11 +95,10 @@ curl -fsSL "https://github.com/karlomikus/vue-salt-rim/archive/refs/tags/v${RELE unzip -q saltrim.zip mv /opt/vue-salt-rim-${RELEASE_SALTRIM}/ /opt/vue-salt-rim cd /opt/vue-salt-rim -LOCAL_IP=$(hostname -I | awk '{print $1}') cat </opt/vue-salt-rim/public/config.js window.srConfig = {} window.srConfig.API_URL = "http://${LOCAL_IP}" -window.srConfig.MEILISEARCH_URL = "http://127.0.0.1:7700" +window.srConfig.MEILISEARCH_URL = "http://${LOCAL_IP}:7700" EOF $STD npm install $STD npm run build From 4c2429a47990cf6784bc39455825104b867a783d Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Mon, 31 Mar 2025 01:27:10 +0000 Subject: [PATCH 0188/1614] Update versions.json --- frontend/public/json/versions.json | 222 ++++++++++++++--------------- 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 6ffe8cc..38a1dad 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,19 +1,124 @@ [ + { + "name": "TriliumNext/Notes", + "version": "v0.92.5", + "date": "2025-03-30T12:32:43Z" + }, + { + "name": "icereed/paperless-gpt", + "version": "v0.14.2", + "date": "2025-03-30T19:50:38Z" + }, + { + "name": "StarFleetCPTN/GoMFT", + "version": "v0.2.4", + "date": "2025-03-30T19:46:08Z" + }, + { + "name": "semaphoreui/semaphore", + "version": "v2.13.3", + "date": "2025-03-30T19:24:44Z" + }, + { + "name": "louislam/dockge", + "version": "1.5.0", + "date": "2025-03-30T17:42:59Z" + }, + { + "name": "pi-hole/pi-hole", + "version": "v6.0.6", + "date": "2025-03-30T16:59:06Z" + }, + { + "name": "sabnzbd/sabnzbd", + "version": "4.5.0", + "date": "2025-03-30T16:17:11Z" + }, + { + "name": "Part-DB/Part-DB-server", + "version": "v1.17.0", + "date": "2025-03-30T14:21:53Z" + }, + { + "name": "openhab/openhab-core", + "version": "4.3.4", + "date": "2025-03-30T13:32:38Z" + }, + { + "name": "pocketbase/pocketbase", + "version": "v0.26.6", + "date": "2025-03-30T08:02:19Z" + }, + { + "name": "Prowlarr/Prowlarr", + "version": "v1.32.2.4987", + "date": "2025-03-16T09:41:37Z" + }, + { + "name": "Readarr/Readarr", + "version": "v2.0.0.4645", + "date": "2017-03-07T18:56:06Z" + }, + { + "name": "Lidarr/Lidarr", + "version": "v2.10.3.4602", + "date": "2025-03-23T11:00:37Z" + }, + { + "name": "Radarr/Radarr", + "version": "v5.21.1.9799", + "date": "2025-03-24T15:52:12Z" + }, + { + "name": "aceberg/WatchYourLAN", + "version": "2.1.2-alpine", + "date": "2025-03-30T06:25:22Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1709", + "date": "2025-03-30T05:51:21Z" + }, + { + "name": "pocket-id/pocket-id", + "version": "v0.45.0", + "date": "2025-03-29T23:12:22Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" + }, + { + "name": "glanceapp/glance", + "version": "v0.7.9", + "date": "2025-03-29T18:08:11Z" + }, + { + "name": "home-assistant/core", + "version": "2025.3.4", + "date": "2025-03-21T20:22:46Z" + }, { "name": "theonedev/onedev", "version": "v11.8.4", - "date": "2025-03-29T08:28:12Z" + "date": "2025-03-29T13:37:15Z" + }, + { + "name": "runtipi/runtipi", + "version": "nightly", + "date": "2025-03-29T12:57:40Z" + }, + { + "name": "syncthing/syncthing", + "version": "v2.0.0-beta.1", + "date": "2025-03-29T12:53:28Z" }, { "name": "tobychui/zoraxy", "version": "v3.1.9", "date": "2025-03-01T02:24:33Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1705", - "date": "2025-03-29T05:54:06Z" - }, { "name": "inspircd/inspircd", "version": "v4.7.0", @@ -49,11 +154,6 @@ "version": "v4.2.3", "date": "2025-02-09T23:07:48Z" }, - { - "name": "home-assistant/core", - "version": "2025.3.4", - "date": "2025-03-21T20:22:46Z" - }, { "name": "gristlabs/grist-core", "version": "v1.5.0", @@ -69,16 +169,6 @@ "version": "v5.6.1", "date": "2025-03-28T18:40:22Z" }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, - { - "name": "pocketbase/pocketbase", - "version": "v0.26.5", - "date": "2025-03-28T17:41:23Z" - }, { "name": "NodeBB/NodeBB", "version": "v4.2.0", @@ -129,11 +219,6 @@ "version": "v1.10.0-rc.3", "date": "2025-03-28T03:45:54Z" }, - { - "name": "StarFleetCPTN/GoMFT", - "version": "v.0.2.3", - "date": "2025-03-27T23:54:49Z" - }, { "name": "Bubka/2FAuth", "version": "v5.5.0", @@ -149,11 +234,6 @@ "version": "2025.2", "date": "2025-03-27T19:21:13Z" }, - { - "name": "TriliumNext/Notes", - "version": "v0.92.4", - "date": "2025-03-17T16:00:19Z" - }, { "name": "fallenbagel/jellyseerr", "version": "preview-music-support", @@ -189,11 +269,6 @@ "version": "7.2.5", "date": "2025-03-27T11:06:48Z" }, - { - "name": "syncthing/syncthing", - "version": "v1.29.3", - "date": "2025-03-12T11:56:30Z" - }, { "name": "evcc-io/evcc", "version": "0.202.1", @@ -229,21 +304,6 @@ "version": "v0.6.3-rc1", "date": "2025-03-26T20:39:01Z" }, - { - "name": "runtipi/runtipi", - "version": "v3.10.0", - "date": "2025-03-15T14:38:16Z" - }, - { - "name": "glanceapp/glance", - "version": "v0.7.8", - "date": "2025-03-26T19:59:07Z" - }, - { - "name": "semaphoreui/semaphore", - "version": "v2.13.2", - "date": "2025-03-26T19:13:48Z" - }, { "name": "dgtlmoon/changedetection.io", "version": "0.49.9", @@ -294,16 +354,6 @@ "version": "v0.34.1", "date": "2025-03-25T18:11:12Z" }, - { - "name": "aceberg/WatchYourLAN", - "version": "2.1.1", - "date": "2025-03-25T17:21:41Z" - }, - { - "name": "pocket-id/pocket-id", - "version": "v0.44.0", - "date": "2025-03-25T16:09:10Z" - }, { "name": "dotnetfactory/fluid-calendar", "version": "v1.3.0", @@ -324,11 +374,6 @@ "version": "v1.6.8", "date": "2025-03-25T13:33:10Z" }, - { - "name": "icereed/paperless-gpt", - "version": "v0.14.1", - "date": "2025-03-25T10:09:14Z" - }, { "name": "VictoriaMetrics/VictoriaMetrics", "version": "pmm-6401-v1.114.0", @@ -364,11 +409,6 @@ "version": "v0.9.0", "date": "2025-03-24T18:25:37Z" }, - { - "name": "Radarr/Radarr", - "version": "v5.21.1.9799", - "date": "2025-03-24T15:52:12Z" - }, { "name": "Graylog2/graylog2-server", "version": "6.2.0-beta.2", @@ -399,21 +439,11 @@ "version": "v1.17.0", "date": "2025-03-24T00:46:32Z" }, - { - "name": "Lidarr/Lidarr", - "version": "v2.10.3.4602", - "date": "2025-03-23T11:00:37Z" - }, { "name": "nicolargo/glances", "version": "v4.3.1", "date": "2025-03-23T09:02:54Z" }, - { - "name": "Prowlarr/Prowlarr", - "version": "v1.32.2.4987", - "date": "2025-03-16T09:41:37Z" - }, { "name": "usememos/memos", "version": "v0.24.2", @@ -429,11 +459,6 @@ "version": "v4.2.6", "date": "2025-03-21T21:20:29Z" }, - { - "name": "sabnzbd/sabnzbd", - "version": "4.4.1", - "date": "2024-12-20T13:21:31Z" - }, { "name": "leiweibau/Pi.Alert", "version": "v2025-03-21", @@ -659,11 +684,6 @@ "version": "v21.0.0.0", "date": "2025-03-09T12:25:44Z" }, - { - "name": "Readarr/Readarr", - "version": "v2.0.0.4645", - "date": "2017-03-07T18:56:06Z" - }, { "name": "YuukanOO/seelf", "version": "v2.4.2", @@ -724,11 +744,6 @@ "version": "10.1.39", "date": "2025-03-04T19:05:18Z" }, - { - "name": "pi-hole/pi-hole", - "version": "v6.0.5", - "date": "2025-03-04T17:28:41Z" - }, { "name": "sysadminsmedia/homebox", "version": "v0.18.0", @@ -764,11 +779,6 @@ "version": "v6.11.2", "date": "2025-02-26T14:54:49Z" }, - { - "name": "Part-DB/Part-DB-server", - "version": "v1.16.1", - "date": "2025-02-26T11:29:15Z" - }, { "name": "silverbulletmd/silverbullet", "version": "0.10.4", @@ -814,11 +824,6 @@ "version": "5.6.1", "date": "2025-02-23T20:39:48Z" }, - { - "name": "openhab/openhab-core", - "version": "5.0.0.M1", - "date": "2025-02-23T14:55:36Z" - }, { "name": "outline/outline", "version": "v0.82.1-15", @@ -1184,11 +1189,6 @@ "version": "v4.4.3", "date": "2024-04-06T12:24:35Z" }, - { - "name": "louislam/dockge", - "version": "1.4.2", - "date": "2024-01-21T17:02:52Z" - }, { "name": "hyperion-project/hyperion.ng", "version": "2.0.16", From 5a5cf9426fadf797d5ca60693c386f9e76f028f1 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 31 Mar 2025 09:31:15 +0200 Subject: [PATCH 0189/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 51 ++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 7bd33c8..69d7da7 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -38,7 +38,7 @@ sed -i \ -e 's|^dump_dir =.*|dump_dir = "/var/lib/meilisearch/dumps"|' \ -e 's|^snapshot_dir =.*|snapshot_dir = "/var/lib/meilisearch/snapshots"|' \ -e 's|^# no_analytics = true|no_analytics = true|' \ - -e 's|^http_addr =.*|http_addr = "0.0.0.0:7700"|' \ + -e 's|^http_addr =.*|http_addr = "127.0.0.1:7700"|' \ /etc/meilisearch.toml echo "${RELEASE_MEILISEARCH}" >/opt/meilisearch_version.txt msg_ok "Installed MeiliSearch" @@ -70,7 +70,8 @@ cp /opt/bar-assistant/.env.dist /opt/bar-assistant/.env MeiliSearch_API_KEY=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"key":"[^"]*"' | head -n 1 | sed 's/"key":"//;s/"//') MeiliSearch_API_KEY_UID=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"uid":"[^"]*"' | head -n 1 | sed 's/"uid":"//;s/"//') LOCAL_IP=$(hostname -I | awk '{print $1}') -sed -i -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://${LOCAL_IP}:7700|" \ +sed -i -e "s|^APP_URL=|APP_URL=http://${LOCAL_IP}/bar/|" \ + -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://${LOCAL_IP}/search/|" \ -e "s|^MEILISEARCH_KEY=|MEILISEARCH_KEY=${MASTER_KEY}|" \ -e "s|^MEILISEARCH_API_KEY=|MEILISEARCH_API_KEY=${MeiliSearch_API_KEY}|" \ -e "s|^MEILISEARCH_API_KEY_UID=|MEILISEARCH_API_KEY_UID=${MeiliSearch_API_KEY_UID}|" \ @@ -97,8 +98,8 @@ mv /opt/vue-salt-rim-${RELEASE_SALTRIM}/ /opt/vue-salt-rim cd /opt/vue-salt-rim cat </opt/vue-salt-rim/public/config.js window.srConfig = {} -window.srConfig.API_URL = "http://${LOCAL_IP}" -window.srConfig.MEILISEARCH_URL = "http://${LOCAL_IP}:7700" +window.srConfig.API_URL = "http://${LOCAL_IP}/bar/" +window.srConfig.MEILISEARCH_URL = "http://${LOCAL_IP}/search/" EOF $STD npm install $STD npm run build @@ -108,8 +109,38 @@ msg_ok "Installed Salt Rim" msg_info "Creating Service" cat </etc/nginx/sites-available/barassistant.conf server { - listen 80; - listen [::]:80; + listen 80 default_server; + listen [::]:80 default_server; + server_name _; + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + client_max_body_size 100M; + + location /bar/ { + proxy_pass http://127.0.0.1:8080/; + proxy_set_header Host \$host; + proxy_set_header X-Real-IP \$remote_addr; + proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto \$scheme; + } + + location /search/ { + proxy_pass http://meilisearch:7700/; + } + + location / { + proxy_pass http://127.0.0.1:8081/; + proxy_set_header Host \$host; + proxy_set_header X-Real-IP \$remote_addr; + proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto \$scheme; + } +} + +server { + listen 127.0.0.1:8080; server_name example.com; root /opt/bar-assistant/public; @@ -117,7 +148,6 @@ server { add_header X-Content-Type-Options "nosniff"; index index.php; - charset utf-8; location / { @@ -140,12 +170,9 @@ server { deny all; } } -EOF -cat </etc/nginx/sites-available/saltrim.conf server { - listen 8080 default_server; - listen [::]:8080 default_server; + listen 127.0.0.1:8081; server_name _; root /opt/vue-salt-rim/dist; @@ -155,7 +182,7 @@ server { } EOF -ln -s /etc/nginx/sites-available/barassistant.conf /etc/nginx/sites-enabled/ +ln -s /etc/nginx/sites-available/bar.conf /etc/nginx/sites-enabled/ ln -s /etc/nginx/sites-available/saltrim.conf /etc/nginx/sites-enabled/ rm -f /etc/nginx/sites-enabled/default $STD systemctl reload nginx From e503c95f54fc291117699e5ba8625b4b7888f69b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 09:49:37 +0200 Subject: [PATCH 0190/1614] try seperate sections for advanced --- misc/build.func | 1035 +++++++++++++++++++++++++++++++---------------- 1 file changed, 679 insertions(+), 356 deletions(-) diff --git a/misc/build.func b/misc/build.func index 64a3c31..b1a0c49 100644 --- a/misc/build.func +++ b/misc/build.func @@ -421,442 +421,765 @@ exit_script() { } # This function allows the user to configure advanced settings for the script. +# advanced_settings() { +# whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 +# whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 +# if [ "$var_os" != "alpine" ]; then +# var_default_os="${var_os}" +# var_os="" +# while [ -z "$var_os" ]; do +# if [ "$var_default_os" == "debian" ]; then +# if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ +# "debian" "" ON \ +# "ubuntu" "" OFF \ +# 3>&1 1>&2 2>&3); then +# if [ -n "$var_os" ]; then +# echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" +# fi +# else +# exit_script +# fi +# fi +# if [ "$var_default_os" == "ubuntu" ]; then +# if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ +# "debian" "" OFF \ +# "ubuntu" "" ON \ +# 3>&1 1>&2 2>&3); then +# if [ -n "$var_os" ]; then +# echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" +# fi +# else +# exit_script +# fi +# fi +# done +# fi + +# if [ "$var_os" == "debian" ]; then +# var_default_version="${var_version}" +# var_version="" +# while [ -z "$var_version" ]; do +# if [ "$var_default_version" == "11" ]; then +# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +# "11" "Bullseye" ON \ +# "12" "Bookworm" OFF \ +# 3>&1 1>&2 2>&3); then +# if [ -n "$var_version" ]; then +# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" +# fi +# else +# exit_script +# fi +# fi +# if [ "$var_default_version" == "12" ]; then +# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +# "11" "Bullseye" OFF \ +# "12" "Bookworm" ON \ +# 3>&1 1>&2 2>&3); then +# if [ -n "$var_version" ]; then +# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" +# fi +# else +# exit_script +# fi +# fi +# done +# fi + +# if [ "$var_os" == "ubuntu" ]; then +# var_default_version="${var_version}" +# var_version="" +# while [ -z "$var_version" ]; do +# if [ "$var_default_version" == "20.04" ]; then +# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +# "20.04" "Focal" ON \ +# "22.04" "Jammy" OFF \ +# "24.04" "Noble" OFF \ +# "24.10" "Oracular" OFF \ +# 3>&1 1>&2 2>&3); then +# if [ -n "$var_version" ]; then +# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" +# fi +# else +# exit_script +# fi +# elif [ "$var_default_version" == "22.04" ]; then +# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +# "20.04" "Focal" OFF \ +# "22.04" "Jammy" ON \ +# "24.04" "Noble" OFF \ +# "24.10" "Oracular" OFF \ +# 3>&1 1>&2 2>&3); then +# if [ -n "$var_version" ]; then +# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" +# fi +# else +# exit_script +# fi +# elif [ "$var_default_version" == "24.04" ]; then +# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +# "20.04" "Focal" OFF \ +# "22.04" "Jammy" OFF \ +# "24.04" "Noble" ON \ +# "24.10" "Oracular" OFF \ +# 3>&1 1>&2 2>&3); then +# if [ -n "$var_version" ]; then +# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" +# fi +# else +# exit_script +# fi +# else +# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +# "20.04" "Focal" OFF \ +# "22.04" "Jammy" OFF \ +# "24.04" "Noble" OFF \ +# "24.10" "Oracular" ON \ +# 3>&1 1>&2 2>&3); then +# if [ -n "$var_version" ]; then +# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" +# fi +# else +# exit_script +# fi +# fi +# done +# fi +# # Setting Default Tag for Advanced Settings +# TAGS="community-script-dev;${var_tags:-}" +# CT_DEFAULT_TYPE="${CT_TYPE}" +# CT_TYPE="" +# while [ -z "$CT_TYPE" ]; do +# if [ "$CT_DEFAULT_TYPE" == "1" ]; then +# if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ +# "1" "Unprivileged" ON \ +# "0" "Privileged" OFF \ +# 3>&1 1>&2 2>&3); then +# if [ -n "$CT_TYPE" ]; then +# CT_TYPE_DESC="Unprivileged" +# if [ "$CT_TYPE" -eq 0 ]; then +# CT_TYPE_DESC="Privileged" +# fi +# echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" +# fi +# else +# exit_script +# fi +# fi +# if [ "$CT_DEFAULT_TYPE" == "0" ]; then +# if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ +# "1" "Unprivileged" OFF \ +# "0" "Privileged" ON \ +# 3>&1 1>&2 2>&3); then +# if [ -n "$CT_TYPE" ]; then +# CT_TYPE_DESC="Unprivileged" +# if [ "$CT_TYPE" -eq 0 ]; then +# CT_TYPE_DESC="Privileged" +# fi +# echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" +# fi +# else +# exit_script +# fi +# fi +# done + +# while true; do +# if PW1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then +# if [[ ! -z "$PW1" ]]; then +# if [[ "$PW1" == *" "* ]]; then +# whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 +# elif [ ${#PW1} -lt 5 ]; then +# whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 +# else +# if PW2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then +# if [[ "$PW1" == "$PW2" ]]; then +# PW="-password $PW1" +# echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" +# break +# else +# whiptail --msgbox "Passwords do not match. Please try again." 8 58 +# fi +# else +# exit_script +# fi +# fi +# else +# PW1="Automatic Login" +# PW="" +# echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}" +# break +# fi +# else +# exit_script +# fi +# done + +# if CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then +# if [ -z "$CT_ID" ]; then +# CT_ID="$NEXTID" +# echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" +# else +# echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" +# fi +# else +# exit +# fi + +# if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then +# if [ -z "$CT_NAME" ]; then +# HN="$NSAPP" +# else +# HN=$(echo ${CT_NAME,,} | tr -d ' ') +# fi +# echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" +# else +# exit_script +# fi + +# if DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then +# if [ -z "$DISK_SIZE" ]; then +# DISK_SIZE="$var_disk" +# echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" +# else +# if ! [[ $DISK_SIZE =~ $INTEGER ]]; then +# echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" +# advanced_settings +# fi +# echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" +# fi +# else +# exit_script +# fi + +# if CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then +# if [ -z "$CORE_COUNT" ]; then +# CORE_COUNT="$var_cpu" +# echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" +# else +# echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" +# fi +# else +# exit_script +# fi + +# if RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then +# if [ -z "$RAM_SIZE" ]; then +# RAM_SIZE="$var_ram" +# echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" +# else +# echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" +# fi +# else +# exit_script +# fi + +# if BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then +# if [ -z "$BRG" ]; then +# BRG="vmbr0" +# echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" +# else +# echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" +# fi +# else +# exit_script +# fi + +# while true; do +# NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +# exit_status=$? +# if [ $exit_status -eq 0 ]; then +# if [ "$NET" = "dhcp" ]; then +# echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" +# break +# else +# if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then +# echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" +# break +# else +# whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 +# fi +# fi +# else +# exit_script +# fi +# done + +# if [ "$NET" != "dhcp" ]; then +# while true; do +# GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) +# if [ -z "$GATE1" ]; then +# whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 +# elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then +# whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 +# else +# GATE=",gw=$GATE1" +# echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}" +# break +# fi +# done +# else +# GATE="" +# echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" +# fi + +# if [ "$var_os" == "alpine" ]; then +# APT_CACHER="" +# APT_CACHER_IP="" +# else +# if APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then +# APT_CACHER="${APT_CACHER_IP:+yes}" +# echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" +# else +# exit_script +# fi +# fi + +# if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then +# DISABLEIP6="yes" +# else +# DISABLEIP6="no" +# fi +# echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +# if MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then +# if [ -z $MTU1 ]; then +# MTU1="Default" +# MTU="" +# else +# MTU=",mtu=$MTU1" +# fi +# echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" +# else +# exit_script +# fi + +# if SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then +# if [ -z $SD ]; then +# SX=Host +# SD="" +# else +# SX=$SD +# SD="-searchdomain=$SD" +# fi +# echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}" +# else +# exit_script +# fi + +# if NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then +# if [ -z $NX ]; then +# NX=Host +# NS="" +# else +# NS="-nameserver=$NX" +# fi +# echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}" +# else +# exit_script +# fi + +# if MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then +# if [ -z $MAC1 ]; then +# MAC1="Default" +# MAC="" +# else +# MAC=",hwaddr=$MAC1" +# echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}" +# fi +# else +# exit_script +# fi + +# if VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then +# if [ -z $VLAN1 ]; then +# VLAN1="Default" +# VLAN="" +# else +# VLAN=",tag=$VLAN1" +# fi +# echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}" +# else +# exit_script +# fi + +# if ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then +# if [ -n "${ADV_TAGS}" ]; then +# ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') +# TAGS="${ADV_TAGS}" +# else +# TAGS=";" +# fi +# echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" +# else +# exit_script +# fi + +# if [[ "$PW" == -password* ]]; then +# if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then +# SSH="yes" +# else +# SSH="no" +# fi +# echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" +# else +# SSH="no" +# echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" +# fi + +# if [[ "${SSH}" == "yes" ]]; then +# SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" + +# if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then +# echo "Warning: No SSH key provided." +# fi +# else +# SSH_AUTHORIZED_KEY="" +# fi + +# if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then +# ENABLE_FUSE="yes" +# else +# ENABLE_FUSE="no" +# fi +# echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" + +# if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then +# VERB="yes" +# else +# VERB="no" +# fi +# echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" + +# if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +# echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +# else +# clear +# header_info +# echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" +# advanced_settings +# fi +# } + advanced_settings() { + show_intro_messages + select_distribution || return + select_version || return + select_container_type || return + set_root_password || return + set_container_id || return + set_hostname || return + set_disk_size || return + set_cpu_cores || return + set_ram_size || return + set_bridge || return + set_ip_address || return + set_gateway || return + set_apt_cacher || return + toggle_ipv6 || return + set_mtu || return + set_dns_search_domain || return + set_dns_server || return + set_mac_address || return + set_vlan || return + set_tags || return + set_ssh_access || return + set_fuse || return + set_verbose || return + confirm_creation || return +} + +show_intro_messages() { whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 - if [ "$var_os" != "alpine" ]; then - var_default_os="${var_os}" - var_os="" - while [ -z "$var_os" ]; do - if [ "$var_default_os" == "debian" ]; then - if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" ON \ - "ubuntu" "" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_os" ]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - fi - else - exit_script - fi - fi - if [ "$var_default_os" == "ubuntu" ]; then - if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" OFF \ - "ubuntu" "" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_os" ]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - fi - else - exit_script - fi - fi - done - fi + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n\nIf the default Linux distribution is not adhered to, script support will be discontinued." 10 58 +} - if [ "$var_os" == "debian" ]; then - var_default_version="${var_version}" - var_version="" - while [ -z "$var_version" ]; do - if [ "$var_default_version" == "11" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ - "11" "Bullseye" ON \ - "12" "Bookworm" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - if [ "$var_default_version" == "12" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ - "11" "Bullseye" OFF \ - "12" "Bookworm" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - done +select_distribution() { + if [[ "$var_os" == "alpine" ]]; then + return fi + local default="${var_os}" + var_os="" + while [[ -z "$var_os" ]]; do + case "$default" in + debian) + var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + "debian" "" ON "ubuntu" "" OFF 3>&1 1>&2 2>&3) || return 1 + ;; + ubuntu) + var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + "debian" "" OFF "ubuntu" "" ON 3>&1 1>&2 2>&3) || return 1 + ;; + esac + done + printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" +} - if [ "$var_os" == "ubuntu" ]; then - var_default_version="${var_version}" - var_version="" - while [ -z "$var_version" ]; do - if [ "$var_default_version" == "20.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - elif [ "$var_default_version" == "22.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" ON \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - elif [ "$var_default_version" == "24.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" ON \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - else - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - done +select_version() { + local default="${var_version}" + var_version="" + local list="" + if [[ "$var_os" == "debian" ]]; then + case "$default" in + 11) list="11 Bullseye ON 12 Bookworm OFF" ;; + 12) list="11 Bullseye OFF 12 Bookworm ON" ;; + esac + elif [[ "$var_os" == "ubuntu" ]]; then + case "$default" in + 20.04) list="20.04 Focal ON 22.04 Jammy OFF 24.04 Noble OFF 24.10 Oracular OFF" ;; + 22.04) list="20.04 Focal OFF 22.04 Jammy ON 24.04 Noble OFF 24.10 Oracular OFF" ;; + 24.04) list="20.04 Focal OFF 22.04 Jammy OFF 24.04 Noble ON 24.10 Oracular OFF" ;; + 24.10) list="20.04 Focal OFF 22.04 Jammy OFF 24.04 Noble OFF 24.10 Oracular ON" ;; + esac fi - # Setting Default Tag for Advanced Settings - TAGS="community-script-dev;${var_tags:-}" - CT_DEFAULT_TYPE="${CT_TYPE}" + while [[ -z "$var_version" ]]; do + var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "VERSION" --radiolist "Choose Version" 12 58 4 $list 3>&1 1>&2 2>&3) || return 1 + done + printf "%bVersion: %b%s%b\n" "$OSVERSION$BOLD$DGN" "$BGN" "$var_version" "$CL" +} + +select_container_type() { + local default="${CT_TYPE}" CT_TYPE="" - while [ -z "$CT_TYPE" ]; do - if [ "$CT_DEFAULT_TYPE" == "1" ]; then - if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$CT_TYPE" ]; then - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - fi - else - exit_script - fi - fi - if [ "$CT_DEFAULT_TYPE" == "0" ]; then - if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$CT_TYPE" ]; then - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - fi - else - exit_script - fi - fi + local list="" + [[ "$default" == "1" ]] && list="1 Unprivileged ON 0 Privileged OFF" || list="1 Unprivileged OFF 0 Privileged ON" + while [[ -z "$CT_TYPE" ]]; do + CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 $list 3>&1 1>&2 2>&3) || return 1 done + local desc="Unprivileged" + [[ "$CT_TYPE" == "0" ]] && desc="Privileged" + printf "%bContainer Type: %b%s%b\n" "$CONTAINERTYPE$BOLD$DGN" "$BGN" "$desc" "$CL" +} +set_root_password() { + local pw1 + local pw2 while true; do - if PW1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [[ ! -z "$PW1" ]]; then - if [[ "$PW1" == *" "* ]]; then - whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 - elif [ ${#PW1} -lt 5 ]; then - whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 - else - if PW2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then - if [[ "$PW1" == "$PW2" ]]; then - PW="-password $PW1" - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" - break - else - whiptail --msgbox "Passwords do not match. Please try again." 8 58 - fi - else - exit_script - fi - fi - else - PW1="Automatic Login" - PW="" - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}" - break - fi + pw1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$pw1" ]]; then + PW1="Automatic Login" + PW="" + break + elif [[ "$pw1" =~ \ ]]; then + whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 + elif [[ ${#pw1} -lt 5 ]]; then + whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 else - exit_script + pw2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3) || return 1 + [[ "$pw1" == "$pw2" ]] && { + PW="-password $pw1" + break + } || whiptail --msgbox "Passwords do not match. Please try again." 8 58 fi done + printf "%bRoot Password: %b********%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$CL" +} - if CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi - else - exit - fi +set_container_id() { + CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 "$NEXTID" --title "CONTAINER ID" 3>&1 1>&2 2>&3) || return 1 + [[ -z "$CT_ID" ]] && CT_ID="$NEXTID" + printf "%bContainer ID: %b%s%b\n" "$CONTAINERID$BOLD$DGN" "$BGN" "$CT_ID" "$CL" +} - if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" - else - exit_script - fi +set_hostname() { + local ct_name + ct_name=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 "$NSAPP" --title "HOSTNAME" 3>&1 1>&2 2>&3) || return 1 + [[ -z "$ct_name" ]] && HN="$NSAPP" || HN=$(tr -d ' ' <<<"${ct_name,,}") + printf "%bHostname: %b%s%b\n" "$HOSTNAME$BOLD$DGN" "$BGN" "$HN" "$CL" +} - if DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" - fi - else - exit_script - fi +set_disk_size() { + DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 "$var_disk" --title "DISK SIZE" 3>&1 1>&2 2>&3) || return 1 + [[ -z "$DISK_SIZE" ]] && DISK_SIZE="$var_disk" + [[ ! "$DISK_SIZE" =~ ^[0-9]+$ ]] && printf "%b DISK SIZE MUST BE AN INTEGER NUMBER!%b\n" "$INFO$HOLD$RD" "$CL" && return 1 + printf "%bDisk Size: %b%s GB%b\n" "$DISKSIZE$BOLD$DGN" "$BGN" "$DISK_SIZE" "$CL" +} - if CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" - fi - else - exit_script - fi +set_cpu_cores() { + CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" --title "CORE COUNT" 3>&1 1>&2 2>&3) || return 1 + [[ -z "$CORE_COUNT" ]] && CORE_COUNT="$var_cpu" + printf "%bCPU Cores: %b%s%b\n" "$CPUCORE$BOLD$DGN" "$BGN" "$CORE_COUNT" "$CL" +} - if RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - else - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - fi - else - exit_script - fi - - if BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" - else - echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" - fi - else - exit_script - fi +set_ram_size() { + RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" --title "RAM" 3>&1 1>&2 2>&3) || return 1 + [[ -z "$RAM_SIZE" ]] && RAM_SIZE="$var_ram" + printf "%bRAM Size: %b%s MiB%b\n" "$RAMSIZE$BOLD$DGN" "$BGN" "$RAM_SIZE" "$CL" +} +set_bridge() { + BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 "vmbr0" --title "BRIDGE" 3>&1 1>&2 2>&3) || return 1 + [[ -z "$BRG" ]] && BRG="vmbr0" + printf "%bBridge: %b%s%b\n" "$BRIDGE$BOLD$DGN" "$BGN" "$BRG" "$CL" +} +set_ip_address() { while true; do - NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) - exit_status=$? - if [ $exit_status -eq 0 ]; then - if [ "$NET" = "dhcp" ]; then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" - break - else - if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" - break - else - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 - fi - fi + NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) || return 1 + if [[ "$NET" == "dhcp" ]]; then + printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" + return + elif [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then + printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" + return else - exit_script + whiptail --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 fi done +} - if [ "$NET" != "dhcp" ]; then - while true; do - GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) - if [ -z "$GATE1" ]; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 - elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 - else - GATE=",gw=$GATE1" - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}" - break - fi - done - else +set_gateway() { + if [[ "$NET" == "dhcp" ]]; then GATE="" - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" + printf "%bGateway IP Address: %bDefault%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$CL" + return fi + while true; do + GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) + if [[ -z "$GATE1" ]]; then + whiptail --msgbox "Gateway IP address cannot be empty" 8 58 + elif [[ "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then + GATE=",gw=$GATE1" + printf "%bGateway IP Address: %b%s%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$GATE1" "$CL" + return + else + whiptail --msgbox "Invalid IP address format" 8 58 + fi + done +} - if [ "$var_os" == "alpine" ]; then +set_apt_cacher() { + if [[ "$var_os" == "alpine" ]]; then APT_CACHER="" APT_CACHER_IP="" - else - if APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then - APT_CACHER="${APT_CACHER_IP:+yes}" - echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" - else - exit_script - fi + return fi + APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3) || return 1 + APT_CACHER="${APT_CACHER_IP:+yes}" + printf "%bAPT-Cacher IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "${APT_CACHER_IP:-Default}" "$CL" +} - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then +toggle_ipv6() { + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58; then DISABLEIP6="yes" else DISABLEIP6="no" fi - echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + printf "%bDisable IPv6: %b%s%b\n" "$DISABLEIPV6$BOLD$DGN" "$BGN" "$DISABLEIP6" "$CL" +} - if MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" +set_mtu() { + MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$MTU1" ]]; then + MTU1="Default" + MTU="" else - exit_script + MTU=",mtu=$MTU1" fi + printf "%bInterface MTU Size: %b%s%b\n" "$DEFAULT$BOLD$DGN" "$BGN" "$MTU1" "$CL" +} - if SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}" +set_dns_search_domain() { + SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$SD" ]]; then + SX="Host" + SD="" else - exit_script + SX="$SD" + SD="-searchdomain=$SD" fi + printf "%bDNS Search Domain: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$SX" "$CL" +} - if NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}" +set_dns_server() { + NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$NX" ]]; then + NX="Host" + NS="" else - exit_script + NS="-nameserver=$NX" fi + printf "%bDNS Server IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NX" "$CL" +} - if MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}" - fi +set_mac_address() { + MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$MAC1" ]]; then + MAC1="Default" + MAC="" else - exit_script + MAC=",hwaddr=$MAC1" fi + printf "%bMAC Address: %b%s%b\n" "$MACADDRESS$BOLD$DGN" "$BGN" "$MAC1" "$CL" +} - if VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}" +set_vlan() { + VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$VLAN1" ]]; then + VLAN1="Default" + VLAN="" else - exit_script + VLAN=",tag=$VLAN1" fi + printf "%bVlan: %b%s%b\n" "$VLANTAG$BOLD$DGN" "$BGN" "$VLAN1" "$CL" +} - if ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then - if [ -n "${ADV_TAGS}" ]; then - ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') - TAGS="${ADV_TAGS}" - else - TAGS=";" - fi - echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" +set_tags() { + ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 "${TAGS}" --title "Advanced Tags" 3>&1 1>&2 2>&3) || return 1 + if [[ -n "$ADV_TAGS" ]]; then + ADV_TAGS=$(tr -d '[:space:]' <<<"$ADV_TAGS") + TAGS="$ADV_TAGS" else - exit_script + TAGS=";" fi + printf "%bTags: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$TAGS" "$CL" +} +set_ssh_access() { if [[ "$PW" == -password* ]]; then - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58; then SSH="yes" else SSH="no" fi - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" else SSH="no" - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" fi + printf "%bRoot SSH Access: %b%s%b\n" "$ROOTSSH$BOLD$DGN" "$BGN" "$SSH" "$CL" - if [[ "${SSH}" == "yes" ]]; then - SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" - - if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then - echo "Warning: No SSH key provided." - fi + if [[ "$SSH" == "yes" ]]; then + SSH_AUTHORIZED_KEY=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3) + [[ -z "$SSH_AUTHORIZED_KEY" ]] && printf "Warning: No SSH key provided.\n" else SSH_AUTHORIZED_KEY="" fi +} - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then +set_fuse() { + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58; then ENABLE_FUSE="yes" else ENABLE_FUSE="no" fi - echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" + printf "%bFUSE (Filesystem in Userspace) Support: %b%s%b\n" "$FUSE$BOLD$DGN" "$BGN" "$ENABLE_FUSE" "$CL" +} - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then +set_verbose() { + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58; then VERB="yes" else VERB="no" fi - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" + printf "%bVerbose Mode: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$VERB" "$CL" +} - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +confirm_creation() { + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58; then + printf "%bCreating a %s LXC using the above advanced settings%b\n" "$CREATING$BOLD$RD" "$APP" "$CL" + return 0 else clear header_info - echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" + printf "%bUsing Advanced Settings on node %s%b\n" "$ADVANCED$BOLD$RD" "$PVEHOST_NAME" "$CL" advanced_settings fi } From 0fd93734c07d65cc8523451a722b299f78b81ab8 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 31 Mar 2025 09:52:45 +0200 Subject: [PATCH 0191/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 69d7da7..50ab7f8 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -71,7 +71,7 @@ MeiliSearch_API_KEY=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorizat MeiliSearch_API_KEY_UID=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"uid":"[^"]*"' | head -n 1 | sed 's/"uid":"//;s/"//') LOCAL_IP=$(hostname -I | awk '{print $1}') sed -i -e "s|^APP_URL=|APP_URL=http://${LOCAL_IP}/bar/|" \ - -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://${LOCAL_IP}/search/|" \ + -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://${LOCAL_IP}:7700|" \ -e "s|^MEILISEARCH_KEY=|MEILISEARCH_KEY=${MASTER_KEY}|" \ -e "s|^MEILISEARCH_API_KEY=|MEILISEARCH_API_KEY=${MeiliSearch_API_KEY}|" \ -e "s|^MEILISEARCH_API_KEY_UID=|MEILISEARCH_API_KEY_UID=${MeiliSearch_API_KEY_UID}|" \ From fe98b18603a29d81bd44a8d53f8e9e693ec633b8 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:10:32 +0200 Subject: [PATCH 0192/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 50ab7f8..ae6e93c 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -71,7 +71,7 @@ MeiliSearch_API_KEY=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorizat MeiliSearch_API_KEY_UID=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"uid":"[^"]*"' | head -n 1 | sed 's/"uid":"//;s/"//') LOCAL_IP=$(hostname -I | awk '{print $1}') sed -i -e "s|^APP_URL=|APP_URL=http://${LOCAL_IP}/bar/|" \ - -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://${LOCAL_IP}:7700|" \ + -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://127.0.0.1:7700|" \ -e "s|^MEILISEARCH_KEY=|MEILISEARCH_KEY=${MASTER_KEY}|" \ -e "s|^MEILISEARCH_API_KEY=|MEILISEARCH_API_KEY=${MeiliSearch_API_KEY}|" \ -e "s|^MEILISEARCH_API_KEY_UID=|MEILISEARCH_API_KEY_UID=${MeiliSearch_API_KEY_UID}|" \ From 224c7b3a50c74ca1840b9860bdf6d59c14ffc371 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:11:00 +0200 Subject: [PATCH 0193/1614] extend advanced whiptail --- misc/build.func | 337 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 247 insertions(+), 90 deletions(-) diff --git a/misc/build.func b/misc/build.func index b1a0c49..38c4942 100644 --- a/misc/build.func +++ b/misc/build.func @@ -862,67 +862,142 @@ exit_script() { # } advanced_settings() { - show_intro_messages - select_distribution || return - select_version || return - select_container_type || return - set_root_password || return - set_container_id || return - set_hostname || return - set_disk_size || return - set_cpu_cores || return - set_ram_size || return - set_bridge || return - set_ip_address || return - set_gateway || return - set_apt_cacher || return - toggle_ipv6 || return - set_mtu || return - set_dns_search_domain || return - set_dns_server || return - set_mac_address || return - set_vlan || return - set_tags || return - set_ssh_access || return - set_fuse || return - set_verbose || return - confirm_creation || return + local step=1 + + while true; do + case $step in + 1) + show_intro_messages || return + ((step++)) + ;; + 2) + select_distribution && ((step++)) || ((step--)) + ;; + 3) + select_version && ((step++)) || ((step--)) + ;; + 4) + select_container_type && ((step++)) || ((step--)) + ;; + 5) + set_root_password && ((step++)) || ((step--)) + ;; + 6) + set_container_id && ((step++)) || ((step--)) + ;; + 7) + set_hostname && ((step++)) || ((step--)) + ;; + 8) + set_disk_size && ((step++)) || ((step--)) + ;; + 9) + set_cpu_cores && ((step++)) || ((step--)) + ;; + 10) + set_ram_size && ((step++)) || ((step--)) + ;; + 11) + set_bridge && ((step++)) || ((step--)) + ;; + 12) + set_ip_address && ((step++)) || ((step--)) + ;; + 13) + set_gateway && ((step++)) || ((step--)) + ;; + 14) + set_apt_cacher && ((step++)) || ((step--)) + ;; + 15) + toggle_ipv6 && ((step++)) || ((step--)) + ;; + 16) + set_mtu && ((step++)) || ((step--)) + ;; + 17) + set_dns_search_domain && ((step++)) || ((step--)) + ;; + 18) + set_dns_server && ((step++)) || ((step--)) + ;; + 19) + set_mac_address && ((step++)) || ((step--)) + ;; + 20) + set_vlan && ((step++)) || ((step--)) + ;; + 21) + set_tags && ((step++)) || ((step--)) + ;; + 22) + set_ssh_access && ((step++)) || ((step--)) + ;; + 23) + set_fuse && ((step++)) || ((step--)) + ;; + 24) + set_verbose && ((step++)) || ((step--)) + ;; + 25) + confirm_creation && break || ((step--)) + ;; + *) + break + ;; + esac + done } show_intro_messages() { - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n\nIf the default Linux distribution is not adhered to, script support will be discontinued." 10 58 + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --msgbox --title "Here is an instructional tip:" \ + "To make a selection, use the Spacebar." 8 58 || return 1 + + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --msgbox --title "Default distribution for $APP" \ + "Default is: ${var_os} ${var_version} \n\nIf the default Linux distribution is not adhered to, script support will be discontinued." 10 58 || return 1 } select_distribution() { if [[ "$var_os" == "alpine" ]]; then - return + return 0 fi local default="${var_os}" var_os="" + local selection + while [[ -z "$var_os" ]]; do - case "$default" in - debian) - var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" ON "ubuntu" "" OFF 3>&1 1>&2 2>&3) || return 1 - ;; - ubuntu) - var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" OFF "ubuntu" "" ON 3>&1 1>&2 2>&3) || return 1 - ;; - esac + if [[ "$default" == "debian" ]]; then + selection=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + "debian" "" ON \ + "ubuntu" "" OFF 3>&1 1>&2 2>&3) || return 1 + else + selection=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + "debian" "" OFF \ + "ubuntu" "" ON 3>&1 1>&2 2>&3) || return 1 + fi + + if [[ -n "$selection" ]]; then + var_os="$selection" + printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" + fi done - printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" } select_version() { local default="${var_version}" var_version="" local list="" + local selection + if [[ "$var_os" == "debian" ]]; then case "$default" in 11) list="11 Bullseye ON 12 Bookworm OFF" ;; 12) list="11 Bullseye OFF 12 Bookworm ON" ;; + *) list="11 Bullseye OFF 12 Bookworm OFF" ;; esac elif [[ "$var_os" == "ubuntu" ]]; then case "$default" in @@ -930,97 +1005,155 @@ select_version() { 22.04) list="20.04 Focal OFF 22.04 Jammy ON 24.04 Noble OFF 24.10 Oracular OFF" ;; 24.04) list="20.04 Focal OFF 22.04 Jammy OFF 24.04 Noble ON 24.10 Oracular OFF" ;; 24.10) list="20.04 Focal OFF 22.04 Jammy OFF 24.04 Noble OFF 24.10 Oracular ON" ;; + *) list="20.04 Focal OFF 22.04 Jammy OFF 24.04 Noble OFF 24.10 Oracular OFF" ;; esac fi + while [[ -z "$var_version" ]]; do - var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "VERSION" --radiolist "Choose Version" 12 58 4 $list 3>&1 1>&2 2>&3) || return 1 + selection=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "VERSION" --radiolist "Choose Version" 12 58 4 $list 3>&1 1>&2 2>&3) || return 1 + if [[ -n "$selection" ]]; then + var_version="$selection" + printf "%bVersion: %b%s%b\n" "$OSVERSION$BOLD$DGN" "$BGN" "$var_version" "$CL" + fi done - printf "%bVersion: %b%s%b\n" "$OSVERSION$BOLD$DGN" "$BGN" "$var_version" "$CL" } select_container_type() { local default="${CT_TYPE}" CT_TYPE="" local list="" + local selection + [[ "$default" == "1" ]] && list="1 Unprivileged ON 0 Privileged OFF" || list="1 Unprivileged OFF 0 Privileged ON" + while [[ -z "$CT_TYPE" ]]; do - CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 $list 3>&1 1>&2 2>&3) || return 1 + selection=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 $list 3>&1 1>&2 2>&3) || return 1 + if [[ -n "$selection" ]]; then + CT_TYPE="$selection" + local desc="Unprivileged" + [[ "$CT_TYPE" == "0" ]] && desc="Privileged" + printf "%bContainer Type: %b%s%b\n" "$CONTAINERTYPE$BOLD$DGN" "$BGN" "$desc" "$CL" + fi done - local desc="Unprivileged" - [[ "$CT_TYPE" == "0" ]] && desc="Privileged" - printf "%bContainer Type: %b%s%b\n" "$CONTAINERTYPE$BOLD$DGN" "$BGN" "$desc" "$CL" } set_root_password() { local pw1 local pw2 + while true; do - pw1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3) || return 1 + pw1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 \ + --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$pw1" ]]; then PW1="Automatic Login" PW="" - break - elif [[ "$pw1" =~ \ ]]; then + printf "%bRoot Password: %b%s%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$PW1" "$CL" + return 0 + fi + + if [[ "$pw1" == *" "* ]]; then whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 - elif [[ ${#pw1} -lt 5 ]]; then + continue + fi + + if [[ ${#pw1} -lt 5 ]]; then whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 + continue + fi + + pw2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --passwordbox "\nVerify Root Password" 9 58 \ + --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3) || return 1 + + if [[ "$pw1" == "$pw2" ]]; then + PW="-password $pw1" + printf "%bRoot Password: %b********%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$CL" + return 0 else - pw2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3) || return 1 - [[ "$pw1" == "$pw2" ]] && { - PW="-password $pw1" - break - } || whiptail --msgbox "Passwords do not match. Please try again." 8 58 + whiptail --msgbox "Passwords do not match. Please try again." 8 58 fi done - printf "%bRoot Password: %b********%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$CL" } - set_container_id() { - CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 "$NEXTID" --title "CONTAINER ID" 3>&1 1>&2 2>&3) || return 1 + CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set Container ID" 8 58 "$NEXTID" --title "CONTAINER ID" 3>&1 1>&2 2>&3) || return 1 + [[ -z "$CT_ID" ]] && CT_ID="$NEXTID" printf "%bContainer ID: %b%s%b\n" "$CONTAINERID$BOLD$DGN" "$BGN" "$CT_ID" "$CL" } set_hostname() { - local ct_name - ct_name=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 "$NSAPP" --title "HOSTNAME" 3>&1 1>&2 2>&3) || return 1 - [[ -z "$ct_name" ]] && HN="$NSAPP" || HN=$(tr -d ' ' <<<"${ct_name,,}") + local input + input=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set Hostname" 8 58 "$NSAPP" --title "HOSTNAME" 3>&1 1>&2 2>&3) || return 1 + + if [[ -z "$input" ]]; then + HN="$NSAPP" + else + HN=$(tr -d ' ' <<<"${input,,}") + fi + printf "%bHostname: %b%s%b\n" "$HOSTNAME$BOLD$DGN" "$BGN" "$HN" "$CL" } set_disk_size() { - DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 "$var_disk" --title "DISK SIZE" 3>&1 1>&2 2>&3) || return 1 - [[ -z "$DISK_SIZE" ]] && DISK_SIZE="$var_disk" - [[ ! "$DISK_SIZE" =~ ^[0-9]+$ ]] && printf "%b DISK SIZE MUST BE AN INTEGER NUMBER!%b\n" "$INFO$HOLD$RD" "$CL" && return 1 + local input + input=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set Disk Size in GB" 8 58 "$var_disk" --title "DISK SIZE" 3>&1 1>&2 2>&3) || return 1 + + if [[ -z "$input" ]]; then + DISK_SIZE="$var_disk" + elif [[ "$input" =~ ^[0-9]+$ ]]; then + DISK_SIZE="$input" + else + whiptail --msgbox "Disk size must be an integer!" 8 58 + return 1 + fi + printf "%bDisk Size: %b%s GB%b\n" "$DISKSIZE$BOLD$DGN" "$BGN" "$DISK_SIZE" "$CL" } set_cpu_cores() { - CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" --title "CORE COUNT" 3>&1 1>&2 2>&3) || return 1 - [[ -z "$CORE_COUNT" ]] && CORE_COUNT="$var_cpu" + local input + input=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" --title "CORE COUNT" 3>&1 1>&2 2>&3) || return 1 + + [[ -z "$input" ]] && CORE_COUNT="$var_cpu" || CORE_COUNT="$input" printf "%bCPU Cores: %b%s%b\n" "$CPUCORE$BOLD$DGN" "$BGN" "$CORE_COUNT" "$CL" } set_ram_size() { - RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" --title "RAM" 3>&1 1>&2 2>&3) || return 1 - [[ -z "$RAM_SIZE" ]] && RAM_SIZE="$var_ram" + local input + input=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" --title "RAM" 3>&1 1>&2 2>&3) || return 1 + + [[ -z "$input" ]] && RAM_SIZE="$var_ram" || RAM_SIZE="$input" printf "%bRAM Size: %b%s MiB%b\n" "$RAMSIZE$BOLD$DGN" "$BGN" "$RAM_SIZE" "$CL" } set_bridge() { - BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 "vmbr0" --title "BRIDGE" 3>&1 1>&2 2>&3) || return 1 + BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set a Bridge" 8 58 "vmbr0" --title "BRIDGE" 3>&1 1>&2 2>&3) || return 1 + [[ -z "$BRG" ]] && BRG="vmbr0" printf "%bBridge: %b%s%b\n" "$BRIDGE$BOLD$DGN" "$BGN" "$BRG" "$CL" } + set_ip_address() { while true; do - NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) || return 1 + NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 "dhcp" --title "IP ADDRESS" 3>&1 1>&2 2>&3) || return 1 + if [[ "$NET" == "dhcp" ]]; then printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" - return + return 0 elif [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" - return + return 0 else whiptail --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 fi @@ -1031,35 +1164,41 @@ set_gateway() { if [[ "$NET" == "dhcp" ]]; then GATE="" printf "%bGateway IP Address: %bDefault%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$CL" - return + return 0 fi + while true; do - GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) + GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$GATE1" ]]; then whiptail --msgbox "Gateway IP address cannot be empty" 8 58 elif [[ "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then GATE=",gw=$GATE1" printf "%bGateway IP Address: %b%s%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$GATE1" "$CL" - return + return 0 else whiptail --msgbox "Invalid IP address format" 8 58 fi done } - set_apt_cacher() { if [[ "$var_os" == "alpine" ]]; then APT_CACHER="" APT_CACHER_IP="" - return + return 0 fi - APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3) || return 1 + + APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3) || return 1 + APT_CACHER="${APT_CACHER_IP:+yes}" printf "%bAPT-Cacher IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "${APT_CACHER_IP:-Default}" "$CL" } toggle_ipv6() { - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58; then + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58; then DISABLEIP6="yes" else DISABLEIP6="no" @@ -1068,7 +1207,9 @@ toggle_ipv6() { } set_mtu() { - MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3) || return 1 + MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$MTU1" ]]; then MTU1="Default" MTU="" @@ -1079,7 +1220,9 @@ set_mtu() { } set_dns_search_domain() { - SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3) || return 1 + SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$SD" ]]; then SX="Host" SD="" @@ -1091,7 +1234,9 @@ set_dns_search_domain() { } set_dns_server() { - NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3) || return 1 + NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$NX" ]]; then NX="Host" NS="" @@ -1102,7 +1247,9 @@ set_dns_server() { } set_mac_address() { - MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) || return 1 + MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set a MAC Address (leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$MAC1" ]]; then MAC1="Default" MAC="" @@ -1113,7 +1260,9 @@ set_mac_address() { } set_vlan() { - VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) || return 1 + VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set a Vlan (leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) || return 1 + if [[ -z "$VLAN1" ]]; then VLAN1="Default" VLAN="" @@ -1124,7 +1273,9 @@ set_vlan() { } set_tags() { - ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 "${TAGS}" --title "Advanced Tags" 3>&1 1>&2 2>&3) || return 1 + ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "Set Custom Tags? [If you remove all, there will be no tags!]" 8 58 "${TAGS}" --title "Advanced Tags" 3>&1 1>&2 2>&3) || return 1 + if [[ -n "$ADV_TAGS" ]]; then ADV_TAGS=$(tr -d '[:space:]' <<<"$ADV_TAGS") TAGS="$ADV_TAGS" @@ -1136,7 +1287,8 @@ set_tags() { set_ssh_access() { if [[ "$PW" == -password* ]]; then - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58; then + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58; then SSH="yes" else SSH="no" @@ -1144,10 +1296,12 @@ set_ssh_access() { else SSH="no" fi + printf "%bRoot SSH Access: %b%s%b\n" "$ROOTSSH$BOLD$DGN" "$BGN" "$SSH" "$CL" if [[ "$SSH" == "yes" ]]; then - SSH_AUTHORIZED_KEY=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3) + SSH_AUTHORIZED_KEY=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3) [[ -z "$SSH_AUTHORIZED_KEY" ]] && printf "Warning: No SSH key provided.\n" else SSH_AUTHORIZED_KEY="" @@ -1155,7 +1309,8 @@ set_ssh_access() { } set_fuse() { - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58; then + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58; then ENABLE_FUSE="yes" else ENABLE_FUSE="no" @@ -1164,7 +1319,8 @@ set_fuse() { } set_verbose() { - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58; then + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58; then VERB="yes" else VERB="no" @@ -1173,14 +1329,15 @@ set_verbose() { } confirm_creation() { - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58; then + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58; then printf "%bCreating a %s LXC using the above advanced settings%b\n" "$CREATING$BOLD$RD" "$APP" "$CL" return 0 else clear header_info printf "%bUsing Advanced Settings on node %s%b\n" "$ADVANCED$BOLD$RD" "$PVEHOST_NAME" "$CL" - advanced_settings + return 1 fi } From 048fd5c517b824fb5ca210e9d53090fb459f8255 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:24:39 +0200 Subject: [PATCH 0194/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index ae6e93c..96e18eb 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -182,8 +182,7 @@ server { } EOF -ln -s /etc/nginx/sites-available/bar.conf /etc/nginx/sites-enabled/ -ln -s /etc/nginx/sites-available/saltrim.conf /etc/nginx/sites-enabled/ +ln -s /etc/nginx/sites-available/barassistant.conf /etc/nginx/sites-enabled/ rm -f /etc/nginx/sites-enabled/default $STD systemctl reload nginx msg_ok "Created Service" From 37f34702c731aaaf19d7108be9c0ff32c6492a21 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:25:11 +0200 Subject: [PATCH 0195/1614] Conversion from whiptail to dialog --- misc/build.func | 901 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 627 insertions(+), 274 deletions(-) diff --git a/misc/build.func b/misc/build.func index 38c4942..066f232 100644 --- a/misc/build.func +++ b/misc/build.func @@ -861,306 +861,532 @@ exit_script() { # fi # } +dialog_input() { + local title="$1" + local prompt="$2" + local default="$3" + local result + + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "$title" \ + --extra-button --extra-label "Back" \ + --ok-label "Next" --cancel-label "Exit" \ + --inputbox "$prompt" 10 58 "$default" 2>&1 >/dev/tty) + + local exitcode=$? + + case $exitcode in + 0) + REPLY_RESULT="$result" + return 0 + ;; # OK + 3) return 2 ;; # Back + *) return 1 ;; # Cancel/Exit + esac +} + advanced_settings() { local step=1 while true; do case $step in 1) - show_intro_messages || return - ((step++)) + show_intro_messages && ((step++)) ;; 2) - select_distribution && ((step++)) || ((step--)) + select_distribution + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 3) - select_version && ((step++)) || ((step--)) + select_version + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 4) - select_container_type && ((step++)) || ((step--)) + select_container_type + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 5) - set_root_password && ((step++)) || ((step--)) + set_root_password + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 6) - set_container_id && ((step++)) || ((step--)) + set_container_id + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 7) - set_hostname && ((step++)) || ((step--)) + set_hostname + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 8) - set_disk_size && ((step++)) || ((step--)) + set_disk_size + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 9) - set_cpu_cores && ((step++)) || ((step--)) + set_cpu_cores + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 10) - set_ram_size && ((step++)) || ((step--)) + set_ram_size + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 11) - set_bridge && ((step++)) || ((step--)) + set_bridge + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 12) - set_ip_address && ((step++)) || ((step--)) + set_ip_address + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 13) - set_gateway && ((step++)) || ((step--)) + set_gateway + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 14) - set_apt_cacher && ((step++)) || ((step--)) + set_apt_cacher + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 15) - toggle_ipv6 && ((step++)) || ((step--)) + toggle_ipv6 + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 16) - set_mtu && ((step++)) || ((step--)) + set_mtu + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 17) - set_dns_search_domain && ((step++)) || ((step--)) + set_dns_search_domain + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 18) - set_dns_server && ((step++)) || ((step--)) + set_dns_server + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 19) - set_mac_address && ((step++)) || ((step--)) + set_mac_address + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 20) - set_vlan && ((step++)) || ((step--)) + set_vlan + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 21) - set_tags && ((step++)) || ((step--)) + set_tags + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 22) - set_ssh_access && ((step++)) || ((step--)) + set_ssh_access + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 23) - set_fuse && ((step++)) || ((step--)) + set_fuse + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 24) - set_verbose && ((step++)) || ((step--)) + set_verbose + result=$? + [[ $result -eq 0 ]] && ((step++)) + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; 25) - confirm_creation && break || ((step--)) - ;; - *) - break + confirm_creation + result=$? + [[ $result -eq 0 ]] && break + [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) + [[ $result -eq 1 ]] && return ;; esac done } show_intro_messages() { - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --msgbox --title "Here is an instructional tip:" \ - "To make a selection, use the Spacebar." 8 58 || return 1 + dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "Instructional Tip" \ + --msgbox "To make a selection, use the Spacebar." 8 58 || return 1 - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --msgbox --title "Default distribution for $APP" \ - "Default is: ${var_os} ${var_version} \n\nIf the default Linux distribution is not adhered to, script support will be discontinued." 10 58 || return 1 + dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "Default distribution for $APP" \ + --msgbox "Default is: ${var_os} ${var_version}\n\nIf the default Linux distribution is not adhered to, script support will be discontinued." 10 58 || return 1 + return 0 } select_distribution() { - if [[ "$var_os" == "alpine" ]]; then - return 0 - fi + [[ "$var_os" == "alpine" ]] && return 0 + local default="${var_os}" var_os="" - local selection + local result exitcode while [[ -z "$var_os" ]]; do if [[ "$default" == "debian" ]]; then - selection=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" ON \ - "ubuntu" "" OFF 3>&1 1>&2 2>&3) || return 1 + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "DISTRIBUTION" \ + --radiolist "Choose Distribution:" 10 58 2 \ + "debian" "" on \ + "ubuntu" "" off \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) else - selection=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" OFF \ - "ubuntu" "" ON 3>&1 1>&2 2>&3) || return 1 + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "DISTRIBUTION" \ + --radiolist "Choose Distribution:" 10 58 2 \ + "debian" "" off \ + "ubuntu" "" on \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) fi - if [[ -n "$selection" ]]; then - var_os="$selection" + exitcode=$? + + case $exitcode in + 0) + var_os="$result" printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" - fi + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac done } select_version() { local default="${var_version}" var_version="" - local list="" - local selection + local list result exitcode if [[ "$var_os" == "debian" ]]; then case "$default" in - 11) list="11 Bullseye ON 12 Bookworm OFF" ;; - 12) list="11 Bullseye OFF 12 Bookworm ON" ;; - *) list="11 Bullseye OFF 12 Bookworm OFF" ;; + 11) list=("11" "Bullseye" on "12" "Bookworm" off) ;; + 12) list=("11" "Bullseye" off "12" "Bookworm" on) ;; + *) list=("11" "Bullseye" off "12" "Bookworm" off) ;; esac elif [[ "$var_os" == "ubuntu" ]]; then case "$default" in - 20.04) list="20.04 Focal ON 22.04 Jammy OFF 24.04 Noble OFF 24.10 Oracular OFF" ;; - 22.04) list="20.04 Focal OFF 22.04 Jammy ON 24.04 Noble OFF 24.10 Oracular OFF" ;; - 24.04) list="20.04 Focal OFF 22.04 Jammy OFF 24.04 Noble ON 24.10 Oracular OFF" ;; - 24.10) list="20.04 Focal OFF 22.04 Jammy OFF 24.04 Noble OFF 24.10 Oracular ON" ;; - *) list="20.04 Focal OFF 22.04 Jammy OFF 24.04 Noble OFF 24.10 Oracular OFF" ;; + 20.04) list=("20.04" "Focal" on "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" off) ;; + 22.04) list=("20.04" "Focal" off "22.04" "Jammy" on "24.04" "Noble" off "24.10" "Oracular" off) ;; + 24.04) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" on "24.10" "Oracular" off) ;; + 24.10) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" on) ;; + *) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" off) ;; esac fi - while [[ -z "$var_version" ]]; do - selection=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "VERSION" --radiolist "Choose Version" 12 58 4 $list 3>&1 1>&2 2>&3) || return 1 - if [[ -n "$selection" ]]; then - var_version="$selection" - printf "%bVersion: %b%s%b\n" "$OSVERSION$BOLD$DGN" "$BGN" "$var_version" "$CL" - fi - done + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "VERSION" \ + --radiolist "Choose Version:" 15 58 5 "${list[@]}" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + + exitcode=$? + + case $exitcode in + 0) + var_version="$result" + printf "%bVersion: %b%s%b\n" "$OSVERSION$BOLD$DGN" "$BGN" "$var_version" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } select_container_type() { local default="${CT_TYPE}" CT_TYPE="" - local list="" - local selection + local list result exitcode - [[ "$default" == "1" ]] && list="1 Unprivileged ON 0 Privileged OFF" || list="1 Unprivileged OFF 0 Privileged ON" + [[ "$default" == "1" ]] && list=("1" "Unprivileged" on "0" "Privileged" off) || list=("1" "Unprivileged" off "0" "Privileged" on) - while [[ -z "$CT_TYPE" ]]; do - selection=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 $list 3>&1 1>&2 2>&3) || return 1 - if [[ -n "$selection" ]]; then - CT_TYPE="$selection" - local desc="Unprivileged" - [[ "$CT_TYPE" == "0" ]] && desc="Privileged" - printf "%bContainer Type: %b%s%b\n" "$CONTAINERTYPE$BOLD$DGN" "$BGN" "$desc" "$CL" - fi - done + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "CONTAINER TYPE" \ + --radiolist "Choose Type:" 10 58 2 "${list[@]}" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + + exitcode=$? + + case $exitcode in + 0) + CT_TYPE="$result" + [[ "$CT_TYPE" == "0" ]] && desc="Privileged" || desc="Unprivileged" + printf "%bContainer Type: %b%s%b\n" "$CONTAINERTYPE$BOLD$DGN" "$BGN" "$desc" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } - set_root_password() { - local pw1 - local pw2 + local pw1 pw2 exitcode while true; do - pw1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 \ - --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3) || return 1 + pw1=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "PASSWORD (leave blank for automatic login)" \ + --insecure --passwordbox "\nSet Root Password (needed for root ssh access)" 10 58 \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - if [[ -z "$pw1" ]]; then - PW1="Automatic Login" - PW="" - printf "%bRoot Password: %b%s%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$PW1" "$CL" - return 0 - fi - - if [[ "$pw1" == *" "* ]]; then - whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 - continue - fi - - if [[ ${#pw1} -lt 5 ]]; then - whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 - continue - fi - - pw2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --passwordbox "\nVerify Root Password" 9 58 \ - --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3) || return 1 - - if [[ "$pw1" == "$pw2" ]]; then - PW="-password $pw1" - printf "%bRoot Password: %b********%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$CL" - return 0 - else - whiptail --msgbox "Passwords do not match. Please try again." 8 58 - fi + case $exitcode in + 0) + if [[ -z "$pw1" ]]; then + PW1="Automatic Login" + PW="" + printf "%bRoot Password: %b%s%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$PW1" "$CL" + return 0 + fi + if [[ "$pw1" == *" "* ]]; then + dialog --msgbox "Password cannot contain spaces. Please try again." 8 58 + continue + fi + if [[ ${#pw1} -lt 5 ]]; then + dialog --msgbox "Password must be at least 5 characters long. Please try again." 8 58 + continue + fi + pw2=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "PASSWORD VERIFICATION" \ + --insecure --passwordbox "\nVerify Root Password" 10 58 \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? + case $exitcode in + 0) + if [[ "$pw1" == "$pw2" ]]; then + PW="-password $pw1" + printf "%bRoot Password: %b********%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$CL" + return 0 + else + dialog --msgbox "Passwords do not match. Please try again." 8 58 + continue + fi + ;; + 3) return 2 ;; + *) return 1 ;; + esac + ;; + 3) return 2 ;; + *) return 1 ;; + esac done } -set_container_id() { - CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set Container ID" 8 58 "$NEXTID" --title "CONTAINER ID" 3>&1 1>&2 2>&3) || return 1 - [[ -z "$CT_ID" ]] && CT_ID="$NEXTID" - printf "%bContainer ID: %b%s%b\n" "$CONTAINERID$BOLD$DGN" "$BGN" "$CT_ID" "$CL" +set_container_id() { + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "CONTAINER ID" \ + --inputbox "Set Container ID" 8 58 "$NEXTID" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? + + case $exitcode in + 0) + CT_ID="${result:-$NEXTID}" + printf "%bContainer ID: %b%s%b\n" "$CONTAINERID$BOLD$DGN" "$BGN" "$CT_ID" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_hostname() { - local input - input=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set Hostname" 8 58 "$NSAPP" --title "HOSTNAME" 3>&1 1>&2 2>&3) || return 1 + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "HOSTNAME" \ + --inputbox "Set Hostname" 8 58 "$NSAPP" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - if [[ -z "$input" ]]; then - HN="$NSAPP" - else - HN=$(tr -d ' ' <<<"${input,,}") - fi - - printf "%bHostname: %b%s%b\n" "$HOSTNAME$BOLD$DGN" "$BGN" "$HN" "$CL" + case $exitcode in + 0) + if [[ -z "$result" ]]; then + HN="$NSAPP" + else + HN=$(tr -d ' ' <<<"${result,,}") + fi + printf "%bHostname: %b%s%b\n" "$HOSTNAME$BOLD$DGN" "$BGN" "$HN" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_disk_size() { - local input - input=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set Disk Size in GB" 8 58 "$var_disk" --title "DISK SIZE" 3>&1 1>&2 2>&3) || return 1 + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "DISK SIZE" \ + --inputbox "Set Disk Size in GB" 8 58 "$var_disk" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - if [[ -z "$input" ]]; then - DISK_SIZE="$var_disk" - elif [[ "$input" =~ ^[0-9]+$ ]]; then - DISK_SIZE="$input" - else - whiptail --msgbox "Disk size must be an integer!" 8 58 - return 1 - fi - - printf "%bDisk Size: %b%s GB%b\n" "$DISKSIZE$BOLD$DGN" "$BGN" "$DISK_SIZE" "$CL" + case $exitcode in + 0) + if [[ -z "$result" ]]; then + DISK_SIZE="$var_disk" + elif [[ "$result" =~ ^[0-9]+$ ]]; then + DISK_SIZE="$result" + else + dialog --msgbox "Disk size must be an integer!" 8 58 + return 2 + fi + printf "%bDisk Size: %b%s GB%b\n" "$DISKSIZE$BOLD$DGN" "$BGN" "$DISK_SIZE" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_cpu_cores() { - local input - input=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" --title "CORE COUNT" 3>&1 1>&2 2>&3) || return 1 + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "CORE COUNT" \ + --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - [[ -z "$input" ]] && CORE_COUNT="$var_cpu" || CORE_COUNT="$input" - printf "%bCPU Cores: %b%s%b\n" "$CPUCORE$BOLD$DGN" "$BGN" "$CORE_COUNT" "$CL" + case $exitcode in + 0) + CORE_COUNT="${result:-$var_cpu}" + printf "%bCPU Cores: %b%s%b\n" "$CPUCORE$BOLD$DGN" "$BGN" "$CORE_COUNT" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_ram_size() { - local input - input=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" --title "RAM" 3>&1 1>&2 2>&3) || return 1 + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "RAM" \ + --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - [[ -z "$input" ]] && RAM_SIZE="$var_ram" || RAM_SIZE="$input" - printf "%bRAM Size: %b%s MiB%b\n" "$RAMSIZE$BOLD$DGN" "$BGN" "$RAM_SIZE" "$CL" + case $exitcode in + 0) + RAM_SIZE="${result:-$var_ram}" + printf "%bRAM Size: %b%s MiB%b\n" "$RAMSIZE$BOLD$DGN" "$BGN" "$RAM_SIZE" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_bridge() { - BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set a Bridge" 8 58 "vmbr0" --title "BRIDGE" 3>&1 1>&2 2>&3) || return 1 + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "BRIDGE" \ + --inputbox "Set a Bridge" 8 58 "vmbr0" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - [[ -z "$BRG" ]] && BRG="vmbr0" - printf "%bBridge: %b%s%b\n" "$BRIDGE$BOLD$DGN" "$BGN" "$BRG" "$CL" + case $exitcode in + 0) + BRG="${result:-vmbr0}" + printf "%bBridge: %b%s%b\n" "$BRIDGE$BOLD$DGN" "$BGN" "$BRG" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_ip_address() { + local result exitcode while true; do - NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 "dhcp" --title "IP ADDRESS" 3>&1 1>&2 2>&3) || return 1 + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "IP ADDRESS" \ + --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 "dhcp" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - if [[ "$NET" == "dhcp" ]]; then - printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" - return 0 - elif [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then - printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" - return 0 - else - whiptail --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 - fi + case $exitcode in + 0) + if [[ "$result" == "dhcp" ]]; then + NET="dhcp" + printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" + return 0 + elif [[ "$result" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then + NET="$result" + printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" + return 0 + else + dialog --msgbox "$result is an invalid IPv4 CIDR address. Please enter a valid address or 'dhcp'." 8 58 + continue + fi + ;; + 3) return 2 ;; + *) return 1 ;; + esac done } set_gateway() { + local result exitcode if [[ "$NET" == "dhcp" ]]; then GATE="" printf "%bGateway IP Address: %bDefault%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$CL" @@ -1168,131 +1394,235 @@ set_gateway() { fi while true; do - GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) || return 1 + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "Gateway IP" \ + --inputbox "Enter gateway IP address" 8 58 \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - if [[ -z "$GATE1" ]]; then - whiptail --msgbox "Gateway IP address cannot be empty" 8 58 - elif [[ "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then - GATE=",gw=$GATE1" - printf "%bGateway IP Address: %b%s%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$GATE1" "$CL" - return 0 - else - whiptail --msgbox "Invalid IP address format" 8 58 - fi + case $exitcode in + 0) + if [[ -z "$result" ]]; then + dialog --msgbox "Gateway IP address cannot be empty" 8 58 + continue + elif [[ "$result" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then + GATE=",gw=$result" + printf "%bGateway IP Address: %b%s%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$result" "$CL" + return 0 + else + dialog --msgbox "Invalid IP address format" 8 58 + fi + ;; + 3) return 2 ;; + *) return 1 ;; + esac done } + set_apt_cacher() { + local result exitcode if [[ "$var_os" == "alpine" ]]; then APT_CACHER="" APT_CACHER_IP="" return 0 fi - APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3) || return 1 + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "APT-Cacher IP" \ + --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - APT_CACHER="${APT_CACHER_IP:+yes}" - printf "%bAPT-Cacher IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "${APT_CACHER_IP:-Default}" "$CL" + case $exitcode in + 0) + APT_CACHER_IP="$result" + APT_CACHER="${APT_CACHER_IP:+yes}" + printf "%bAPT-Cacher IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "${APT_CACHER_IP:-Default}" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } toggle_ipv6() { - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58; then - DISABLEIP6="yes" - else - DISABLEIP6="no" - fi + dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "IPv6" \ + --yesno "Disable IPv6?" 10 58 \ + --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" + case $? in + 0) DISABLEIP6="yes" ;; + 1) DISABLEIP6="no" ;; + 3) return 2 ;; + *) return 1 ;; + esac printf "%bDisable IPv6: %b%s%b\n" "$DISABLEIPV6$BOLD$DGN" "$BGN" "$DISABLEIP6" "$CL" + return 0 } - set_mtu() { - MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3) || return 1 + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "MTU SIZE" \ + --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 "" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - if [[ -z "$MTU1" ]]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - printf "%bInterface MTU Size: %b%s%b\n" "$DEFAULT$BOLD$DGN" "$BGN" "$MTU1" "$CL" + case $exitcode in + 0) + if [[ -z "$result" ]]; then + MTU1="Default" + MTU="" + else + MTU1="$result" + MTU=",mtu=$MTU1" + fi + printf "%bInterface MTU Size: %b%s%b\n" "$DEFAULT$BOLD$DGN" "$BGN" "$MTU1" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_dns_search_domain() { - SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3) || return 1 + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "DNS Search Domain" \ + --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 "" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - if [[ -z "$SD" ]]; then - SX="Host" - SD="" - else - SX="$SD" - SD="-searchdomain=$SD" - fi - printf "%bDNS Search Domain: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$SX" "$CL" + case $exitcode in + 0) + if [[ -z "$result" ]]; then + SX="Host" + SD="" + else + SX="$result" + SD="-searchdomain=$result" + fi + printf "%bDNS Search Domain: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$SX" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_dns_server() { - NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3) || return 1 + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "DNS SERVER IP" \ + --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 "" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - if [[ -z "$NX" ]]; then - NX="Host" - NS="" - else - NS="-nameserver=$NX" - fi - printf "%bDNS Server IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NX" "$CL" + case $exitcode in + 0) + if [[ -z "$result" ]]; then + NX="Host" + NS="" + else + NX="$result" + NS="-nameserver=$result" + fi + printf "%bDNS Server IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NX" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_mac_address() { - MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set a MAC Address (leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) || return 1 + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "MAC ADDRESS" \ + --inputbox "Set a MAC Address (leave blank for generated MAC)" 8 58 "" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - if [[ -z "$MAC1" ]]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - fi - printf "%bMAC Address: %b%s%b\n" "$MACADDRESS$BOLD$DGN" "$BGN" "$MAC1" "$CL" + case $exitcode in + 0) + if [[ -z "$result" ]]; then + MAC1="Default" + MAC="" + else + MAC1="$result" + MAC=",hwaddr=$MAC1" + fi + printf "%bMAC Address: %b%s%b\n" "$MACADDRESS$BOLD$DGN" "$BGN" "$MAC1" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_vlan() { - VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set a Vlan (leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) || return 1 + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "VLAN" \ + --inputbox "Set a VLAN (leave blank for no VLAN)" 8 58 "" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - if [[ -z "$VLAN1" ]]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - printf "%bVlan: %b%s%b\n" "$VLANTAG$BOLD$DGN" "$BGN" "$VLAN1" "$CL" + case $exitcode in + 0) + if [[ -z "$result" ]]; then + VLAN1="Default" + VLAN="" + else + VLAN1="$result" + VLAN=",tag=$VLAN1" + fi + printf "%bVlan: %b%s%b\n" "$VLANTAG$BOLD$DGN" "$BGN" "$VLAN1" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_tags() { - ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "Set Custom Tags? [If you remove all, there will be no tags!]" 8 58 "${TAGS}" --title "Advanced Tags" 3>&1 1>&2 2>&3) || return 1 + local result exitcode + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "Advanced Tags" \ + --inputbox "Set Custom Tags? [If you remove all, there will be no tags!]" 8 58 "$TAGS" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? - if [[ -n "$ADV_TAGS" ]]; then - ADV_TAGS=$(tr -d '[:space:]' <<<"$ADV_TAGS") - TAGS="$ADV_TAGS" - else - TAGS=";" - fi - printf "%bTags: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$TAGS" "$CL" + case $exitcode in + 0) + if [[ -n "$result" ]]; then + ADV_TAGS=$(tr -d '[:space:]' <<<"$result") + TAGS="$ADV_TAGS" + else + TAGS=";" + fi + printf "%bTags: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$TAGS" "$CL" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac } set_ssh_access() { + local result exitcode + if [[ "$PW" == -password* ]]; then - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58; then - SSH="yes" - else - SSH="no" - fi + dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "SSH ACCESS" \ + --yesno "Enable Root SSH Access?" 10 58 \ + --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" + exitcode=$? + case $exitcode in + 0) SSH="yes" ;; + 1) SSH="no" ;; + 3) return 2 ;; + *) return 1 ;; + esac else SSH="no" fi @@ -1300,45 +1630,68 @@ set_ssh_access() { printf "%bRoot SSH Access: %b%s%b\n" "$ROOTSSH$BOLD$DGN" "$BGN" "$SSH" "$CL" if [[ "$SSH" == "yes" ]]; then - SSH_AUTHORIZED_KEY=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3) - [[ -z "$SSH_AUTHORIZED_KEY" ]] && printf "Warning: No SSH key provided.\n" + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "SSH Key" \ + --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 "" \ + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + exitcode=$? + case $exitcode in + 0) + SSH_AUTHORIZED_KEY="$result" + return 0 + ;; + 3) return 2 ;; + *) return 1 ;; + esac else SSH_AUTHORIZED_KEY="" + return 0 fi } set_fuse() { - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58; then - ENABLE_FUSE="yes" - else - ENABLE_FUSE="no" - fi + dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "FUSE Support" \ + --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58 \ + --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" + case $? in + 0) ENABLE_FUSE="yes" ;; + 1) ENABLE_FUSE="no" ;; + 3) return 2 ;; + *) return 1 ;; + esac printf "%bFUSE (Filesystem in Userspace) Support: %b%s%b\n" "$FUSE$BOLD$DGN" "$BGN" "$ENABLE_FUSE" "$CL" + return 0 } set_verbose() { - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58; then - VERB="yes" - else - VERB="no" - fi + dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "VERBOSE MODE" \ + --yesno "Enable Verbose Mode?" 10 58 \ + --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" + case $? in + 0) VERB="yes" ;; + 1) VERB="no" ;; + 3) return 2 ;; + *) return 1 ;; + esac printf "%bVerbose Mode: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$VERB" "$CL" + return 0 } confirm_creation() { - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58; then + dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "ADVANCED SETTINGS COMPLETE" \ + --yesno "Ready to create ${APP} LXC?" 10 58 \ + --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" + case $? in + 0) printf "%bCreating a %s LXC using the above advanced settings%b\n" "$CREATING$BOLD$RD" "$APP" "$CL" return 0 - else - clear - header_info - printf "%bUsing Advanced Settings on node %s%b\n" "$ADVANCED$BOLD$RD" "$PVEHOST_NAME" "$CL" - return 1 - fi + ;; + 3) return 2 ;; + *) return 1 ;; + esac } diagnostics_check() { From a926689a1d3ec6d8c612aeb99e7a5e8c9336bfd3 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:26:20 +0200 Subject: [PATCH 0196/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 96e18eb..b8aa284 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -127,7 +127,7 @@ server { } location /search/ { - proxy_pass http://meilisearch:7700/; + proxy_pass http://127.0.0.1:7700/; } location / { From cd9b73392ac5be3e478778436fd49a43940f48a8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:28:16 +0200 Subject: [PATCH 0197/1614] switch ssh_check to dialog --- misc/build.func | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/misc/build.func b/misc/build.func index 066f232..5c62247 100644 --- a/misc/build.func +++ b/misc/build.func @@ -330,14 +330,24 @@ header_info() { # This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit. ssh_check() { - if [ -n "${SSH_CLIENT:+x}" ]; then - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's advisable to utilize the Proxmox shell rather than SSH, as there may be potential complications with variable retrieval. Proceed using SSH?" 10 72; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Proceed using SSH" "You've chosen to proceed using SSH. If any issues arise, please run the script in the Proxmox shell before creating a repository issue." 10 72 - else + if [[ -n "${SSH_CLIENT:+x}" ]]; then + dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "SSH DETECTED" \ + --yesno "It's advisable to utilize the Proxmox shell rather than SSH,\nas there may be potential complications with variable retrieval.\n\nProceed using SSH?" 12 72 \ + --ok-label "Yes" --cancel-label "No" + + case $? in + 0) + dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "Proceed using SSH" \ + --msgbox "You've chosen to proceed using SSH.\n\nIf any issues arise, please run the script in the Proxmox shell before creating a repository issue." 10 72 + ;; + 1 | 255) clear - echo "Exiting due to SSH usage. Please consider using the Proxmox shell." + printf "%s\n" "Exiting due to SSH usage. Please consider using the Proxmox shell." exit - fi + ;; + esac fi } From 053c33dce9f436c39807f13aeb2c70d87bafe6b3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:30:28 +0200 Subject: [PATCH 0198/1614] Update build.func --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 5c62247..3780a9a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -876,7 +876,7 @@ dialog_input() { local prompt="$2" local default="$3" local result - + apt-get install -y dialog result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "$title" \ --extra-button --extra-label "Back" \ From 57c12ed71005938c15f3ecdfa74cdcf3579ebdf6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:32:24 +0200 Subject: [PATCH 0199/1614] Update build.func --- misc/build.func | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/misc/build.func b/misc/build.func index 3780a9a..0f27c4e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1100,14 +1100,14 @@ select_distribution() { --radiolist "Choose Distribution:" 10 58 2 \ "debian" "" on \ "ubuntu" "" off \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) else result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DISTRIBUTION" \ --radiolist "Choose Distribution:" 10 58 2 \ "debian" "" off \ "ubuntu" "" on \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) fi exitcode=$? @@ -1148,7 +1148,7 @@ select_version() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "VERSION" \ --radiolist "Choose Version:" 15 58 5 "${list[@]}" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? @@ -1173,7 +1173,7 @@ select_container_type() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "CONTAINER TYPE" \ --radiolist "Choose Type:" 10 58 2 "${list[@]}" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? @@ -1195,7 +1195,7 @@ set_root_password() { pw1=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "PASSWORD (leave blank for automatic login)" \ --insecure --passwordbox "\nSet Root Password (needed for root ssh access)" 10 58 \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1217,7 +1217,7 @@ set_root_password() { pw2=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "PASSWORD VERIFICATION" \ --insecure --passwordbox "\nVerify Root Password" 10 58 \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in 0) @@ -1245,7 +1245,7 @@ set_container_id() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "CONTAINER ID" \ --inputbox "Set Container ID" 8 58 "$NEXTID" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1264,7 +1264,7 @@ set_hostname() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "HOSTNAME" \ --inputbox "Set Hostname" 8 58 "$NSAPP" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1287,7 +1287,7 @@ set_disk_size() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DISK SIZE" \ --inputbox "Set Disk Size in GB" 8 58 "$var_disk" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1313,7 +1313,7 @@ set_cpu_cores() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "CORE COUNT" \ --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1332,7 +1332,7 @@ set_ram_size() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "RAM" \ --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1351,7 +1351,7 @@ set_bridge() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "BRIDGE" \ --inputbox "Set a Bridge" 8 58 "vmbr0" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1371,7 +1371,7 @@ set_ip_address() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "IP ADDRESS" \ --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 "dhcp" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1407,7 +1407,7 @@ set_gateway() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "Gateway IP" \ --inputbox "Enter gateway IP address" 8 58 \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1440,7 +1440,7 @@ set_apt_cacher() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "APT-Cacher IP" \ --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1474,7 +1474,7 @@ set_mtu() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "MTU SIZE" \ --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1499,7 +1499,7 @@ set_dns_search_domain() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DNS Search Domain" \ --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1524,7 +1524,7 @@ set_dns_server() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DNS SERVER IP" \ --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1549,7 +1549,7 @@ set_mac_address() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "MAC ADDRESS" \ --inputbox "Set a MAC Address (leave blank for generated MAC)" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1574,7 +1574,7 @@ set_vlan() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "VLAN" \ --inputbox "Set a VLAN (leave blank for no VLAN)" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1599,7 +1599,7 @@ set_tags() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "Advanced Tags" \ --inputbox "Set Custom Tags? [If you remove all, there will be no tags!]" 8 58 "$TAGS" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in @@ -1643,7 +1643,7 @@ set_ssh_access() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "SSH Key" \ --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 2>&1 >/dev/tty) + --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) exitcode=$? case $exitcode in 0) From 84fac0dcbcac60a3398970929f60fe030adb7540 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:41:41 +0200 Subject: [PATCH 0200/1614] Update bar-assistant.sh --- ct/bar-assistant.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/bar-assistant.sh b/ct/bar-assistant.sh index a898c60..afc1513 100644 --- a/ct/bar-assistant.sh +++ b/ct/bar-assistant.sh @@ -30,7 +30,7 @@ function update_script() { exit fi RELEASE_MEILISEARCH=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - RELEASE_BARASSISTANT=$(curl -s https://api.github.com/repos/benjaminjonard/manyfold/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + RELEASE_BARASSISTANT=$(curl -s https://api.github.com/repos/karlomikus/bar-assistant/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') RELEASE_SALTRIM=$(curl -s https://api.github.com/repos/karlomikus/vue-salt-rim/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE_BARASSISTANT}" != "$(cat /opt/${APP}_version.txt)" ]]; then From 19dd8330201b791613989c77054501d312b58a96 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 31 Mar 2025 08:41:54 +0000 Subject: [PATCH 0201/1614] Update .app files --- ct/headers/bar-assistant | 8 ++++---- ct/headers/gomft | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 ct/headers/gomft diff --git a/ct/headers/bar-assistant b/ct/headers/bar-assistant index ee941a6..714e385 100644 --- a/ct/headers/bar-assistant +++ b/ct/headers/bar-assistant @@ -1,6 +1,6 @@ - ____ ___ _ __ __ + ____ ___ _ __ __ / __ )____ ______ / | __________(_)____/ /_____ _____ / /_ / __ / __ `/ ___/_____/ /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ - / /_/ / /_/ / / /_____/ ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ -/_____/\__,_/_/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ - + / /_/ / /_/ / / /_____/ ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_____/\__,_/_/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ + diff --git a/ct/headers/gomft b/ct/headers/gomft new file mode 100644 index 0000000..7833e25 --- /dev/null +++ b/ct/headers/gomft @@ -0,0 +1,6 @@ + ______ __ _______________ + / ____/___ / |/ / ____/_ __/ + / / __/ __ \/ /|_/ / /_ / / +/ /_/ / /_/ / / / / __/ / / +\____/\____/_/ /_/_/ /_/ + From 60c5bbe07e24fd4f76bea09b4111c51970f83547 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:52:42 +0200 Subject: [PATCH 0202/1614] fix dialog --- misc/build.func | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/misc/build.func b/misc/build.func index 0f27c4e..b1f0f07 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1105,9 +1105,13 @@ select_distribution() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DISTRIBUTION" \ --radiolist "Choose Distribution:" 10 58 2 \ - "debian" "" off \ - "ubuntu" "" on \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) + "debian" "" on \ + "ubuntu" "" off \ + --ok-label "Next" \ + --cancel-label "Exit" \ + --extra-button --extra-label "Back" \ + 3>&1 1>&2 2>&3) + fi exitcode=$? @@ -1147,8 +1151,12 @@ select_version() { result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "VERSION" \ - --radiolist "Choose Version:" 15 58 5 "${list[@]}" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) + --radiolist "Choose Version:" 15 58 5 \ + "${list[@]}" \ + --ok-label "Next" \ + --cancel-label "Exit" \ + --extra-button --extra-label "Back" \ + 3>&1 1>&2 2>&3) exitcode=$? From 0cee46802b4f7b298f1fefb3bad047be3d502203 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 11:04:20 +0200 Subject: [PATCH 0203/1614] Update build.func --- misc/build.func | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index b1f0f07..f58df51 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1102,7 +1102,9 @@ select_distribution() { "ubuntu" "" off \ --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) else - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + exec 3>&1 + result=$(dialog \ + --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DISTRIBUTION" \ --radiolist "Choose Distribution:" 10 58 2 \ "debian" "" on \ @@ -1110,8 +1112,9 @@ select_distribution() { --ok-label "Next" \ --cancel-label "Exit" \ --extra-button --extra-label "Back" \ - 3>&1 1>&2 2>&3) - + 2>&1 1>&3) + exitcode=$? + exec 3>&- fi exitcode=$? From db8500ee815f8278f31d0e7cf0acc7716f3560b4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 11:26:08 +0200 Subject: [PATCH 0204/1614] fix os_select --- misc/build.func | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index f58df51..4f20cc7 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1095,20 +1095,25 @@ select_distribution() { while [[ -z "$var_os" ]]; do if [[ "$default" == "debian" ]]; then + exec 3>&1 result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DISTRIBUTION" \ --radiolist "Choose Distribution:" 10 58 2 \ "debian" "" on \ "ubuntu" "" off \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) + --ok-label "Next" --cancel-label "Exit" \ + --extra-button --extra-label "Back" \ + 2>&1 1>&3) + exitcode=$? + exec 3>&- else exec 3>&1 result=$(dialog \ --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DISTRIBUTION" \ --radiolist "Choose Distribution:" 10 58 2 \ - "debian" "" on \ - "ubuntu" "" off \ + "debian" "" off \ + "ubuntu" "" on \ --ok-label "Next" \ --cancel-label "Exit" \ --extra-button --extra-label "Back" \ From 868fac7bd49c3c93eae0b35555383ac497a4e05d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 11:36:44 +0200 Subject: [PATCH 0205/1614] Update build.func --- misc/build.func | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/misc/build.func b/misc/build.func index 4f20cc7..963da61 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1089,49 +1089,54 @@ show_intro_messages() { select_distribution() { [[ "$var_os" == "alpine" ]] && return 0 - local default="${var_os}" + local default result exitcode + default="${var_os}" var_os="" - local result exitcode while [[ -z "$var_os" ]]; do + exec 3>&1 + if [[ "$default" == "debian" ]]; then - exec 3>&1 result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DISTRIBUTION" \ --radiolist "Choose Distribution:" 10 58 2 \ "debian" "" on \ "ubuntu" "" off \ - --ok-label "Next" --cancel-label "Exit" \ - --extra-button --extra-label "Back" \ + --ok-label "Next" \ + --cancel-label "Exit" \ + --extra-button \ + --extra-label "Back" \ 2>&1 1>&3) - exitcode=$? - exec 3>&- else - exec 3>&1 - result=$(dialog \ - --backtitle "[dev] Proxmox VE Helper Scripts" \ + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DISTRIBUTION" \ --radiolist "Choose Distribution:" 10 58 2 \ "debian" "" off \ "ubuntu" "" on \ --ok-label "Next" \ --cancel-label "Exit" \ - --extra-button --extra-label "Back" \ + --extra-button \ + --extra-label "Back" \ 2>&1 1>&3) - exitcode=$? - exec 3>&- fi exitcode=$? + exec 3>&- - case $exitcode in + case "$exitcode" in 0) - var_os="$result" - printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" - return 0 + if [[ -n "$result" && "$result" =~ ^(debian|ubuntu)$ ]]; then + var_os="$result" + printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" + return 0 + fi + ;; + 3) + return 2 + ;; + 1 | 255) + return 1 ;; - 3) return 2 ;; - *) return 1 ;; esac done } From 12e400c1434fd291f8a228c1d9af170a4f959dbc Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 11:44:19 +0200 Subject: [PATCH 0206/1614] Update build.func --- misc/build.func | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/misc/build.func b/misc/build.func index 963da61..cc4936e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1096,36 +1096,23 @@ select_distribution() { while [[ -z "$var_os" ]]; do exec 3>&1 - if [[ "$default" == "debian" ]]; then - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "DISTRIBUTION" \ - --radiolist "Choose Distribution:" 10 58 2 \ - "debian" "" on \ - "ubuntu" "" off \ - --ok-label "Next" \ - --cancel-label "Exit" \ - --extra-button \ - --extra-label "Back" \ - 2>&1 1>&3) - else - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "DISTRIBUTION" \ - --radiolist "Choose Distribution:" 10 58 2 \ - "debian" "" off \ - "ubuntu" "" on \ - --ok-label "Next" \ - --cancel-label "Exit" \ - --extra-button \ - --extra-label "Back" \ - 2>&1 1>&3) - fi + result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "DISTRIBUTION" \ + --radiolist "Choose Distribution:" 15 60 4 \ + "debian" "" $([[ "$default" == "debian" ]] && printf "on" || printf "off") \ + "ubuntu" "" $([[ "$default" == "ubuntu" ]] && printf "on" || printf "off") \ + --ok-label "Next" \ + --cancel-label "Exit" \ + --extra-button \ + --extra-label "Back" \ + 2>&1 1>&3) exitcode=$? exec 3>&- case "$exitcode" in 0) - if [[ -n "$result" && "$result" =~ ^(debian|ubuntu)$ ]]; then + if [[ "$result" =~ ^(debian|ubuntu)$ ]]; then var_os="$result" printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" return 0 From 23c037bfd06da3f4c8d5fd528ce80b298c62712d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 11:49:37 +0200 Subject: [PATCH 0207/1614] Update build.func --- misc/build.func | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index cc4936e..c54080c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1095,8 +1095,8 @@ select_distribution() { while [[ -z "$var_os" ]]; do exec 3>&1 - - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + result=$(dialog --clear \ + --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DISTRIBUTION" \ --radiolist "Choose Distribution:" 15 60 4 \ "debian" "" $([[ "$default" == "debian" ]] && printf "on" || printf "off") \ @@ -1106,7 +1106,6 @@ select_distribution() { --extra-button \ --extra-label "Back" \ 2>&1 1>&3) - exitcode=$? exec 3>&- From 92604c2c4d015331c0732fe39c6f4ebea07746fa Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 31 Mar 2025 11:52:33 +0200 Subject: [PATCH 0208/1614] Fixes --- ct/bar-assistant.sh | 4 ++-- install/bar-assistant-install.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ct/bar-assistant.sh b/ct/bar-assistant.sh index afc1513..4860a29 100644 --- a/ct/bar-assistant.sh +++ b/ct/bar-assistant.sh @@ -104,7 +104,7 @@ function update_script() { systemctl stop meilisearch msg_ok "Stopped Service" - msg_info "Updating Meilisearch to v${RELEASE_MEILISEARCH}" + msg_info "Updating Meilisearch to ${RELEASE_MEILISEARCH}" cd /opt RELEASE=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -o meilisearch.deb @@ -121,7 +121,7 @@ function update_script() { msg_ok "Cleaned" msg_ok "Updated Meilisearch" else - msg_ok "No update required. Meilisearch is already at v${RELEASE_MEILISEARCH}" + msg_ok "No update required. Meilisearch is already at ${RELEASE_MEILISEARCH}" fi exit } diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index b8aa284..00ff97b 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -86,6 +86,7 @@ $STD php artisan scout:sync-index-settings $STD php artisan config:cache $STD php artisan route:cache $STD php artisan event:cache +chown -R www-data:www-data /opt/bar-assistant echo "${RELEASE_BARASSISTANT}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Bar Assistant" From ac729f38486304404e46e61e6e52255550873746 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 11:57:00 +0200 Subject: [PATCH 0209/1614] Update build.func --- misc/build.func | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index c54080c..49658b8 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1090,17 +1090,23 @@ select_distribution() { [[ "$var_os" == "alpine" ]] && return 0 local default result exitcode - default="${var_os}" + default="${var_os:-debian}" var_os="" + local debian_flag ubuntu_flag + [[ "$default" == "debian" ]] && debian_flag="on" || debian_flag="off" + [[ "$default" == "ubuntu" ]] && ubuntu_flag="on" || ubuntu_flag="off" + + printf "DEBUG: default=%s | debian_flag=%s | ubuntu_flag=%s\n" "$default" "$debian_flag" "$ubuntu_flag" + while [[ -z "$var_os" ]]; do exec 3>&1 result=$(dialog --clear \ --backtitle "[dev] Proxmox VE Helper Scripts" \ --title "DISTRIBUTION" \ --radiolist "Choose Distribution:" 15 60 4 \ - "debian" "" $([[ "$default" == "debian" ]] && printf "on" || printf "off") \ - "ubuntu" "" $([[ "$default" == "ubuntu" ]] && printf "on" || printf "off") \ + "debian" "" "$debian_flag" \ + "ubuntu" "" "$ubuntu_flag" \ --ok-label "Next" \ --cancel-label "Exit" \ --extra-button \ @@ -1109,18 +1115,28 @@ select_distribution() { exitcode=$? exec 3>&- + printf "DEBUG: exitcode=%s | result=%s\n" "$exitcode" "$result" + case "$exitcode" in 0) if [[ "$result" =~ ^(debian|ubuntu)$ ]]; then var_os="$result" printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" return 0 + else + printf "DEBUG: Invalid result on OK: '%s'\n" "$result" fi ;; 3) + printf "DEBUG: User pressed Back (exitcode 3)\n" return 2 ;; 1 | 255) + printf "DEBUG: User pressed Cancel or ESC (exitcode: %s)\n" "$exitcode" + return 1 + ;; + *) + printf "DEBUG: Unknown exitcode: %s\n" "$exitcode" return 1 ;; esac From 06cdcd1a57c1406abe0387fcccb8a0a058ecafaa Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 31 Mar 2025 09:59:42 +0000 Subject: [PATCH 0210/1614] Update .app files --- ct/headers/openziti-controller | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/openziti-controller diff --git a/ct/headers/openziti-controller b/ct/headers/openziti-controller new file mode 100644 index 0000000..ec0709a --- /dev/null +++ b/ct/headers/openziti-controller @@ -0,0 +1,6 @@ + _ __ _ __ ____ + ____ ____ ___ ____ ____ (_) /_(_) _________ ____ / /__________ / / /__ _____ + / __ \/ __ \/ _ \/ __ \/_ / / / __/ /_____/ ___/ __ \/ __ \/ __/ ___/ __ \/ / / _ \/ ___/ +/ /_/ / /_/ / __/ / / / / /_/ / /_/ /_____/ /__/ /_/ / / / / /_/ / / /_/ / / / __/ / +\____/ .___/\___/_/ /_/ /___/_/\__/_/ \___/\____/_/ /_/\__/_/ \____/_/_/\___/_/ + /_/ From 5ce60dbfd099d5342eb768355148838f7f934047 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 31 Mar 2025 12:00:50 +0200 Subject: [PATCH 0211/1614] fixes --- ct/bar-assistant.sh | 8 ++++---- install/bar-assistant-install.sh | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ct/bar-assistant.sh b/ct/bar-assistant.sh index 4860a29..53c513a 100644 --- a/ct/bar-assistant.sh +++ b/ct/bar-assistant.sh @@ -8,10 +8,10 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # Source: https://www.meilisearch.com/ APP="Bar-Assistant" -var_tags="${var_tags:-network}" -var_cpu="${var_cpu:-4}" -var_ram="${var_ram:-4096}" -var_disk="${var_disk:-15}" +var_tags="${var_tags:-inventory;drinks}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-4}" var_os="${var_os:-debian}" var_version="${var_version:-12}" var_unprivileged="${var_unprivileged:-1}" diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 00ff97b..bda7a06 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -24,6 +24,20 @@ $STD apt-get install -y \ nginx msg_ok "Installed Dependencies" +msg_info "Adding PHP8.3 Repository" +$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb +$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb +$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +$STD apt-get update +msg_ok "Added PHP8.3 Repository" + +msg_info "Installing PHP" +$STD apt-get remove -y php8.2* +$STD apt-get install -y \ + php8.3 \ + php8.3-{ffi,opcache,redis,zip,pdo-sqlite,bcmath,pdo,curl,dom,fpm} +msg_info "Installed PHP" + msg_info "Installing MeiliSearch" cd /opt RELEASE_MEILISEARCH=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') From 5ae0c340e5d2d2ee1e33f2b556ebf348f8c9a826 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 12:02:27 +0200 Subject: [PATCH 0212/1614] Update build.func --- misc/build.func | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/misc/build.func b/misc/build.func index 49658b8..a688e42 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1097,8 +1097,6 @@ select_distribution() { [[ "$default" == "debian" ]] && debian_flag="on" || debian_flag="off" [[ "$default" == "ubuntu" ]] && ubuntu_flag="on" || ubuntu_flag="off" - printf "DEBUG: default=%s | debian_flag=%s | ubuntu_flag=%s\n" "$default" "$debian_flag" "$ubuntu_flag" - while [[ -z "$var_os" ]]; do exec 3>&1 result=$(dialog --clear \ @@ -1115,8 +1113,6 @@ select_distribution() { exitcode=$? exec 3>&- - printf "DEBUG: exitcode=%s | result=%s\n" "$exitcode" "$result" - case "$exitcode" in 0) if [[ "$result" =~ ^(debian|ubuntu)$ ]]; then @@ -1124,19 +1120,17 @@ select_distribution() { printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" return 0 else - printf "DEBUG: Invalid result on OK: '%s'\n" "$result" + printf "[DEBUG] No valid selection made (result='%s'), repeating...\n" "$result" fi ;; 3) - printf "DEBUG: User pressed Back (exitcode 3)\n" return 2 ;; 1 | 255) - printf "DEBUG: User pressed Cancel or ESC (exitcode: %s)\n" "$exitcode" return 1 ;; *) - printf "DEBUG: Unknown exitcode: %s\n" "$exitcode" + printf "[DEBUG] Unexpected exit code: %s\n" "$exitcode" >&2 return 1 ;; esac From e03c28754e264b1c2813533c1996e81f15ab2123 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 31 Mar 2025 12:17:07 +0200 Subject: [PATCH 0213/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index bda7a06..13d2af1 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -21,7 +21,8 @@ $STD apt-get install -y \ composer \ redis-server \ npm \ - nginx + nginx \ + lsb-release msg_ok "Installed Dependencies" msg_info "Adding PHP8.3 Repository" From 78d0a6fd7cd2b4263fcbe7225883f6f297b75e1e Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 31 Mar 2025 12:36:32 +0200 Subject: [PATCH 0214/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 13d2af1..545f36d 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -17,7 +17,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - php-{ffi,opcache,redis,zip,pdo-sqlite,bcmath,pdo,curl,dom,fpm} \ composer \ redis-server \ npm \ From e9abde129c8d96e10d783214834c5f250933f4cc Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 31 Mar 2025 12:48:43 +0200 Subject: [PATCH 0215/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 545f36d..2c46120 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -175,7 +175,7 @@ server { error_page 404 /index.php; location ~ ^/index\.php(/|$) { - fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; + fastcgi_pass unix:/var/run/php/php8.3-fpm.sock; fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name; include fastcgi_params; fastcgi_hide_header X-Powered-By; From 5cf573c0dcb359322048ef54f43f74d9e23a0354 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 31 Mar 2025 11:01:34 +0000 Subject: [PATCH 0216/1614] Deleted files for issue: slskd --- ct/slskd.sh | 80 --------------------- frontend/public/json/slskd.json | 43 ----------- install/slskd-install.sh | 124 -------------------------------- 3 files changed, 247 deletions(-) delete mode 100644 ct/slskd.sh delete mode 100644 frontend/public/json/slskd.json delete mode 100644 install/slskd-install.sh diff --git a/ct/slskd.sh b/ct/slskd.sh deleted file mode 100644 index 0970eaf..0000000 --- a/ct/slskd.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: vhsdream -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://github.com/slskd/slskd, https://soularr.net - -APP="slskd" -var_tags="${var_tags:-arr;p2p}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-512}" -var_disk="${var_disk:-4}" -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 [[ ! -d /opt/slskd ]] || [[ ! -d /opt/soularr ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - RELEASE=$(curl -s https://api.github.com/repos/slskd/slskd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - msg_info "Stopping $APP and Soularr" - systemctl stop slskd soularr.timer soularr.service - msg_ok "Stopped $APP and Soularr" - - msg_info "Updating $APP to v${RELEASE}" - tmp_file=$(mktemp) - curl -fsSL "https://github.com/slskd/slskd/releases/download/${RELEASE}/slskd-${RELEASE}-linux-x64.zip" -o $tmp_file - unzip -q -oj $tmp_file slskd -d /opt/${APP} - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Updated $APP to v${RELEASE}" - - msg_info "Updating Soularr" - cp /opt/soularr/config.ini /opt/config.ini.bak - cp /opt/soularr/run.sh /opt/run.sh.bak - cd /tmp - rm -rf /opt/soularr - curl -fsSL https://github.com/mrusse/soularr/archive/refs/heads/main.zip - unzip -q main.zip - mv soularr-main /opt/soularr - cd /opt/soularr - $STD pip install -r requirements.txt - mv /opt/config.ini.bak /opt/soularr/config.ini - mv /opt/run.sh.bak /opt/soularr/run.sh - msg_ok "Soularr updated" - msg_info "Starting $APP and Soularr" - systemctl start slskd soularr.timer - msg_ok "Started $APP and Soularr" - - msg_info "Cleaning Up" - rm -rf $tmp_file - rm -rf /tmp/main.zip - msg_ok "Cleanup Completed" - - else - msg_ok "No update required. ${APP} is already at v${RELEASE}" - 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}:5030${CL}" diff --git a/frontend/public/json/slskd.json b/frontend/public/json/slskd.json deleted file mode 100644 index 89a90d2..0000000 --- a/frontend/public/json/slskd.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "slskd", - "slug": "slskd", - "categories": [ - 11 - ], - "date_created": "2025-03-11", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 5030, - "documentation": "https://github.com/slskd/slskd/tree/master/docs", - "website": "https://github.com/slskd/slskd", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/slskd.png", - "description": "A modern client-server application for the Soulseek file sharing network. ", - "install_methods": [ - { - "type": "default", - "script": "ct/slskd.sh", - "resources": { - "cpu": 1, - "ram": 512, - "hdd": 4, - "os": "Debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": "slskd", - "password": "slskd" - }, - "notes": [ - { - "text": "See /opt/slskd/config/sksld.yml to add your Soulseek credentials", - "type": "info" - }, - { - "text": "This LXC includes Soularr; it needs to be configured (/opt/soularr/config.ini) before it will work", - "type": "info" - } - ] -} diff --git a/install/slskd-install.sh b/install/slskd-install.sh deleted file mode 100644 index ea88bbd..0000000 --- a/install/slskd-install.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: vhsdream -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://github.com/slskd/slskd/, https://soularr.net - -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 \ - curl \ - sudo \ - mc \ - unzip \ - python3-pip -msg_ok "Installed Dependencies" - -msg_info "Setup ${APPLICATION}" -tmp_file=$(mktemp) -RELEASE=$(curl -s https://api.github.com/repos/slskd/slskd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/slskd/slskd/releases/download/${RELEASE}/slskd-${RELEASE}-linux-x64.zip" -o $tmp_file -unzip -q $tmp_file -d /opt/${APPLICATION} -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -JWT_KEY=$(openssl rand -base64 44) -SLSKD_API_KEY=$(openssl rand -base64 44) -cp /opt/${APPLICATION}/config/slskd.example.yml /opt/${APPLICATION}/config/slskd.yml -sed -i \ - -e "\|web:|,\|cidr|s|^#||" \ - -e "\|https:|,\|5031|s|false|true|" \ - -e "\|api_keys|,\|cidr|s|/etc/systemd/system/${APPLICATION}.service -[Unit] -Description=${APPLICATION} Service -After=network.target -Wants=network.target - -[Service] -WorkingDirectory=/opt/${APPLICATION} -ExecStart=/opt/${APPLICATION}/slskd --config /opt/${APPLICATION}/config/slskd.yml -Restart=always - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/soularr.timer -[Unit] -Description=Soularr service timer -RefuseManualStart=no -RefuseManualStop=no - -[Timer] -Persistent=true -# run every 5 minutes -OnCalendar=*-*-* *:0/5:00 -Unit=soularr.service - -[Install] -WantedBy=timers.target -EOF - -cat </etc/systemd/system/soularr.service -[Unit] -Description=Soularr service -After=network.target slskd.service - -[Service] -Type=simple -WorkingDirectory=/opt/soularr -ExecStart=/bin/bash -c /opt/soularr/run.sh - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now ${APPLICATION}.service -systemctl enable -q soularr.timer -msg_ok "Created Services" - -motd_ssh -customize - -msg_info "Cleaning up" -rm -rf $tmp_file -rm -rf /tmp/main.zip -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" From 9f790b60b90f85fd97fb5f2bd7fcc91ab73eb926 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 31 Mar 2025 11:19:01 +0000 Subject: [PATCH 0217/1614] Update .app files --- ct/headers/slskd | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/slskd diff --git a/ct/headers/slskd b/ct/headers/slskd deleted file mode 100644 index 6ebb289..0000000 --- a/ct/headers/slskd +++ /dev/null @@ -1,6 +0,0 @@ - __ __ __ - _____/ /____/ /______/ / - / ___/ / ___/ //_/ __ / - (__ ) (__ ) ,< / /_/ / -/____/_/____/_/|_|\__,_/ - From 05ac5128cd650d7444a4aa932d5d4a2c526163a4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 13:51:31 +0200 Subject: [PATCH 0218/1614] Update build.func --- misc/build.func | 2424 +++++++++++++++++++++++------------------------ 1 file changed, 1212 insertions(+), 1212 deletions(-) diff --git a/misc/build.func b/misc/build.func index a688e42..e97c6ec 100644 --- a/misc/build.func +++ b/misc/build.func @@ -431,1295 +431,1295 @@ exit_script() { } # This function allows the user to configure advanced settings for the script. -# advanced_settings() { -# whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 -# whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 -# if [ "$var_os" != "alpine" ]; then -# var_default_os="${var_os}" -# var_os="" -# while [ -z "$var_os" ]; do -# if [ "$var_default_os" == "debian" ]; then -# if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ -# "debian" "" ON \ -# "ubuntu" "" OFF \ -# 3>&1 1>&2 2>&3); then -# if [ -n "$var_os" ]; then -# echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" -# fi -# else -# exit_script -# fi -# fi -# if [ "$var_default_os" == "ubuntu" ]; then -# if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ -# "debian" "" OFF \ -# "ubuntu" "" ON \ -# 3>&1 1>&2 2>&3); then -# if [ -n "$var_os" ]; then -# echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" -# fi -# else -# exit_script -# fi -# fi -# done -# fi - -# if [ "$var_os" == "debian" ]; then -# var_default_version="${var_version}" -# var_version="" -# while [ -z "$var_version" ]; do -# if [ "$var_default_version" == "11" ]; then -# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -# "11" "Bullseye" ON \ -# "12" "Bookworm" OFF \ -# 3>&1 1>&2 2>&3); then -# if [ -n "$var_version" ]; then -# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" -# fi -# else -# exit_script -# fi -# fi -# if [ "$var_default_version" == "12" ]; then -# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -# "11" "Bullseye" OFF \ -# "12" "Bookworm" ON \ -# 3>&1 1>&2 2>&3); then -# if [ -n "$var_version" ]; then -# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" -# fi -# else -# exit_script -# fi -# fi -# done -# fi - -# if [ "$var_os" == "ubuntu" ]; then -# var_default_version="${var_version}" -# var_version="" -# while [ -z "$var_version" ]; do -# if [ "$var_default_version" == "20.04" ]; then -# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ -# "20.04" "Focal" ON \ -# "22.04" "Jammy" OFF \ -# "24.04" "Noble" OFF \ -# "24.10" "Oracular" OFF \ -# 3>&1 1>&2 2>&3); then -# if [ -n "$var_version" ]; then -# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" -# fi -# else -# exit_script -# fi -# elif [ "$var_default_version" == "22.04" ]; then -# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ -# "20.04" "Focal" OFF \ -# "22.04" "Jammy" ON \ -# "24.04" "Noble" OFF \ -# "24.10" "Oracular" OFF \ -# 3>&1 1>&2 2>&3); then -# if [ -n "$var_version" ]; then -# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" -# fi -# else -# exit_script -# fi -# elif [ "$var_default_version" == "24.04" ]; then -# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ -# "20.04" "Focal" OFF \ -# "22.04" "Jammy" OFF \ -# "24.04" "Noble" ON \ -# "24.10" "Oracular" OFF \ -# 3>&1 1>&2 2>&3); then -# if [ -n "$var_version" ]; then -# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" -# fi -# else -# exit_script -# fi -# else -# if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ -# "20.04" "Focal" OFF \ -# "22.04" "Jammy" OFF \ -# "24.04" "Noble" OFF \ -# "24.10" "Oracular" ON \ -# 3>&1 1>&2 2>&3); then -# if [ -n "$var_version" ]; then -# echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" -# fi -# else -# exit_script -# fi -# fi -# done -# fi -# # Setting Default Tag for Advanced Settings -# TAGS="community-script-dev;${var_tags:-}" -# CT_DEFAULT_TYPE="${CT_TYPE}" -# CT_TYPE="" -# while [ -z "$CT_TYPE" ]; do -# if [ "$CT_DEFAULT_TYPE" == "1" ]; then -# if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ -# "1" "Unprivileged" ON \ -# "0" "Privileged" OFF \ -# 3>&1 1>&2 2>&3); then -# if [ -n "$CT_TYPE" ]; then -# CT_TYPE_DESC="Unprivileged" -# if [ "$CT_TYPE" -eq 0 ]; then -# CT_TYPE_DESC="Privileged" -# fi -# echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" -# fi -# else -# exit_script -# fi -# fi -# if [ "$CT_DEFAULT_TYPE" == "0" ]; then -# if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ -# "1" "Unprivileged" OFF \ -# "0" "Privileged" ON \ -# 3>&1 1>&2 2>&3); then -# if [ -n "$CT_TYPE" ]; then -# CT_TYPE_DESC="Unprivileged" -# if [ "$CT_TYPE" -eq 0 ]; then -# CT_TYPE_DESC="Privileged" -# fi -# echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" -# fi -# else -# exit_script -# fi -# fi -# done - -# while true; do -# if PW1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then -# if [[ ! -z "$PW1" ]]; then -# if [[ "$PW1" == *" "* ]]; then -# whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 -# elif [ ${#PW1} -lt 5 ]; then -# whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 -# else -# if PW2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then -# if [[ "$PW1" == "$PW2" ]]; then -# PW="-password $PW1" -# echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" -# break -# else -# whiptail --msgbox "Passwords do not match. Please try again." 8 58 -# fi -# else -# exit_script -# fi -# fi -# else -# PW1="Automatic Login" -# PW="" -# echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}" -# break -# fi -# else -# exit_script -# fi -# done - -# if CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then -# if [ -z "$CT_ID" ]; then -# CT_ID="$NEXTID" -# echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" -# else -# echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" -# fi -# else -# exit -# fi - -# if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then -# if [ -z "$CT_NAME" ]; then -# HN="$NSAPP" -# else -# HN=$(echo ${CT_NAME,,} | tr -d ' ') -# fi -# echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" -# else -# exit_script -# fi - -# if DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then -# if [ -z "$DISK_SIZE" ]; then -# DISK_SIZE="$var_disk" -# echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" -# else -# if ! [[ $DISK_SIZE =~ $INTEGER ]]; then -# echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" -# advanced_settings -# fi -# echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" -# fi -# else -# exit_script -# fi - -# if CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then -# if [ -z "$CORE_COUNT" ]; then -# CORE_COUNT="$var_cpu" -# echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" -# else -# echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" -# fi -# else -# exit_script -# fi - -# if RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then -# if [ -z "$RAM_SIZE" ]; then -# RAM_SIZE="$var_ram" -# echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" -# else -# echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" -# fi -# else -# exit_script -# fi - -# if BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then -# if [ -z "$BRG" ]; then -# BRG="vmbr0" -# echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" -# else -# echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" -# fi -# else -# exit_script -# fi - -# while true; do -# NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) -# exit_status=$? -# if [ $exit_status -eq 0 ]; then -# if [ "$NET" = "dhcp" ]; then -# echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" -# break -# else -# if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then -# echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" -# break -# else -# whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 -# fi -# fi -# else -# exit_script -# fi -# done - -# if [ "$NET" != "dhcp" ]; then -# while true; do -# GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) -# if [ -z "$GATE1" ]; then -# whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 -# elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then -# whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 -# else -# GATE=",gw=$GATE1" -# echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}" -# break -# fi -# done -# else -# GATE="" -# echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" -# fi - -# if [ "$var_os" == "alpine" ]; then -# APT_CACHER="" -# APT_CACHER_IP="" -# else -# if APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then -# APT_CACHER="${APT_CACHER_IP:+yes}" -# echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" -# else -# exit_script -# fi -# fi - -# if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then -# DISABLEIP6="yes" -# else -# DISABLEIP6="no" -# fi -# echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -# if MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then -# if [ -z $MTU1 ]; then -# MTU1="Default" -# MTU="" -# else -# MTU=",mtu=$MTU1" -# fi -# echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" -# else -# exit_script -# fi - -# if SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then -# if [ -z $SD ]; then -# SX=Host -# SD="" -# else -# SX=$SD -# SD="-searchdomain=$SD" -# fi -# echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}" -# else -# exit_script -# fi - -# if NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then -# if [ -z $NX ]; then -# NX=Host -# NS="" -# else -# NS="-nameserver=$NX" -# fi -# echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}" -# else -# exit_script -# fi - -# if MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then -# if [ -z $MAC1 ]; then -# MAC1="Default" -# MAC="" -# else -# MAC=",hwaddr=$MAC1" -# echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}" -# fi -# else -# exit_script -# fi - -# if VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then -# if [ -z $VLAN1 ]; then -# VLAN1="Default" -# VLAN="" -# else -# VLAN=",tag=$VLAN1" -# fi -# echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}" -# else -# exit_script -# fi - -# if ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then -# if [ -n "${ADV_TAGS}" ]; then -# ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') -# TAGS="${ADV_TAGS}" -# else -# TAGS=";" -# fi -# echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" -# else -# exit_script -# fi - -# if [[ "$PW" == -password* ]]; then -# if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then -# SSH="yes" -# else -# SSH="no" -# fi -# echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" -# else -# SSH="no" -# echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" -# fi - -# if [[ "${SSH}" == "yes" ]]; then -# SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" - -# if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then -# echo "Warning: No SSH key provided." -# fi -# else -# SSH_AUTHORIZED_KEY="" -# fi - -# if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then -# ENABLE_FUSE="yes" -# else -# ENABLE_FUSE="no" -# fi -# echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" - -# if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then -# VERB="yes" -# else -# VERB="no" -# fi -# echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" - -# if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then -# echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -# else -# clear -# header_info -# echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" -# advanced_settings -# fi -# } - -dialog_input() { - local title="$1" - local prompt="$2" - local default="$3" - local result - apt-get install -y dialog - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "$title" \ - --extra-button --extra-label "Back" \ - --ok-label "Next" --cancel-label "Exit" \ - --inputbox "$prompt" 10 58 "$default" 2>&1 >/dev/tty) - - local exitcode=$? - - case $exitcode in - 0) - REPLY_RESULT="$result" - return 0 - ;; # OK - 3) return 2 ;; # Back - *) return 1 ;; # Cancel/Exit - esac -} - advanced_settings() { - local step=1 - - while true; do - case $step in - 1) - show_intro_messages && ((step++)) - ;; - 2) - select_distribution - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 3) - select_version - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 4) - select_container_type - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 5) - set_root_password - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 6) - set_container_id - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 7) - set_hostname - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 8) - set_disk_size - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 9) - set_cpu_cores - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 10) - set_ram_size - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 11) - set_bridge - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 12) - set_ip_address - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 13) - set_gateway - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 14) - set_apt_cacher - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 15) - toggle_ipv6 - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 16) - set_mtu - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 17) - set_dns_search_domain - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 18) - set_dns_server - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 19) - set_mac_address - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 20) - set_vlan - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 21) - set_tags - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 22) - set_ssh_access - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 23) - set_fuse - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 24) - set_verbose - result=$? - [[ $result -eq 0 ]] && ((step++)) - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - 25) - confirm_creation - result=$? - [[ $result -eq 0 ]] && break - [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) - [[ $result -eq 1 ]] && return - ;; - esac - done -} - -show_intro_messages() { - dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "Instructional Tip" \ - --msgbox "To make a selection, use the Spacebar." 8 58 || return 1 - - dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "Default distribution for $APP" \ - --msgbox "Default is: ${var_os} ${var_version}\n\nIf the default Linux distribution is not adhered to, script support will be discontinued." 10 58 || return 1 - return 0 -} - -select_distribution() { - [[ "$var_os" == "alpine" ]] && return 0 - - local default result exitcode - default="${var_os:-debian}" - var_os="" - - local debian_flag ubuntu_flag - [[ "$default" == "debian" ]] && debian_flag="on" || debian_flag="off" - [[ "$default" == "ubuntu" ]] && ubuntu_flag="on" || ubuntu_flag="off" - - while [[ -z "$var_os" ]]; do - exec 3>&1 - result=$(dialog --clear \ - --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "DISTRIBUTION" \ - --radiolist "Choose Distribution:" 15 60 4 \ - "debian" "" "$debian_flag" \ - "ubuntu" "" "$ubuntu_flag" \ - --ok-label "Next" \ - --cancel-label "Exit" \ - --extra-button \ - --extra-label "Back" \ - 2>&1 1>&3) - exitcode=$? - exec 3>&- - - case "$exitcode" in - 0) - if [[ "$result" =~ ^(debian|ubuntu)$ ]]; then - var_os="$result" - printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" - return 0 - else - printf "[DEBUG] No valid selection made (result='%s'), repeating...\n" "$result" + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 + if [ "$var_os" != "alpine" ]; then + var_default_os="${var_os}" + var_os="" + while [ -z "$var_os" ]; do + if [ "$var_default_os" == "debian" ]; then + if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + "debian" "" ON \ + "ubuntu" "" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_os" ]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + fi + else + exit_script + fi fi - ;; - 3) - return 2 - ;; - 1 | 255) - return 1 - ;; - *) - printf "[DEBUG] Unexpected exit code: %s\n" "$exitcode" >&2 - return 1 - ;; - esac - done -} - -select_version() { - local default="${var_version}" - var_version="" - local list result exitcode - - if [[ "$var_os" == "debian" ]]; then - case "$default" in - 11) list=("11" "Bullseye" on "12" "Bookworm" off) ;; - 12) list=("11" "Bullseye" off "12" "Bookworm" on) ;; - *) list=("11" "Bullseye" off "12" "Bookworm" off) ;; - esac - elif [[ "$var_os" == "ubuntu" ]]; then - case "$default" in - 20.04) list=("20.04" "Focal" on "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" off) ;; - 22.04) list=("20.04" "Focal" off "22.04" "Jammy" on "24.04" "Noble" off "24.10" "Oracular" off) ;; - 24.04) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" on "24.10" "Oracular" off) ;; - 24.10) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" on) ;; - *) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" off) ;; - esac + if [ "$var_default_os" == "ubuntu" ]; then + if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + "debian" "" OFF \ + "ubuntu" "" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_os" ]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + fi + else + exit_script + fi + fi + done fi - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "VERSION" \ - --radiolist "Choose Version:" 15 58 5 \ - "${list[@]}" \ - --ok-label "Next" \ - --cancel-label "Exit" \ - --extra-button --extra-label "Back" \ - 3>&1 1>&2 2>&3) + if [ "$var_os" == "debian" ]; then + var_default_version="${var_version}" + var_version="" + while [ -z "$var_version" ]; do + if [ "$var_default_version" == "11" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ + "11" "Bullseye" ON \ + "12" "Bookworm" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + fi + if [ "$var_default_version" == "12" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ + "11" "Bullseye" OFF \ + "12" "Bookworm" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + fi + done + fi - exitcode=$? - - case $exitcode in - 0) - var_version="$result" - printf "%bVersion: %b%s%b\n" "$OSVERSION$BOLD$DGN" "$BGN" "$var_version" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} - -select_container_type() { - local default="${CT_TYPE}" + if [ "$var_os" == "ubuntu" ]; then + var_default_version="${var_version}" + var_version="" + while [ -z "$var_version" ]; do + if [ "$var_default_version" == "20.04" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" ON \ + "22.04" "Jammy" OFF \ + "24.04" "Noble" OFF \ + "24.10" "Oracular" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + elif [ "$var_default_version" == "22.04" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" ON \ + "24.04" "Noble" OFF \ + "24.10" "Oracular" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + elif [ "$var_default_version" == "24.04" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" OFF \ + "24.04" "Noble" ON \ + "24.10" "Oracular" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + else + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" OFF \ + "24.04" "Noble" OFF \ + "24.10" "Oracular" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + fi + done + fi + # Setting Default Tag for Advanced Settings + TAGS="community-script-dev;${var_tags:-}" + CT_DEFAULT_TYPE="${CT_TYPE}" CT_TYPE="" - local list result exitcode - - [[ "$default" == "1" ]] && list=("1" "Unprivileged" on "0" "Privileged" off) || list=("1" "Unprivileged" off "0" "Privileged" on) - - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "CONTAINER TYPE" \ - --radiolist "Choose Type:" 10 58 2 "${list[@]}" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - - exitcode=$? - - case $exitcode in - 0) - CT_TYPE="$result" - [[ "$CT_TYPE" == "0" ]] && desc="Privileged" || desc="Unprivileged" - printf "%bContainer Type: %b%s%b\n" "$CONTAINERTYPE$BOLD$DGN" "$BGN" "$desc" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} -set_root_password() { - local pw1 pw2 exitcode + while [ -z "$CT_TYPE" ]; do + if [ "$CT_DEFAULT_TYPE" == "1" ]; then + if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$CT_TYPE" ]; then + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + fi + else + exit_script + fi + fi + if [ "$CT_DEFAULT_TYPE" == "0" ]; then + if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$CT_TYPE" ]; then + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + fi + else + exit_script + fi + fi + done while true; do - pw1=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "PASSWORD (leave blank for automatic login)" \ - --insecure --passwordbox "\nSet Root Password (needed for root ssh access)" 10 58 \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - if [[ -z "$pw1" ]]; then + if PW1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [[ ! -z "$PW1" ]]; then + if [[ "$PW1" == *" "* ]]; then + whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 + elif [ ${#PW1} -lt 5 ]; then + whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 + else + if PW2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then + if [[ "$PW1" == "$PW2" ]]; then + PW="-password $PW1" + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" + break + else + whiptail --msgbox "Passwords do not match. Please try again." 8 58 + fi + else + exit_script + fi + fi + else PW1="Automatic Login" PW="" - printf "%bRoot Password: %b%s%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$PW1" "$CL" - return 0 + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}" + break fi - if [[ "$pw1" == *" "* ]]; then - dialog --msgbox "Password cannot contain spaces. Please try again." 8 58 - continue - fi - if [[ ${#pw1} -lt 5 ]]; then - dialog --msgbox "Password must be at least 5 characters long. Please try again." 8 58 - continue - fi - pw2=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "PASSWORD VERIFICATION" \ - --insecure --passwordbox "\nVerify Root Password" 10 58 \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - case $exitcode in - 0) - if [[ "$pw1" == "$pw2" ]]; then - PW="-password $pw1" - printf "%bRoot Password: %b********%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$CL" - return 0 - else - dialog --msgbox "Passwords do not match. Please try again." 8 58 - continue - fi - ;; - 3) return 2 ;; - *) return 1 ;; - esac - ;; - 3) return 2 ;; - *) return 1 ;; - esac + else + exit_script + fi done -} -set_container_id() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "CONTAINER ID" \ - --inputbox "Set Container ID" 8 58 "$NEXTID" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? + if CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi + else + exit + fi - case $exitcode in - 0) - CT_ID="${result:-$NEXTID}" - printf "%bContainer ID: %b%s%b\n" "$CONTAINERID$BOLD$DGN" "$BGN" "$CT_ID" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} - -set_hostname() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "HOSTNAME" \ - --inputbox "Set Hostname" 8 58 "$NSAPP" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - if [[ -z "$result" ]]; then + if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then HN="$NSAPP" else - HN=$(tr -d ' ' <<<"${result,,}") + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - printf "%bHostname: %b%s%b\n" "$HOSTNAME$BOLD$DGN" "$BGN" "$HN" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} + echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" + else + exit_script + fi -set_disk_size() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "DISK SIZE" \ - --inputbox "Set Disk Size in GB" 8 58 "$var_disk" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - if [[ -z "$result" ]]; then + if DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then DISK_SIZE="$var_disk" - elif [[ "$result" =~ ^[0-9]+$ ]]; then - DISK_SIZE="$result" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" else - dialog --msgbox "Disk size must be an integer!" 8 58 - return 2 - fi - printf "%bDisk Size: %b%s GB%b\n" "$DISKSIZE$BOLD$DGN" "$BGN" "$DISK_SIZE" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} - -set_cpu_cores() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "CORE COUNT" \ - --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - CORE_COUNT="${result:-$var_cpu}" - printf "%bCPU Cores: %b%s%b\n" "$CPUCORE$BOLD$DGN" "$BGN" "$CORE_COUNT" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} - -set_ram_size() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "RAM" \ - --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - RAM_SIZE="${result:-$var_ram}" - printf "%bRAM Size: %b%s MiB%b\n" "$RAMSIZE$BOLD$DGN" "$BGN" "$RAM_SIZE" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} - -set_bridge() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "BRIDGE" \ - --inputbox "Set a Bridge" 8 58 "vmbr0" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - BRG="${result:-vmbr0}" - printf "%bBridge: %b%s%b\n" "$BRIDGE$BOLD$DGN" "$BGN" "$BRG" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} - -set_ip_address() { - local result exitcode - while true; do - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "IP ADDRESS" \ - --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 "dhcp" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - if [[ "$result" == "dhcp" ]]; then - NET="dhcp" - printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" - return 0 - elif [[ "$result" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then - NET="$result" - printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" - return 0 - else - dialog --msgbox "$result is an invalid IPv4 CIDR address. Please enter a valid address or 'dhcp'." 8 58 - continue + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings fi - ;; - 3) return 2 ;; - *) return 1 ;; - esac - done -} + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + fi + else + exit_script + fi -set_gateway() { - local result exitcode - if [[ "$NET" == "dhcp" ]]; then - GATE="" - printf "%bGateway IP Address: %bDefault%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$CL" - return 0 + if CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit_script + fi + + if RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + else + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + fi + else + exit_script + fi + + if BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + else + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + fi + else + exit_script fi while true; do - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "Gateway IP" \ - --inputbox "Enter gateway IP address" 8 58 \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - if [[ -z "$result" ]]; then - dialog --msgbox "Gateway IP address cannot be empty" 8 58 - continue - elif [[ "$result" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then - GATE=",gw=$result" - printf "%bGateway IP Address: %b%s%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$result" "$CL" - return 0 + NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) + exit_status=$? + if [ $exit_status -eq 0 ]; then + if [ "$NET" = "dhcp" ]; then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + break else - dialog --msgbox "Invalid IP address format" 8 58 + if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + break + else + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 + fi fi - ;; - 3) return 2 ;; - *) return 1 ;; - esac + else + exit_script + fi done -} -set_apt_cacher() { - local result exitcode - if [[ "$var_os" == "alpine" ]]; then + if [ "$NET" != "dhcp" ]; then + while true; do + GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) + if [ -z "$GATE1" ]; then + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 + elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 + else + GATE=",gw=$GATE1" + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}" + break + fi + done + else + GATE="" + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" + fi + + if [ "$var_os" == "alpine" ]; then APT_CACHER="" APT_CACHER_IP="" - return 0 + else + if APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then + APT_CACHER="${APT_CACHER_IP:+yes}" + echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" + else + exit_script + fi fi - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "APT-Cacher IP" \ - --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" + else + DISABLEIP6="no" + fi + echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - case $exitcode in - 0) - APT_CACHER_IP="$result" - APT_CACHER="${APT_CACHER_IP:+yes}" - printf "%bAPT-Cacher IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "${APT_CACHER_IP:-Default}" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} - -toggle_ipv6() { - dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "IPv6" \ - --yesno "Disable IPv6?" 10 58 \ - --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" - case $? in - 0) DISABLEIP6="yes" ;; - 1) DISABLEIP6="no" ;; - 3) return 2 ;; - *) return 1 ;; - esac - printf "%bDisable IPv6: %b%s%b\n" "$DISABLEIPV6$BOLD$DGN" "$BGN" "$DISABLEIP6" "$CL" - return 0 -} -set_mtu() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "MTU SIZE" \ - --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - if [[ -z "$result" ]]; then + if MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then MTU1="Default" MTU="" else - MTU1="$result" MTU=",mtu=$MTU1" fi - printf "%bInterface MTU Size: %b%s%b\n" "$DEFAULT$BOLD$DGN" "$BGN" "$MTU1" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" + else + exit_script + fi -set_dns_search_domain() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "DNS Search Domain" \ - --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - if [[ -z "$result" ]]; then - SX="Host" + if SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host SD="" else - SX="$result" - SD="-searchdomain=$result" + SX=$SD + SD="-searchdomain=$SD" fi - printf "%bDNS Search Domain: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$SX" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} + echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}" + else + exit_script + fi -set_dns_server() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "DNS SERVER IP" \ - --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - if [[ -z "$result" ]]; then - NX="Host" + if NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host NS="" else - NX="$result" - NS="-nameserver=$result" + NS="-nameserver=$NX" fi - printf "%bDNS Server IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NX" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} + echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}" + else + exit_script + fi -set_mac_address() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "MAC ADDRESS" \ - --inputbox "Set a MAC Address (leave blank for generated MAC)" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - if [[ -z "$result" ]]; then + if MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then MAC1="Default" MAC="" else - MAC1="$result" MAC=",hwaddr=$MAC1" + echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}" fi - printf "%bMAC Address: %b%s%b\n" "$MACADDRESS$BOLD$DGN" "$BGN" "$MAC1" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} + else + exit_script + fi -set_vlan() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "VLAN" \ - --inputbox "Set a VLAN (leave blank for no VLAN)" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - if [[ -z "$result" ]]; then + if VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="" else - VLAN1="$result" VLAN=",tag=$VLAN1" fi - printf "%bVlan: %b%s%b\n" "$VLANTAG$BOLD$DGN" "$BGN" "$VLAN1" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} + echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}" + else + exit_script + fi -set_tags() { - local result exitcode - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "Advanced Tags" \ - --inputbox "Set Custom Tags? [If you remove all, there will be no tags!]" 8 58 "$TAGS" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - - case $exitcode in - 0) - if [[ -n "$result" ]]; then - ADV_TAGS=$(tr -d '[:space:]' <<<"$result") - TAGS="$ADV_TAGS" + if ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then + if [ -n "${ADV_TAGS}" ]; then + ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') + TAGS="${ADV_TAGS}" else TAGS=";" fi - printf "%bTags: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$TAGS" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} - -set_ssh_access() { - local result exitcode + echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" + else + exit_script + fi if [[ "$PW" == -password* ]]; then - dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "SSH ACCESS" \ - --yesno "Enable Root SSH Access?" 10 58 \ - --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" - exitcode=$? - case $exitcode in - 0) SSH="yes" ;; - 1) SSH="no" ;; - 3) return 2 ;; - *) return 1 ;; - esac + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" + else + SSH="no" + fi + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" else SSH="no" + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" fi - printf "%bRoot SSH Access: %b%s%b\n" "$ROOTSSH$BOLD$DGN" "$BGN" "$SSH" "$CL" + if [[ "${SSH}" == "yes" ]]; then + SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" - if [[ "$SSH" == "yes" ]]; then - result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "SSH Key" \ - --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 "" \ - --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - exitcode=$? - case $exitcode in - 0) - SSH_AUTHORIZED_KEY="$result" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac + if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then + echo "Warning: No SSH key provided." + fi else SSH_AUTHORIZED_KEY="" - return 0 + fi + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then + ENABLE_FUSE="yes" + else + ENABLE_FUSE="no" + fi + echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" + else + VERB="no" + fi + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" + advanced_settings fi } -set_fuse() { - dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "FUSE Support" \ - --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58 \ - --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" - case $? in - 0) ENABLE_FUSE="yes" ;; - 1) ENABLE_FUSE="no" ;; - 3) return 2 ;; - *) return 1 ;; - esac - printf "%bFUSE (Filesystem in Userspace) Support: %b%s%b\n" "$FUSE$BOLD$DGN" "$BGN" "$ENABLE_FUSE" "$CL" - return 0 -} +# dialog_input() { +# local title="$1" +# local prompt="$2" +# local default="$3" +# local result +# apt-get install -y dialog +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "$title" \ +# --extra-button --extra-label "Back" \ +# --ok-label "Next" --cancel-label "Exit" \ +# --inputbox "$prompt" 10 58 "$default" 2>&1 >/dev/tty) -set_verbose() { - dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "VERBOSE MODE" \ - --yesno "Enable Verbose Mode?" 10 58 \ - --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" - case $? in - 0) VERB="yes" ;; - 1) VERB="no" ;; - 3) return 2 ;; - *) return 1 ;; - esac - printf "%bVerbose Mode: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$VERB" "$CL" - return 0 -} +# local exitcode=$? -confirm_creation() { - dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "ADVANCED SETTINGS COMPLETE" \ - --yesno "Ready to create ${APP} LXC?" 10 58 \ - --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" - case $? in - 0) - printf "%bCreating a %s LXC using the above advanced settings%b\n" "$CREATING$BOLD$RD" "$APP" "$CL" - return 0 - ;; - 3) return 2 ;; - *) return 1 ;; - esac -} +# case $exitcode in +# 0) +# REPLY_RESULT="$result" +# return 0 +# ;; # OK +# 3) return 2 ;; # Back +# *) return 1 ;; # Cancel/Exit +# esac +# } + +# advanced_settings() { +# local step=1 + +# while true; do +# case $step in +# 1) +# show_intro_messages && ((step++)) +# ;; +# 2) +# select_distribution +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 3) +# select_version +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 4) +# select_container_type +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 5) +# set_root_password +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 6) +# set_container_id +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 7) +# set_hostname +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 8) +# set_disk_size +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 9) +# set_cpu_cores +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 10) +# set_ram_size +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 11) +# set_bridge +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 12) +# set_ip_address +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 13) +# set_gateway +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 14) +# set_apt_cacher +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 15) +# toggle_ipv6 +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 16) +# set_mtu +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 17) +# set_dns_search_domain +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 18) +# set_dns_server +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 19) +# set_mac_address +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 20) +# set_vlan +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 21) +# set_tags +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 22) +# set_ssh_access +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 23) +# set_fuse +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 24) +# set_verbose +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 25) +# confirm_creation +# result=$? +# [[ $result -eq 0 ]] && break +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# esac +# done +# } + +# show_intro_messages() { +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "Instructional Tip" \ +# --msgbox "To make a selection, use the Spacebar." 8 58 || return 1 + +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "Default distribution for $APP" \ +# --msgbox "Default is: ${var_os} ${var_version}\n\nIf the default Linux distribution is not adhered to, script support will be discontinued." 10 58 || return 1 +# return 0 +# } + +# select_distribution() { +# [[ "$var_os" == "alpine" ]] && return 0 + +# local default result exitcode +# default="${var_os:-debian}" +# var_os="" + +# local debian_flag ubuntu_flag +# [[ "$default" == "debian" ]] && debian_flag="on" || debian_flag="off" +# [[ "$default" == "ubuntu" ]] && ubuntu_flag="on" || ubuntu_flag="off" + +# while [[ -z "$var_os" ]]; do +# exec 3>&1 +# result=$(dialog --clear \ +# --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "DISTRIBUTION" \ +# --radiolist "Choose Distribution:" 15 60 4 \ +# "debian" "" "$debian_flag" \ +# "ubuntu" "" "$ubuntu_flag" \ +# --ok-label "Next" \ +# --cancel-label "Exit" \ +# --extra-button \ +# --extra-label "Back" \ +# 2>&1 1>&3) +# exitcode=$? +# exec 3>&- + +# case "$exitcode" in +# 0) +# if [[ "$result" =~ ^(debian|ubuntu)$ ]]; then +# var_os="$result" +# printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" +# return 0 +# else +# printf "[DEBUG] No valid selection made (result='%s'), repeating...\n" "$result" +# fi +# ;; +# 3) +# return 2 +# ;; +# 1 | 255) +# return 1 +# ;; +# *) +# printf "[DEBUG] Unexpected exit code: %s\n" "$exitcode" >&2 +# return 1 +# ;; +# esac +# done +# } + +# select_version() { +# local default="${var_version}" +# var_version="" +# local list result exitcode + +# if [[ "$var_os" == "debian" ]]; then +# case "$default" in +# 11) list=("11" "Bullseye" on "12" "Bookworm" off) ;; +# 12) list=("11" "Bullseye" off "12" "Bookworm" on) ;; +# *) list=("11" "Bullseye" off "12" "Bookworm" off) ;; +# esac +# elif [[ "$var_os" == "ubuntu" ]]; then +# case "$default" in +# 20.04) list=("20.04" "Focal" on "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" off) ;; +# 22.04) list=("20.04" "Focal" off "22.04" "Jammy" on "24.04" "Noble" off "24.10" "Oracular" off) ;; +# 24.04) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" on "24.10" "Oracular" off) ;; +# 24.10) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" on) ;; +# *) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" off) ;; +# esac +# fi + +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "VERSION" \ +# --radiolist "Choose Version:" 15 58 5 \ +# "${list[@]}" \ +# --ok-label "Next" \ +# --cancel-label "Exit" \ +# --extra-button --extra-label "Back" \ +# 3>&1 1>&2 2>&3) + +# exitcode=$? + +# case $exitcode in +# 0) +# var_version="$result" +# printf "%bVersion: %b%s%b\n" "$OSVERSION$BOLD$DGN" "$BGN" "$var_version" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# select_container_type() { +# local default="${CT_TYPE}" +# CT_TYPE="" +# local list result exitcode + +# [[ "$default" == "1" ]] && list=("1" "Unprivileged" on "0" "Privileged" off) || list=("1" "Unprivileged" off "0" "Privileged" on) + +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "CONTAINER TYPE" \ +# --radiolist "Choose Type:" 10 58 2 "${list[@]}" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) + +# exitcode=$? + +# case $exitcode in +# 0) +# CT_TYPE="$result" +# [[ "$CT_TYPE" == "0" ]] && desc="Privileged" || desc="Unprivileged" +# printf "%bContainer Type: %b%s%b\n" "$CONTAINERTYPE$BOLD$DGN" "$BGN" "$desc" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } +# set_root_password() { +# local pw1 pw2 exitcode + +# while true; do +# pw1=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "PASSWORD (leave blank for automatic login)" \ +# --insecure --passwordbox "\nSet Root Password (needed for root ssh access)" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$pw1" ]]; then +# PW1="Automatic Login" +# PW="" +# printf "%bRoot Password: %b%s%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$PW1" "$CL" +# return 0 +# fi +# if [[ "$pw1" == *" "* ]]; then +# dialog --msgbox "Password cannot contain spaces. Please try again." 8 58 +# continue +# fi +# if [[ ${#pw1} -lt 5 ]]; then +# dialog --msgbox "Password must be at least 5 characters long. Please try again." 8 58 +# continue +# fi +# pw2=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "PASSWORD VERIFICATION" \ +# --insecure --passwordbox "\nVerify Root Password" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? +# case $exitcode in +# 0) +# if [[ "$pw1" == "$pw2" ]]; then +# PW="-password $pw1" +# printf "%bRoot Password: %b********%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$CL" +# return 0 +# else +# dialog --msgbox "Passwords do not match. Please try again." 8 58 +# continue +# fi +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# done +# } + +# set_container_id() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "CONTAINER ID" \ +# --inputbox "Set Container ID" 8 58 "$NEXTID" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# CT_ID="${result:-$NEXTID}" +# printf "%bContainer ID: %b%s%b\n" "$CONTAINERID$BOLD$DGN" "$BGN" "$CT_ID" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_hostname() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "HOSTNAME" \ +# --inputbox "Set Hostname" 8 58 "$NSAPP" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# HN="$NSAPP" +# else +# HN=$(tr -d ' ' <<<"${result,,}") +# fi +# printf "%bHostname: %b%s%b\n" "$HOSTNAME$BOLD$DGN" "$BGN" "$HN" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_disk_size() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "DISK SIZE" \ +# --inputbox "Set Disk Size in GB" 8 58 "$var_disk" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# DISK_SIZE="$var_disk" +# elif [[ "$result" =~ ^[0-9]+$ ]]; then +# DISK_SIZE="$result" +# else +# dialog --msgbox "Disk size must be an integer!" 8 58 +# return 2 +# fi +# printf "%bDisk Size: %b%s GB%b\n" "$DISKSIZE$BOLD$DGN" "$BGN" "$DISK_SIZE" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_cpu_cores() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "CORE COUNT" \ +# --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# CORE_COUNT="${result:-$var_cpu}" +# printf "%bCPU Cores: %b%s%b\n" "$CPUCORE$BOLD$DGN" "$BGN" "$CORE_COUNT" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_ram_size() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "RAM" \ +# --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# RAM_SIZE="${result:-$var_ram}" +# printf "%bRAM Size: %b%s MiB%b\n" "$RAMSIZE$BOLD$DGN" "$BGN" "$RAM_SIZE" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_bridge() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "BRIDGE" \ +# --inputbox "Set a Bridge" 8 58 "vmbr0" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# BRG="${result:-vmbr0}" +# printf "%bBridge: %b%s%b\n" "$BRIDGE$BOLD$DGN" "$BGN" "$BRG" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_ip_address() { +# local result exitcode +# while true; do +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "IP ADDRESS" \ +# --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 "dhcp" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ "$result" == "dhcp" ]]; then +# NET="dhcp" +# printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" +# return 0 +# elif [[ "$result" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then +# NET="$result" +# printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" +# return 0 +# else +# dialog --msgbox "$result is an invalid IPv4 CIDR address. Please enter a valid address or 'dhcp'." 8 58 +# continue +# fi +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# done +# } + +# set_gateway() { +# local result exitcode +# if [[ "$NET" == "dhcp" ]]; then +# GATE="" +# printf "%bGateway IP Address: %bDefault%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$CL" +# return 0 +# fi + +# while true; do +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "Gateway IP" \ +# --inputbox "Enter gateway IP address" 8 58 \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# dialog --msgbox "Gateway IP address cannot be empty" 8 58 +# continue +# elif [[ "$result" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then +# GATE=",gw=$result" +# printf "%bGateway IP Address: %b%s%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$result" "$CL" +# return 0 +# else +# dialog --msgbox "Invalid IP address format" 8 58 +# fi +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# done +# } + +# set_apt_cacher() { +# local result exitcode +# if [[ "$var_os" == "alpine" ]]; then +# APT_CACHER="" +# APT_CACHER_IP="" +# return 0 +# fi + +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "APT-Cacher IP" \ +# --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# APT_CACHER_IP="$result" +# APT_CACHER="${APT_CACHER_IP:+yes}" +# printf "%bAPT-Cacher IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "${APT_CACHER_IP:-Default}" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# toggle_ipv6() { +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "IPv6" \ +# --yesno "Disable IPv6?" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" +# case $? in +# 0) DISABLEIP6="yes" ;; +# 1) DISABLEIP6="no" ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# printf "%bDisable IPv6: %b%s%b\n" "$DISABLEIPV6$BOLD$DGN" "$BGN" "$DISABLEIP6" "$CL" +# return 0 +# } +# set_mtu() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "MTU SIZE" \ +# --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# MTU1="Default" +# MTU="" +# else +# MTU1="$result" +# MTU=",mtu=$MTU1" +# fi +# printf "%bInterface MTU Size: %b%s%b\n" "$DEFAULT$BOLD$DGN" "$BGN" "$MTU1" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_dns_search_domain() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "DNS Search Domain" \ +# --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# SX="Host" +# SD="" +# else +# SX="$result" +# SD="-searchdomain=$result" +# fi +# printf "%bDNS Search Domain: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$SX" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_dns_server() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "DNS SERVER IP" \ +# --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# NX="Host" +# NS="" +# else +# NX="$result" +# NS="-nameserver=$result" +# fi +# printf "%bDNS Server IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NX" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_mac_address() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "MAC ADDRESS" \ +# --inputbox "Set a MAC Address (leave blank for generated MAC)" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# MAC1="Default" +# MAC="" +# else +# MAC1="$result" +# MAC=",hwaddr=$MAC1" +# fi +# printf "%bMAC Address: %b%s%b\n" "$MACADDRESS$BOLD$DGN" "$BGN" "$MAC1" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_vlan() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "VLAN" \ +# --inputbox "Set a VLAN (leave blank for no VLAN)" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# VLAN1="Default" +# VLAN="" +# else +# VLAN1="$result" +# VLAN=",tag=$VLAN1" +# fi +# printf "%bVlan: %b%s%b\n" "$VLANTAG$BOLD$DGN" "$BGN" "$VLAN1" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_tags() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "Advanced Tags" \ +# --inputbox "Set Custom Tags? [If you remove all, there will be no tags!]" 8 58 "$TAGS" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -n "$result" ]]; then +# ADV_TAGS=$(tr -d '[:space:]' <<<"$result") +# TAGS="$ADV_TAGS" +# else +# TAGS=";" +# fi +# printf "%bTags: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$TAGS" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_ssh_access() { +# local result exitcode + +# if [[ "$PW" == -password* ]]; then +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "SSH ACCESS" \ +# --yesno "Enable Root SSH Access?" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" +# exitcode=$? +# case $exitcode in +# 0) SSH="yes" ;; +# 1) SSH="no" ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# else +# SSH="no" +# fi + +# printf "%bRoot SSH Access: %b%s%b\n" "$ROOTSSH$BOLD$DGN" "$BGN" "$SSH" "$CL" + +# if [[ "$SSH" == "yes" ]]; then +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "SSH Key" \ +# --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? +# case $exitcode in +# 0) +# SSH_AUTHORIZED_KEY="$result" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# else +# SSH_AUTHORIZED_KEY="" +# return 0 +# fi +# } + +# set_fuse() { +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "FUSE Support" \ +# --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" +# case $? in +# 0) ENABLE_FUSE="yes" ;; +# 1) ENABLE_FUSE="no" ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# printf "%bFUSE (Filesystem in Userspace) Support: %b%s%b\n" "$FUSE$BOLD$DGN" "$BGN" "$ENABLE_FUSE" "$CL" +# return 0 +# } + +# set_verbose() { +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "VERBOSE MODE" \ +# --yesno "Enable Verbose Mode?" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" +# case $? in +# 0) VERB="yes" ;; +# 1) VERB="no" ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# printf "%bVerbose Mode: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$VERB" "$CL" +# return 0 +# } + +# confirm_creation() { +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "ADVANCED SETTINGS COMPLETE" \ +# --yesno "Ready to create ${APP} LXC?" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" +# case $? in +# 0) +# printf "%bCreating a %s LXC using the above advanced settings%b\n" "$CREATING$BOLD$RD" "$APP" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } diagnostics_check() { if ! [ -d "/usr/local/community-scripts" ]; then From cd152ebaf34cffa7fddd3f08652f806f284236f6 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Mon, 31 Mar 2025 07:55:57 -0400 Subject: [PATCH 0219/1614] Add Immich install script This currently only supports CPU machine-learning; CUDA and OpenVINO will come later. --- ct/headers/immich | 6 + ct/immich.sh | 41 +++ frontend/public/json/immich.json | 43 ++++ install/immich-install.sh | 411 +++++++++++++++++++++++++++++++ 4 files changed, 501 insertions(+) create mode 100644 ct/headers/immich create mode 100644 ct/immich.sh create mode 100644 frontend/public/json/immich.json create mode 100644 install/immich-install.sh diff --git a/ct/headers/immich b/ct/headers/immich new file mode 100644 index 0000000..ab13925 --- /dev/null +++ b/ct/headers/immich @@ -0,0 +1,6 @@ + ____ _ __ + / _/___ ___ ____ ___ (_)____/ /_ + / // __ `__ \/ __ `__ \/ / ___/ __ \ + _/ // / / / / / / / / / / / /__/ / / / +/___/_/ /_/ /_/_/ /_/ /_/_/\___/_/ /_/ + diff --git a/ct/immich.sh b/ct/immich.sh new file mode 100644 index 0000000..56c7ffb --- /dev/null +++ b/ct/immich.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://immich.app + +APP="immich" +var_tags="${var_tags:-photos}" +var_disk="${var_disk:-12}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +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 [[ ! -d /opt/immich ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_error "Currently we don't provide an update function for ${APP}." + 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}:2283${CL}" diff --git a/frontend/public/json/immich.json b/frontend/public/json/immich.json new file mode 100644 index 0000000..ca884a3 --- /dev/null +++ b/frontend/public/json/immich.json @@ -0,0 +1,43 @@ +{ + "name": "Immich", + "slug": "immich", + "categories": [ + 13 + ], + "date_created": "2025-03-30", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 2283, + "documentation": "https://immich.app/docs/overview/introduction", + "website": "https://immich.app", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/immich.png", + "description": "High performance self-hosted photo and video management solution.", + "install_methods": [ + { + "type": "default", + "script": "ct/immich.sh", + "resources": { + "cpu": 4, + "ram": 4096, + "hdd": 12, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Change the machine-learning URL to `http://localhost:3003` after installation", + "type": "info" + }, + { + "text": "GPU acceleration is not enabled for this installation", + "type": "info" + } + ] +} diff --git a/install/immich-install.sh b/install/immich-install.sh new file mode 100644 index 0000000..47571b7 --- /dev/null +++ b/install/immich-install.sh @@ -0,0 +1,411 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://immich.app + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Configuring apt and installing base dependencies" +echo "deb http://deb.debian.org/debian testing main contrib" >/etc/apt/sources.list.d/immich.list +{ + echo "Package: *" + echo "Pin: release a=testing" + echo "Pin-Priority: -10" + +} >/etc/apt/preferences.d/immich +$STD apt-get update +$STD apt-get install --no-install-recommends -y \ + git \ + redis \ + python3-venv \ + python3-dev \ + gnupg \ + autoconf \ + build-essential \ + cmake \ + jq \ + libbrotli-dev \ + libde265-dev \ + libexif-dev \ + libexpat1-dev \ + libglib2.0-dev \ + libgsf-1-dev \ + libjpeg62-turbo-dev \ + liblcms2-2 \ + librsvg2-dev \ + libspng-dev \ + meson \ + ninja-build \ + pkg-config \ + cpanminus \ + libde265-0 \ + libexif12 \ + libexpat1 \ + libgcc-s1 \ + libglib2.0-0 \ + libgomp1 \ + libgsf-1-114 \ + liblcms2-2 \ + liblqr-1-0 \ + libltdl7 \ + libmimalloc2.0 \ + libopenexr-3-1-30 \ + libopenjp2-7 \ + librsvg2-2 \ + libspng0 \ + mesa-utils \ + mesa-va-drivers \ + mesa-vulkan-drivers \ + tini \ + zlib1g \ + ocl-icd-libopencl1 \ + intel-media-va-driver +$STD apt-get install -y \ + libgdk-pixbuf-2.0-dev librsvg2-dev libtool +curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg +DPKG_ARCHITECTURE="$(dpkg --print-architecture)" +export DPKG_ARCHITECTURE +cat </etc/apt/sources.list.d/jellyfin.sources +Types: deb +URIs: https://repo.jellyfin.org/debian +Suites: bookworm +Components: main +Architectures: ${DPKG_ARCHITECTURE} +Signed-By: /etc/apt/keyrings/jellyfin.gpg +EOF +$STD apt-get update +$STD apt-get install -y jellyfin-ffmpeg7 +ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg +ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe +tmp_dir=$(mktemp -d) +cd $tmp_dir +curl -fsSL https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17193.4/intel-igc-core_1.0.17193.4_amd64.deb -O +curl -fsSL https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17193.4/intel-igc-opencl_1.0.17193.4_amd64.deb -O +curl -fsSL https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/intel-opencl-icd_24.26.30049.6_amd64.deb -O +curl -fsSL https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/libigdgmm12_22.3.20_amd64.deb -O +$STD dpkg -i ./*.deb +msg_ok "Base Dependencies Installed" + +msg_info "Setting up Postgresql Database" +$STD apt-get install -y postgresql-common +echo "YES" | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh &>/dev/null +$STD apt-get install -y postgresql-17 postgresql-17-pgvector +DB_NAME="immich" +DB_USER="immich" +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c18) +$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH ENCRYPTED PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;" +$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" +{ + echo "${APPLICATION} DB Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" +} >>~/${APPLICATION}.creds +msg_ok "Set up Postgresql Database" + +msg_info "Installing NodeJS" +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed NodeJS" + +msg_info "Installing Packages from Testing Repo" +export APT_LISTCHANGES_FRONTEND=none +export DEBIAN_FRONTEND=noninteractive +$STD apt-get install -t testing --no-install-recommends -y \ + libio-compress-brotli-perl \ + libwebp7 \ + libwebpdemux2 \ + libwebpmux3 \ + libhwy1t64 \ + libdav1d-dev \ + libhwy-dev \ + libwebp-dev +msg_ok "Packages from Testing Repo Installed" + +# Fix default DB collation issue +$STD sudo -u postgres psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;" +$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME REFRESH COLLATION VERSION;" + +msg_info "Compiling Custom Photo-processing Library (extreme patience)" +STAGING_DIR=/opt/staging +BASE_REPO="https://github.com/immich-app/base-images" +BASE_DIR=${STAGING_DIR}/base-images +SOURCE_DIR=${STAGING_DIR}/image-source +$STD git clone -b main ${BASE_REPO} ${BASE_DIR} # TODO: convert this git clone into a TAG download +mkdir -p ${SOURCE_DIR} + +cd ${STAGING_DIR} +SOURCE=${SOURCE_DIR}/libjxl +JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62" +JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0" +: "${LIBJXL_REVISION:=$(jq -cr '.sources[] | select(.name == "libjxl").revision' $BASE_DIR/server/bin/build-lock.json)}" +$STD git clone https://github.com/libjxl/libjxl.git ${SOURCE} +cd ${SOURCE} +$STD git reset --hard "${LIBJXL_REVISION}" +$STD git submodule update --init --recursive --depth 1 --recommend-shallow +$STD git apply ${BASE_DIR}/server/bin/patches/jpegli-empty-dht-marker.patch +$STD git apply ${BASE_DIR}/server/bin/patches/jpegli-icc-warning.patch +mkdir build +cd build +$STD cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=OFF \ + -DJPEGXL_ENABLE_DOXYGEN=OFF \ + -DJPEGXL_ENABLE_MANPAGES=OFF \ + -DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF \ + -DJPEGXL_ENABLE_BENCHMARK=OFF \ + -DJPEGXL_ENABLE_EXAMPLES=OFF \ + -DJPEGXL_FORCE_SYSTEM_BROTLI=ON \ + -DJPEGXL_FORCE_SYSTEM_HWY=ON \ + -DJPEGXL_ENABLE_JPEGLI=ON \ + -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=ON \ + -DJPEGXL_INSTALL_JPEGLI_LIBJPEG=ON \ + -DJPEGXL_ENABLE_PLUGINS=ON \ + -DJPEGLI_LIBJPEG_LIBRARY_SOVERSION="${JPEGLI_LIBJPEG_LIBRARY_SOVERSION}" \ + -DJPEGLI_LIBJPEG_LIBRARY_VERSION="${JPEGLI_LIBJPEG_LIBRARY_VERSION}" \ + -DLIBJPEG_TURBO_VERSION_NUMBER=2001005 \ + .. +$STD cmake --build . -- -j"$(nproc)" +$STD cmake --install . +$STD ldconfig /usr/local/lib +$STD make clean +cd ${STAGING_DIR} +rm -rf ${SOURCE}/{build,third_party} + +SOURCE=${SOURCE_DIR}/libheif +: "${LIBHEIF_REVISION:=$(jq -cr '.sources[] | select(.name == "libheif").revision' $BASE_DIR/server/bin/build-lock.json)}" +$STD git clone https://github.com/strukturag/libheif.git ${SOURCE} +cd ${SOURCE} +$STD git reset --hard "${LIBHEIF_REVISION}" +mkdir build +cd build +$STD cmake --preset=release-noplugins \ + -DWITH_DAV1D=ON \ + -DENABLE_PARALLEL_TILE_DECODING=ON \ + -DWITH_LIBSHARPYUV=ON \ + -DWITH_LIBDE265=ON \ + -DWITH_AOM_DECODER=OFF \ + -DWITH_AOM_ENCODER=OFF \ + -DWITH_X265=OFF \ + -DWITH_EXAMPLES=OFF \ + .. +$STD make install +ldconfig /usr/local/lib +$STD make clean +cd ${STAGING_DIR} +rm -rf ${SOURCE}/build + +SOURCE=${SOURCE_DIR}/libraw +: "${LIBRAW_REVISION:=$(jq -cr '.sources[] | select(.name == "libraw").revision' $BASE_DIR/server/bin/build-lock.json)}" +$STD git clone https://github.com/libraw/libraw.git ${SOURCE} +cd ${SOURCE} +$STD git reset --hard "${LIBRAW_REVISION}" +$STD autoreconf --install +$STD ./configure +$STD make -j"$(nproc)" +$STD make install +ldconfig /usr/local/lib +$STD make clean +cd ${STAGING_DIR} + +SOURCE=$SOURCE_DIR/imagemagick +: "${IMAGEMAGICK_REVISION:=$(jq -cr '.sources[] | select(.name == "imagemagick").revision' $BASE_DIR/server/bin/build-lock.json)}" +$STD git clone https://github.com/ImageMagick/ImageMagick.git $SOURCE +cd $SOURCE +$STD git reset --hard "${IMAGEMAGICK_REVISION}" +$STD ./configure --with-modules +$STD make -j"$(nproc)" +$STD make install +ldconfig /usr/local/lib +$STD make clean +cd ${STAGING_DIR} + +SOURCE=$SOURCE_DIR/libvips +: "${LIBVIPS_REVISION:=$(jq -cr '.sources[] | select(.name == "libvips").revision' $BASE_DIR/server/bin/build-lock.json)}" +$STD git clone https://github.com/libvips/libvips.git ${SOURCE} +cd ${SOURCE} +$STD git reset --hard "${LIBVIPS_REVISION}" +$STD meson setup build --buildtype=release --libdir=lib -Dintrospection=disabled -Dtiff=disabled +cd build +$STD ninja install +$STD ldconfig /usr/local/lib +cd ${STAGING_DIR} +rm -rf ${SOURCE}/build +msg_ok "Custom Photo-processing Library Compiled" + +msg_info "Installing ${APPLICATION} (more patience please)" +tmp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/immich-app/immich/releases?per_page=1 | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +curl -fsSL "https://github.com/immich-app/immich/archive/refs/tags/v${RELEASE}.zip" -o $tmp_file +unzip -q $tmp_file +INSTALL_DIR="/opt/${APPLICATION}" +UPLOAD_DIR="${INSTALL_DIR}/upload" +SRC_DIR="${INSTALL_DIR}/source" +APP_DIR="${INSTALL_DIR}/app" +ML_DIR="${APP_DIR}/machine-learning" +GEO_DIR="${INSTALL_DIR}/geodata" +mkdir -p ${INSTALL_DIR} +mv ${APPLICATION}-${RELEASE}/ ${SRC_DIR} +mkdir -p {${APP_DIR},${UPLOAD_DIR},${GEO_DIR},${ML_DIR},${INSTALL_DIR}/cache} + +cd ${SRC_DIR}/server +$STD npm ci +$STD npm run build +$STD npm prune --omit=dev --omit=optional +cd ${SRC_DIR}/open-api/typescript-sdk +$STD npm ci +$STD npm run build +cd ${SRC_DIR}/web +$STD npm ci +$STD npm run build +cd ${SRC_DIR} +cp -a server/{node_modules,dist,bin,resources,package.json,package-lock.json,start*.sh} ${APP_DIR}/ +cp -a web/build ${APP_DIR}/www +cp LICENSE ${APP_DIR} +cp ${BASE_DIR}/server/bin/build-lock.json ${APP_DIR} + +cd ${SRC_DIR}/machine-learning +$STD python3 -m venv ${ML_DIR}/ml-venv +( + . ${ML_DIR}/ml-venv/bin/activate + $STD pip3 install uv + $STD uv sync --extra cpu --active +) +cd ${SRC_DIR} +cp -a machine-learning/{ann,start.sh,app} ${ML_DIR} +ln -sf ${APP_DIR}/resources ${INSTALL_DIR} + +cd ${APP_DIR} +grep -Rl /usr/src | xargs -n1 sed -i "s|\/usr/src|$INSTALL_DIR|g" +sed -i "s|\"/cache\"|\"$INSTALL_DIR/cache\"|g" $ML_DIR/app/config.py +grep -RlE "'/build'" | xargs -n1 sed -i "s|'/build'|'$APP_DIR'|g" +ln -s ${UPLOAD_DIR} ${APP_DIR}/upload +ln -s ${UPLOAD_DIR} ${ML_DIR}/upload + +msg_info "Installing Immich CLI" +$STD npm install --build-from-source sharp +rm -rf ${APP_DIR}/node_modules/@img/sharp-{libvips*,linuxmusl-x64} +$STD npm i -g @immich/cli +msg_ok "Installed Immich CLI" + +msg_info "Installing GeoNames data" +cd ${GEO_DIR} +URL_LIST=( + https://download.geonames.org/export/dump/admin1CodesASCII.txt + https://download.geonames.org/export/dump/admin2Codes.txt + https://download.geonames.org/export/dump/cities500.zip + https://raw.githubusercontent.com/nvkelso/natural-earth-vector/v5.1.2/geojson/ne_10m_admin_0_countries.geojson +) +echo "${URL_LIST[@]}" | xargs -n1 -P 8 wget -q +unzip -q cities500.zip +date --iso-8601=seconds | tr -d "\n" >geodata-date.txt +cd ${INSTALL_DIR} +ln -s ${GEO_DIR} ${APP_DIR} +msg_ok "Installed GeoNames data" + +mkdir -p /var/log/immich +touch /var/log/immich/{web.log,ml.log} +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed ${APPLICATION}" + +msg_info "Creating env file, scripts & services" +cat <${INSTALL_DIR}/.env +TZ=$(cat /etc/timezone) +IMMICH_VERSION=release +IMMICH_ENV=production + +DB_HOSTNAME=localhost +DB_USERNAME=${DB_USER} +DB_PASSWORD=${DB_PASS} +DB_DATABASE_NAME=${DB_NAME} +DB_VECTOR_EXTENSION=pgvector + +REDIS_HOSTNAME=localhost + +MACHINE_LEARNING_CACHE_FOLDER=${INSTALL_DIR}/cache +EOF +cat <${ML_DIR}/start.sh +#!/usr/bin/env bash + +cd ${ML_DIR} +. ml-venv/bin/activate + +: "\${MACHINE_LEARNING_HOST:=127.0.0.1}" +: "\${MACHINE_LEARNING_PORT:=3003}" +: "\${MACHINE_LEARNING_WORKERS:=1}" +: "\${MACHINE_LEARNING_WORKER_TIMEOUT:=120}" + +exec gunicorn app.main:app \ + -k app.config.CustomUvicornWorker \ + -w "\$MACHINE_LEARNING_WORKERS" \ + -b "\$MACHINE_LEARNING_HOST":"\$MACHINE_LEARNING_PORT" \ + -t "\$MACHINE_LEARNING_WORKER_TIMEOUT" \ + --log-config-json log_conf.json \ + --graceful-timeout 0 +EOF +cat </etc/systemd/system/${APPLICATION}-web.service +[Unit] +Description=${APPLICATION} Web Service +After=network.target +Requires=redis-server.service +Requires=postgresql.service +Requires=immich-ml.service + +[Service] +Type=simple +User=root +WorkingDirectory=${APP_DIR} +EnvironmentFile=${INSTALL_DIR}/.env +ExecStart=/usr/bin/node dist/main "\$@" +Restart=on-failure +SyslogIdentifier=immich-web +StandardOutput=append:/var/log/immich/web.log +StandardError=append:/var/log/immich/web.log + +[Install] +WantedBy=multi-user.target +EOF +cat </etc/systemd/system/${APPLICATION}-ml.service +[Unit] +Description=${APPLICATION} Machine-Learning +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=${APP_DIR} +EnvironmentFile=${INSTALL_DIR}/.env +ExecStart=${ML_DIR}/start.sh +Restart=on-failure +SyslogIdentifier=immich-machine-learning +StandardOutput=append:/var/log/immich/ml.log +StandardError=append:/var/log/immich/ml.log + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now ${APPLICATION}-ml.service ${APPLICATION}-web.service +msg_ok "Created env file, scripts and services" + +sed -i "$ a VERSION_ID=12" /etc/os-release # otherwise the motd_ssh function will fail +motd_ssh +customize + +msg_info "Cleaning up" +rm -f $tmp_file +rm -rf $tmp_dir +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 7e9e0f1d1b82a17f9e76a1258f564ce756b19f96 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 31 Mar 2025 11:56:14 +0000 Subject: [PATCH 0220/1614] Update .app files --- ct/headers/immich | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/headers/immich b/ct/headers/immich index ab13925..3b08b43 100644 --- a/ct/headers/immich +++ b/ct/headers/immich @@ -1,6 +1,6 @@ - ____ _ __ - / _/___ ___ ____ ___ (_)____/ /_ - / // __ `__ \/ __ `__ \/ / ___/ __ \ - _/ // / / / / / / / / / / / /__/ / / / -/___/_/ /_/ /_/_/ /_/ /_/_/\___/_/ /_/ - + _ _ __ + (_)___ ___ ____ ___ (_)____/ /_ + / / __ `__ \/ __ `__ \/ / ___/ __ \ + / / / / / / / / / / / / / /__/ / / / +/_/_/ /_/ /_/_/ /_/ /_/_/\___/_/ /_/ + From 71ceeb490d07b9923a627d60c16b7bd2a42c5859 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 14:16:46 +0200 Subject: [PATCH 0221/1614] Update fumadocs-install.sh --- install/fumadocs-install.sh | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/install/fumadocs-install.sh b/install/fumadocs-install.sh index c89194e..6cb4359 100644 --- a/install/fumadocs-install.sh +++ b/install/fumadocs-install.sh @@ -16,7 +16,8 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ gnupg \ - ca-certificates + ca-certificates \ + expect msg_ok "Installed Dependencies" msg_info "Installing Node.js" @@ -25,19 +26,30 @@ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dea echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list $STD apt-get update $STD apt-get install -y nodejs -$STD npm install -g bun +$STD npm install -g pnpm msg_ok "Installed Node.js" msg_info "Installing Fumadocs" temp_file=$(mktemp) RELEASE=$(curl -s https://api.github.com/repos/fuma-nama/fumadocs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -export NODE_OPTIONS="--max-old-space-size=2048" +export NODE_OPTIONS="--max-old-space-size=4096" wget -q https://github.com/fuma-nama/fumadocs/archive/refs/tags/${RELEASE}.tar.gz -O $temp_file -tar zxf $temp_file -mv fumadocs-* "${PWD}/fumadocs" +tar -xzf $temp_file +mv fumadocs-* "/opt/fumadocs" cd /opt/fumadocs -$STD bun install -bun create fumadocs-app +$STD pnpm install +spawn pnpm create fumadocs-app +expect "Project name" +send "my-app\r" +expect "Choose a template" +send "Next.js: Fumadocs MDX\r" +expect "Use \`/src\` directory?" +send "No\r" +expect "Add default ESLint configuration?" +send "No\r" +expect "Do you want to install packages automatically?*" +send "Yes\r" +expect eof echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Fumadocs" @@ -49,7 +61,7 @@ After=network.target [Service] WorkingDirectory=/opt/fumadocs -ExecStart=/usr/bin/bun run dev +ExecStart=/usr/bin/pnpm run dev Restart=always [Install] @@ -61,6 +73,7 @@ motd_ssh customize msg_info "Cleaning up" +rm -f $temp_file $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From 44d51786e3482eeb8384312abdb90b522ef22c0d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 14:18:14 +0200 Subject: [PATCH 0222/1614] Update fumadocs-install.sh --- install/fumadocs-install.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/install/fumadocs-install.sh b/install/fumadocs-install.sh index 6cb4359..c0a3840 100644 --- a/install/fumadocs-install.sh +++ b/install/fumadocs-install.sh @@ -1,9 +1,8 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color @@ -31,9 +30,9 @@ msg_ok "Installed Node.js" msg_info "Installing Fumadocs" temp_file=$(mktemp) -RELEASE=$(curl -s https://api.github.com/repos/fuma-nama/fumadocs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +RELEASE=$(curl -fsSL https://api.github.com/repos/fuma-nama/fumadocs/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}') export NODE_OPTIONS="--max-old-space-size=4096" -wget -q https://github.com/fuma-nama/fumadocs/archive/refs/tags/${RELEASE}.tar.gz -O $temp_file +curl -fsSL "https://github.com/fuma-nama/fumadocs/archive/refs/tags/${RELEASE}.tar.gz" -o "$temp_file" tar -xzf $temp_file mv fumadocs-* "/opt/fumadocs" cd /opt/fumadocs From 082df5eb8103aa0c0d95799a98b1d4e433128939 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Mon, 31 Mar 2025 12:36:20 +0000 Subject: [PATCH 0223/1614] Update versions.json --- frontend/public/json/versions.json | 1203 +--------------------------- 1 file changed, 1 insertion(+), 1202 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 38a1dad..fe51488 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,1202 +1 @@ -[ - { - "name": "TriliumNext/Notes", - "version": "v0.92.5", - "date": "2025-03-30T12:32:43Z" - }, - { - "name": "icereed/paperless-gpt", - "version": "v0.14.2", - "date": "2025-03-30T19:50:38Z" - }, - { - "name": "StarFleetCPTN/GoMFT", - "version": "v0.2.4", - "date": "2025-03-30T19:46:08Z" - }, - { - "name": "semaphoreui/semaphore", - "version": "v2.13.3", - "date": "2025-03-30T19:24:44Z" - }, - { - "name": "louislam/dockge", - "version": "1.5.0", - "date": "2025-03-30T17:42:59Z" - }, - { - "name": "pi-hole/pi-hole", - "version": "v6.0.6", - "date": "2025-03-30T16:59:06Z" - }, - { - "name": "sabnzbd/sabnzbd", - "version": "4.5.0", - "date": "2025-03-30T16:17:11Z" - }, - { - "name": "Part-DB/Part-DB-server", - "version": "v1.17.0", - "date": "2025-03-30T14:21:53Z" - }, - { - "name": "openhab/openhab-core", - "version": "4.3.4", - "date": "2025-03-30T13:32:38Z" - }, - { - "name": "pocketbase/pocketbase", - "version": "v0.26.6", - "date": "2025-03-30T08:02:19Z" - }, - { - "name": "Prowlarr/Prowlarr", - "version": "v1.32.2.4987", - "date": "2025-03-16T09:41:37Z" - }, - { - "name": "Readarr/Readarr", - "version": "v2.0.0.4645", - "date": "2017-03-07T18:56:06Z" - }, - { - "name": "Lidarr/Lidarr", - "version": "v2.10.3.4602", - "date": "2025-03-23T11:00:37Z" - }, - { - "name": "Radarr/Radarr", - "version": "v5.21.1.9799", - "date": "2025-03-24T15:52:12Z" - }, - { - "name": "aceberg/WatchYourLAN", - "version": "2.1.2-alpine", - "date": "2025-03-30T06:25:22Z" - }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1709", - "date": "2025-03-30T05:51:21Z" - }, - { - "name": "pocket-id/pocket-id", - "version": "v0.45.0", - "date": "2025-03-29T23:12:22Z" - }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, - { - "name": "glanceapp/glance", - "version": "v0.7.9", - "date": "2025-03-29T18:08:11Z" - }, - { - "name": "home-assistant/core", - "version": "2025.3.4", - "date": "2025-03-21T20:22:46Z" - }, - { - "name": "theonedev/onedev", - "version": "v11.8.4", - "date": "2025-03-29T13:37:15Z" - }, - { - "name": "runtipi/runtipi", - "version": "nightly", - "date": "2025-03-29T12:57:40Z" - }, - { - "name": "syncthing/syncthing", - "version": "v2.0.0-beta.1", - "date": "2025-03-29T12:53:28Z" - }, - { - "name": "tobychui/zoraxy", - "version": "v3.1.9", - "date": "2025-03-01T02:24:33Z" - }, - { - "name": "inspircd/inspircd", - "version": "v4.7.0", - "date": "2025-03-29T03:50:50Z" - }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-03-29T01:59:30Z" - }, - { - "name": "bunkerity/bunkerweb", - "version": "v1.6.1", - "date": "2025-03-15T17:29:17Z" - }, - { - "name": "OliveTin/OliveTin", - "version": "2025.3.28", - "date": "2025-03-29T00:18:56Z" - }, - { - "name": "msgbyte/tianji", - "version": "v1.19.5", - "date": "2025-03-28T22:03:01Z" - }, - { - "name": "homarr-labs/homarr", - "version": "v1.13.1", - "date": "2025-03-28T21:58:30Z" - }, - { - "name": "TasmoAdmin/TasmoAdmin", - "version": "v4.2.3", - "date": "2025-02-09T23:07:48Z" - }, - { - "name": "gristlabs/grist-core", - "version": "v1.5.0", - "date": "2025-03-28T20:43:51Z" - }, - { - "name": "grocy/grocy", - "version": "v4.5.0", - "date": "2025-03-28T19:02:22Z" - }, - { - "name": "Brandawg93/PeaNUT", - "version": "v5.6.1", - "date": "2025-03-28T18:40:22Z" - }, - { - "name": "NodeBB/NodeBB", - "version": "v4.2.0", - "date": "2025-03-19T18:34:01Z" - }, - { - "name": "louislam/uptime-kuma", - "version": "2.0.0-beta.2-temp", - "date": "2025-03-28T08:45:58Z" - }, - { - "name": "zitadel/zitadel", - "version": "v2.71.5", - "date": "2025-03-28T15:34:27Z" - }, - { - "name": "emqx/emqx", - "version": "e5.9.0-beta.2", - "date": "2025-03-28T15:06:27Z" - }, - { - "name": "goauthentik/authentik", - "version": "version/2025.2.3", - "date": "2025-03-28T14:28:34Z" - }, - { - "name": "hakimel/reveal.js", - "version": "5.2.1", - "date": "2025-03-28T13:00:23Z" - }, - { - "name": "cockpit-project/cockpit", - "version": "336.2", - "date": "2025-03-28T10:16:47Z" - }, - { - "name": "YunoHost/yunohost", - "version": "debian/12.0.12", - "date": "2025-03-16T11:59:24Z" - }, - { - "name": "gethomepage/homepage", - "version": "v1.1.1", - "date": "2025-03-28T04:12:31Z" - }, - { - "name": "documenso/documenso", - "version": "v1.10.0-rc.3", - "date": "2025-03-28T03:45:54Z" - }, - { - "name": "Bubka/2FAuth", - "version": "v5.5.0", - "date": "2025-03-27T22:35:02Z" - }, - { - "name": "ellite/Wallos", - "version": "v2.48.1", - "date": "2025-03-27T22:02:16Z" - }, - { - "name": "hivemq/hivemq-community-edition", - "version": "2025.2", - "date": "2025-03-27T19:21:13Z" - }, - { - "name": "fallenbagel/jellyseerr", - "version": "preview-music-support", - "date": "2025-03-27T16:54:41Z" - }, - { - "name": "immich-app/immich", - "version": "v1.130.3", - "date": "2025-03-27T16:38:04Z" - }, - { - "name": "zwave-js/zwave-js-ui", - "version": "v10.1.3", - "date": "2025-03-27T15:51:38Z" - }, - { - "name": "home-assistant/operating-system", - "version": "15.0", - "date": "2025-03-17T10:26:18Z" - }, - { - "name": "tailscale/tailscale", - "version": "v1.82.0", - "date": "2025-03-27T13:08:18Z" - }, - { - "name": "n8n-io/n8n", - "version": "n8n@1.84.3", - "date": "2025-03-27T11:54:33Z" - }, - { - "name": "zabbix/zabbix", - "version": "7.2.5", - "date": "2025-03-27T11:06:48Z" - }, - { - "name": "evcc-io/evcc", - "version": "0.202.1", - "date": "2025-03-27T08:24:55Z" - }, - { - "name": "morpheus65535/bazarr", - "version": "v1.5.1", - "date": "2025-01-01T16:15:52Z" - }, - { - "name": "openobserve/openobserve", - "version": "v0.14.5-rc6", - "date": "2025-03-27T05:15:49Z" - }, - { - "name": "element-hq/synapse", - "version": "v1.127.1", - "date": "2025-03-26T21:44:28Z" - }, - { - "name": "wazuh/wazuh", - "version": "coverity-w13-4.12.0", - "date": "2025-03-26T21:11:43Z" - }, - { - "name": "duplicati/duplicati", - "version": "v2.1.0.112-2.1.0.112_canary_2025-03-26", - "date": "2025-03-26T21:04:38Z" - }, - { - "name": "ollama/ollama", - "version": "v0.6.3-rc1", - "date": "2025-03-26T20:39:01Z" - }, - { - "name": "dgtlmoon/changedetection.io", - "version": "0.49.9", - "date": "2025-03-26T15:31:03Z" - }, - { - "name": "prometheus/prometheus", - "version": "v0.303.0-rc.0", - "date": "2025-03-26T12:48:46Z" - }, - { - "name": "jupyter/notebook", - "version": "@jupyter-notebook/ui-components@7.4.0-beta.3", - "date": "2025-03-26T10:07:53Z" - }, - { - "name": "forgejo/forgejo", - "version": "v12.0.0-dev", - "date": "2025-03-26T09:58:55Z" - }, - { - "name": "Checkmk/checkmk", - "version": "v2.2.0p41", - "date": "2025-03-26T09:55:26Z" - }, - { - "name": "sct/overseerr", - "version": "v1.34.0", - "date": "2025-03-26T08:48:34Z" - }, - { - "name": "esphome/esphome", - "version": "2025.3.2", - "date": "2025-03-25T23:06:45Z" - }, - { - "name": "grafana/grafana", - "version": "v11.6.0", - "date": "2025-03-25T22:10:15Z" - }, - { - "name": "Stirling-Tools/Stirling-PDF", - "version": "v0.45.0", - "date": "2025-03-25T18:48:17Z" - }, - { - "name": "ipfs/kubo", - "version": "v0.34.1", - "date": "2025-03-25T18:11:12Z" - }, - { - "name": "dotnetfactory/fluid-calendar", - "version": "v1.3.0", - "date": "2025-03-25T15:55:02Z" - }, - { - "name": "hansmi/prometheus-paperless-exporter", - "version": "v0.0.7", - "date": "2025-03-25T15:11:18Z" - }, - { - "name": "jenkinsci/jenkins", - "version": "jenkins-2.503", - "date": "2025-03-25T14:01:20Z" - }, - { - "name": "crowdsecurity/crowdsec", - "version": "v1.6.8", - "date": "2025-03-25T13:33:10Z" - }, - { - "name": "VictoriaMetrics/VictoriaMetrics", - "version": "pmm-6401-v1.114.0", - "date": "2025-03-25T07:58:34Z" - }, - { - "name": "caddyserver/caddy", - "version": "v2.9.1", - "date": "2025-01-08T15:22:53Z" - }, - { - "name": "influxdata/influxdb", - "version": "v3.0.0-0.beta.2", - "date": "2025-03-24T21:12:19Z" - }, - { - "name": "ZoeyVid/NPMplus", - "version": "2025-03-24-r2", - "date": "2025-03-24T20:52:35Z" - }, - { - "name": "HabitRPG/habitica", - "version": "v5.35.0", - "date": "2025-03-24T20:51:10Z" - }, - { - "name": "go-gitea/gitea", - "version": "v1.23.6", - "date": "2025-03-24T20:38:45Z" - }, - { - "name": "docmost/docmost", - "version": "v0.9.0", - "date": "2025-03-24T18:25:37Z" - }, - { - "name": "Graylog2/graylog2-server", - "version": "6.2.0-beta.2", - "date": "2025-03-24T12:20:51Z" - }, - { - "name": "wavelog/wavelog", - "version": "2.0.2", - "date": "2025-03-24T12:02:08Z" - }, - { - "name": "nzbgetcom/nzbget", - "version": "v24.8", - "date": "2025-03-18T07:33:51Z" - }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.10", - "date": "2025-03-22T13:02:26Z" - }, - { - "name": "requarks/wiki", - "version": "v2.5.307", - "date": "2025-03-24T01:33:31Z" - }, - { - "name": "moghtech/komodo", - "version": "v1.17.0", - "date": "2025-03-24T00:46:32Z" - }, - { - "name": "nicolargo/glances", - "version": "v4.3.1", - "date": "2025-03-23T09:02:54Z" - }, - { - "name": "usememos/memos", - "version": "v0.24.2", - "date": "2025-03-23T04:01:50Z" - }, - { - "name": "hoarder-app/hoarder", - "version": "sdk/v0.23.0", - "date": "2025-03-22T17:26:10Z" - }, - { - "name": "netbox-community/netbox", - "version": "v4.2.6", - "date": "2025-03-21T21:20:29Z" - }, - { - "name": "leiweibau/Pi.Alert", - "version": "v2025-03-21", - "date": "2025-03-21T19:50:46Z" - }, - { - "name": "clusterzx/paperless-ai", - "version": "v2.7.6", - "date": "2025-03-21T19:24:53Z" - }, - { - "name": "photoprism/photoprism", - "version": "250321-57590c48b", - "date": "2025-03-21T11:48:16Z" - }, - { - "name": "AdguardTeam/AdGuardHome", - "version": "v0.107.59", - "date": "2025-03-21T11:11:39Z" - }, - { - "name": "jhuckaby/Cronicle", - "version": "v0.9.77", - "date": "2025-03-21T02:25:42Z" - }, - { - "name": "stonith404/pingvin-share", - "version": "v1.10.4", - "date": "2025-03-20T18:56:10Z" - }, - { - "name": "neo4j/neo4j", - "version": "4.4.42", - "date": "2025-03-20T14:44:17Z" - }, - { - "name": "redis/redis", - "version": "8.0-rc1", - "date": "2025-03-11T18:16:27Z" - }, - { - "name": "rabbitmq/rabbitmq-server", - "version": "v4.0.7", - "date": "2025-02-26T19:07:11Z" - }, - { - "name": "seanmorley15/AdventureLog", - "version": "v0.9.0", - "date": "2025-03-19T13:30:02Z" - }, - { - "name": "Luligu/matterbridge", - "version": "2.2.5", - "date": "2025-03-19T09:11:26Z" - }, - { - "name": "Donkie/Spoolman", - "version": "v0.22.1", - "date": "2025-03-18T21:01:22Z" - }, - { - "name": "OctoPrint/OctoPrint", - "version": "1.10.3", - "date": "2024-11-05T09:20:50Z" - }, - { - "name": "apache/couchdb", - "version": "3.4.3.post1", - "date": "2025-03-18T09:44:59Z" - }, - { - "name": "authelia/authelia", - "version": "v4.39.1", - "date": "2025-03-18T03:57:41Z" - }, - { - "name": "advplyr/audiobookshelf", - "version": "v2.20.0", - "date": "2025-03-17T22:44:56Z" - }, - { - "name": "bastienwirtz/homer", - "version": "v25.03.3", - "date": "2025-03-17T20:55:37Z" - }, - { - "name": "Kareadita/Kavita", - "version": "v0.8.5.11", - "date": "2025-03-17T19:25:25Z" - }, - { - "name": "Sonarr/Sonarr", - "version": "v4.0.14.2939", - "date": "2025-03-17T19:12:37Z" - }, - { - "name": "webmin/webmin", - "version": "2.303", - "date": "2025-03-17T04:54:50Z" - }, - { - "name": "autobrr/autobrr", - "version": "v1.60.0", - "date": "2025-03-16T18:39:49Z" - }, - { - "name": "BookStackApp/BookStack", - "version": "v25.02.1", - "date": "2025-03-16T12:51:00Z" - }, - { - "name": "Kozea/Radicale", - "version": "v3.5.0", - "date": "2025-03-16T06:05:55Z" - }, - { - "name": "pelican-dev/wings", - "version": "v1.0.0-beta10", - "date": "2025-03-15T20:24:34Z" - }, - { - "name": "pelican-dev/panel", - "version": "v1.0.0-beta18", - "date": "2025-03-15T20:24:04Z" - }, - { - "name": "henrygd/beszel", - "version": "v0.10.2", - "date": "2025-03-15T07:14:54Z" - }, - { - "name": "navidrome/navidrome", - "version": "v0.55.1", - "date": "2025-03-15T05:36:06Z" - }, - { - "name": "coder/code-server", - "version": "v4.98.2", - "date": "2025-03-15T02:11:28Z" - }, - { - "name": "Threadfin/Threadfin", - "version": "1.2.31", - "date": "2025-03-14T22:04:10Z" - }, - { - "name": "paperless-ngx/paperless-ngx", - "version": "v2.15.0-beta", - "date": "2025-03-14T18:05:28Z" - }, - { - "name": "FlowiseAI/Flowise", - "version": "flowise@2.2.7-patch.1", - "date": "2025-03-14T14:53:53Z" - }, - { - "name": "docker/compose", - "version": "v2.34.0", - "date": "2025-03-14T09:11:17Z" - }, - { - "name": "FreshRSS/FreshRSS", - "version": "1.26.1", - "date": "2025-03-13T21:34:25Z" - }, - { - "name": "kimai/kimai", - "version": "2.31.0", - "date": "2025-03-13T17:13:47Z" - }, - { - "name": "diced/zipline", - "version": "v4.0.1", - "date": "2025-03-12T22:41:17Z" - }, - { - "name": "minio/minio", - "version": "RELEASE.2025-03-12T18-04-18Z", - "date": "2025-03-12T18:45:21Z" - }, - { - "name": "transmission/transmission", - "version": "4.0.1-beta.1", - "date": "2024-12-13T00:16:24Z" - }, - { - "name": "gotson/komga", - "version": "1.21.2", - "date": "2025-03-12T04:19:30Z" - }, - { - "name": "benjaminjonard/koillection", - "version": "1.6.12", - "date": "2025-03-11T15:04:43Z" - }, - { - "name": "excalidraw/excalidraw", - "version": "v0.18.0", - "date": "2025-03-11T12:47:22Z" - }, - { - "name": "Ombi-app/Ombi", - "version": "v4.47.1", - "date": "2025-01-05T21:14:23Z" - }, - { - "name": "mylar3/mylar3", - "version": "v0.8.2", - "date": "2025-03-11T05:20:22Z" - }, - { - "name": "stackblitz-labs/bolt.diy", - "version": "v0.0.7-hf1", - "date": "2025-03-10T20:49:39Z" - }, - { - "name": "AlexxIT/go2rtc", - "version": "v1.9.9", - "date": "2025-03-10T03:22:11Z" - }, - { - "name": "awawa-dev/HyperHDR", - "version": "v21.0.0.0", - "date": "2025-03-09T12:25:44Z" - }, - { - "name": "YuukanOO/seelf", - "version": "v2.4.2", - "date": "2025-03-08T10:49:04Z" - }, - { - "name": "umami-software/umami", - "version": "v2.17.0", - "date": "2025-03-08T06:08:04Z" - }, - { - "name": "rogerfar/rdt-client", - "version": "v2.0.102", - "date": "2025-03-07T20:48:46Z" - }, - { - "name": "prometheus/alertmanager", - "version": "v0.28.1", - "date": "2025-03-07T15:41:35Z" - }, - { - "name": "hargata/lubelog", - "version": "v1.4.5", - "date": "2025-03-06T19:43:48Z" - }, - { - "name": "eclipse-mosquitto/mosquitto", - "version": "v2.0.21", - "date": "2025-03-06T16:24:56Z" - }, - { - "name": "Dolibarr/dolibarr", - "version": "21.0.0", - "date": "2025-03-06T16:20:45Z" - }, - { - "name": "open-webui/open-webui", - "version": "v0.5.20", - "date": "2025-03-06T03:44:57Z" - }, - { - "name": "matze/wastebin", - "version": "3.0.0", - "date": "2025-03-05T21:41:29Z" - }, - { - "name": "snipe/snipe-it", - "version": "v8.0.4", - "date": "2025-03-05T17:12:03Z" - }, - { - "name": "toniebox-reverse-engineering/teddycloud", - "version": "tc_v0.6.4", - "date": "2025-03-05T15:43:40Z" - }, - { - "name": "apache/tomcat", - "version": "10.1.39", - "date": "2025-03-04T19:05:18Z" - }, - { - "name": "sysadminsmedia/homebox", - "version": "v0.18.0", - "date": "2025-03-04T15:35:27Z" - }, - { - "name": "actualbudget/actual", - "version": "v25.3.1", - "date": "2025-03-03T02:05:36Z" - }, - { - "name": "Koenkk/zigbee2mqtt", - "version": "2.1.3", - "date": "2025-03-02T07:47:30Z" - }, - { - "name": "heiher/hev-socks5-server", - "version": "2.8.0", - "date": "2025-03-02T04:30:50Z" - }, - { - "name": "jordan-dalby/ByteStash", - "version": "v1.5.7", - "date": "2025-02-27T20:04:08Z" - }, - { - "name": "cloudflare/cloudflared", - "version": "2025.2.1", - "date": "2025-02-27T11:36:11Z" - }, - { - "name": "cross-seed/cross-seed", - "version": "v6.11.2", - "date": "2025-02-26T14:54:49Z" - }, - { - "name": "silverbulletmd/silverbullet", - "version": "0.10.4", - "date": "2025-02-25T18:13:42Z" - }, - { - "name": "juanfont/headscale", - "version": "v0.25.1", - "date": "2025-02-25T17:30:48Z" - }, - { - "name": "benzino77/tasmocompiler", - "version": "v12.5.0", - "date": "2025-02-25T14:55:50Z" - }, - { - "name": "traefik/traefik", - "version": "v3.3.4", - "date": "2025-02-25T10:18:58Z" - }, - { - "name": "schlagmichdoch/PairDrop", - "version": "v1.11.2", - "date": "2025-02-24T19:47:06Z" - }, - { - "name": "drakkan/sftpgo", - "version": "v2.6.6", - "date": "2025-02-24T19:14:46Z" - }, - { - "name": "ioBroker/ioBroker", - "version": "2025-02-23", - "date": "2025-02-24T16:05:06Z" - }, - { - "name": "ventoy/Ventoy", - "version": "v1.1.05", - "date": "2025-02-24T11:53:12Z" - }, - { - "name": "Athou/commafeed", - "version": "5.6.1", - "date": "2025-02-23T20:39:48Z" - }, - { - "name": "outline/outline", - "version": "v0.82.1-15", - "date": "2025-02-23T14:38:09Z" - }, - { - "name": "TechnitiumSoftware/DnsServer", - "version": "v13.4.3", - "date": "2025-02-23T11:08:26Z" - }, - { - "name": "azukaar/Cosmos-Server", - "version": "v0.18.3", - "date": "2025-02-21T20:51:12Z" - }, - { - "name": "prometheus-pve/prometheus-pve-exporter", - "version": "v3.5.2", - "date": "2025-02-18T16:43:41Z" - }, - { - "name": "typesense/typesense", - "version": "v28.0", - "date": "2025-02-18T15:49:57Z" - }, - { - "name": "qbittorrent/qBittorrent", - "version": "release-5.0.4", - "date": "2025-02-18T14:14:11Z" - }, - { - "name": "postgres/postgres", - "version": "REL_13_20", - "date": "2025-02-17T21:17:13Z" - }, - { - "name": "jellyfin/jellyfin", - "version": "v10.10.6", - "date": "2025-02-16T21:55:45Z" - }, - { - "name": "sbondCo/Watcharr", - "version": "v2.0.2", - "date": "2025-02-16T21:34:29Z" - }, - { - "name": "recyclarr/recyclarr", - "version": "v7.4.1", - "date": "2025-02-15T20:54:00Z" - }, - { - "name": "node-red/node-red", - "version": "4.0.9", - "date": "2025-02-14T17:10:20Z" - }, - { - "name": "mayswind/AriaNg", - "version": "1.3.10", - "date": "2025-02-14T16:23:14Z" - }, - { - "name": "MariaDB/server", - "version": "mariadb-11.7.2", - "date": "2025-02-13T04:13:46Z" - }, - { - "name": "glpi-project/glpi", - "version": "10.0.18", - "date": "2025-02-12T11:07:02Z" - }, - { - "name": "WordPress/WordPress", - "version": "6.7.2", - "date": "2025-02-11T16:13:18Z" - }, - { - "name": "homebridge/homebridge", - "version": "v1.9.0", - "date": "2025-02-11T13:26:42Z" - }, - { - "name": "dani-garcia/vaultwarden", - "version": "1.33.2", - "date": "2025-02-09T17:54:59Z" - }, - { - "name": "blakeblackshear/frigate", - "version": "v0.15.0", - "date": "2025-02-08T18:45:30Z" - }, - { - "name": "bluenviron/mediamtx", - "version": "v1.11.3", - "date": "2025-02-07T19:29:19Z" - }, - { - "name": "apache/cassandra", - "version": "cassandra-4.0.17", - "date": "2025-02-07T10:38:54Z" - }, - { - "name": "apache/tika", - "version": "2.9.3", - "date": "2025-02-07T00:15:40Z" - }, - { - "name": "actualbudget/actual-server", - "version": "v25.2.1", - "date": "2025-02-06T20:41:28Z" - }, - { - "name": "NginxProxyManager/nginx-proxy-manager", - "version": "v2.12.3", - "date": "2025-02-06T11:07:07Z" - }, - { - "name": "mongodb/mongo", - "version": "r8.0.5-rc1", - "date": "2025-02-04T20:35:23Z" - }, - { - "name": "thomiceli/opengist", - "version": "v1.9.1", - "date": "2025-02-04T20:24:29Z" - }, - { - "name": "Forceu/Gokapi", - "version": "v1.9.6", - "date": "2024-12-18T14:35:37Z" - }, - { - "name": "PrivateBin/PrivateBin", - "version": "1.7.6", - "date": "2025-02-01T09:50:52Z" - }, - { - "name": "rustdesk/rustdesk-server", - "version": "1.1.14", - "date": "2025-01-25T12:48:28Z" - }, - { - "name": "crafty-controller/crafty-4", - "version": "v4.4.7", - "date": "2025-01-20T15:45:06Z" - }, - { - "name": "owncast/owncast", - "version": "v0.2.1", - "date": "2025-01-19T22:40:40Z" - }, - { - "name": "donaldzou/WGDashboard", - "version": "v4.1.4", - "date": "2025-01-19T13:14:19Z" - }, - { - "name": "0xERR0R/blocky", - "version": "v0.25", - "date": "2025-01-17T20:49:31Z" - }, - { - "name": "petio-team/petio", - "version": "v0.5.7", - "date": "2025-01-17T15:57:17Z" - }, - { - "name": "readeck/readeck", - "version": "0.17.1", - "date": "2025-01-15T19:13:33Z" - }, - { - "name": "linkwarden/linkwarden", - "version": "v2.9.3", - "date": "2025-01-13T16:19:53Z" - }, - { - "name": "Tautulli/Tautulli", - "version": "v2.15.1", - "date": "2025-01-11T23:38:33Z" - }, - { - "name": "traccar/traccar", - "version": "v6.6", - "date": "2025-01-11T17:26:49Z" - }, - { - "name": "ErsatzTV/ErsatzTV", - "version": "v25.1.0", - "date": "2025-01-10T18:14:54Z" - }, - { - "name": "MagicMirrorOrg/MagicMirror", - "version": "v2.30.0", - "date": "2025-01-01T14:30:19Z" - }, - { - "name": "go-vikunja/vikunja", - "version": "v0.24.6", - "date": "2024-12-22T20:24:35Z" - }, - { - "name": "IceWhaleTech/CasaOS", - "version": "v0.4.15", - "date": "2024-12-19T03:19:49Z" - }, - { - "name": "mysql/mysql-server", - "version": "mysql-cluster-7.6.33", - "date": "2024-12-16T11:55:50Z" - }, - { - "name": "ArchiveBox/ArchiveBox", - "version": "v0.7.3", - "date": "2024-12-15T10:18:06Z" - }, - { - "name": "pymedusa/Medusa", - "version": "v1.0.22", - "date": "2024-12-13T12:22:19Z" - }, - { - "name": "MDeLuise/plant-it", - "version": "0.10.0", - "date": "2024-12-10T09:35:26Z" - }, - { - "name": "phpipam/phpipam", - "version": "v1.7.3", - "date": "2024-11-27T21:26:11Z" - }, - { - "name": "lldap/lldap", - "version": "v0.6.1", - "date": "2024-11-22T21:48:41Z" - }, - { - "name": "gotify/server", - "version": "v2.6.1", - "date": "2024-11-16T08:44:53Z" - }, - { - "name": "janeczku/calibre-web", - "version": "0.6.24", - "date": "2024-11-16T06:47:56Z" - }, - { - "name": "sabre-io/Baikal", - "version": "0.10.1", - "date": "2024-11-10T10:25:45Z" - }, - { - "name": "nextcloud/nextcloudpi", - "version": "v1.55.3", - "date": "2024-11-08T22:21:10Z" - }, - { - "name": "caddyserver/xcaddy", - "version": "v0.4.4", - "date": "2024-11-05T23:06:11Z" - }, - { - "name": "linuxserver/Heimdall", - "version": "v2.6.3", - "date": "2024-11-05T11:00:43Z" - }, - { - "name": "zerotier/ZeroTierOne", - "version": "1.14.2", - "date": "2024-10-29T16:17:48Z" - }, - { - "name": "CorentinTh/it-tools", - "version": "v2024.10.22-7ca5933", - "date": "2024-10-22T09:58:03Z" - }, - { - "name": "NLnetLabs/unbound", - "version": "release-1.22.0", - "date": "2024-10-17T08:43:37Z" - }, - { - "name": "Notifiarr/notifiarr", - "version": "v0.8.3", - "date": "2024-10-04T23:49:07Z" - }, - { - "name": "Kometa-Team/Kometa", - "version": "v2.1.0", - "date": "2024-09-30T17:59:43Z" - }, - { - "name": "FunkeyFlo/ps5-mqtt", - "version": "v1.4.0", - "date": "2024-08-06T19:57:33Z" - }, - { - "name": "projectsend/projectsend", - "version": "r1720", - "date": "2024-08-03T04:07:20Z" - }, - { - "name": "Pf2eToolsOrg/Pf2eTools", - "version": "v0.8.13", - "date": "2024-07-29T12:54:27Z" - }, - { - "name": "Paymenter/Paymenter", - "version": "v0.9.5", - "date": "2024-07-20T08:46:42Z" - }, - { - "name": "hywax/mafl", - "version": "v0.15.4", - "date": "2024-07-13T11:03:43Z" - }, - { - "name": "FlareSolverr/FlareSolverr", - "version": "v3.3.21", - "date": "2024-06-26T01:14:46Z" - }, - { - "name": "Suwayomi/Suwayomi-Server", - "version": "v1.1.1", - "date": "2024-06-15T17:23:48Z" - }, - { - "name": "Forceu/barcodebuddy", - "version": "v1.8.1.8", - "date": "2024-06-02T20:01:53Z" - }, - { - "name": "Lissy93/dashy", - "version": "3.1.1", - "date": "2024-05-30T17:20:53Z" - }, - { - "name": "motioneye-project/motioneye", - "version": "0.42.1", - "date": "2020-06-07T07:27:04Z" - }, - { - "name": "gnmyt/MySpeed", - "version": "v1.0.9", - "date": "2024-05-21T22:15:33Z" - }, - { - "name": "binwiederhier/ntfy", - "version": "v2.11.0", - "date": "2024-05-13T20:19:54Z" - }, - { - "name": "CrazyWolf13/web-check", - "version": "1.0.0", - "date": "2024-05-05T02:01:51Z" - }, - { - "name": "monicahq/monica", - "version": "v4.1.2", - "date": "2024-05-04T08:06:50Z" - }, - { - "name": "thelounge/thelounge-deb", - "version": "v4.4.3", - "date": "2024-04-06T12:24:35Z" - }, - { - "name": "hyperion-project/hyperion.ng", - "version": "2.0.16", - "date": "2024-01-18T16:11:07Z" - }, - { - "name": "wger-project/wger", - "version": "2.2", - "date": "2023-12-06T12:08:09Z" - } -] +[] From 63ec52877133e7b856b6a73497c164c1b836fde2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 14:50:29 +0200 Subject: [PATCH 0224/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 886c514..b5b83d0 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -117,18 +117,18 @@ function main() { msg info "Intel passthrough setup for CT $ctid" passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" && updated=1 ;; - nvidia) - msg info "Validating NVIDIA setup..." - nvidia_validate_driver_version - nvidia_validate_cuda_version - local minor - minor=$(nvidia_select_gpu_minor) - nvidia_lxc_passthrough "$ctid" "$minor" && updated=1 - ;; - amd) - msg info "Applying AMD passthrough to CT $ctid..." - passthrough_amd_to_lxc "$ctid" && install_amd_tools_in_ct "$ctid" && updated=1 - ;; + # nvidia) + # msg info "Validating NVIDIA setup..." + # nvidia_validate_driver_version + # nvidia_validate_cuda_version + # local minor + # minor=$(nvidia_select_gpu_minor) + # nvidia_lxc_passthrough "$ctid" "$minor" && updated=1 + # ;; + # amd) + # msg info "Applying AMD passthrough to CT $ctid..." + # passthrough_amd_to_lxc "$ctid" && install_amd_tools_in_ct "$ctid" && updated=1 + # ;; esac done From 112a879f61c39b692c5bcace1fe04cd5701fcec1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 14:51:39 +0200 Subject: [PATCH 0225/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index b5b83d0..de26044 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -117,14 +117,14 @@ function main() { msg info "Intel passthrough setup for CT $ctid" passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" && updated=1 ;; - # nvidia) - # msg info "Validating NVIDIA setup..." - # nvidia_validate_driver_version - # nvidia_validate_cuda_version - # local minor - # minor=$(nvidia_select_gpu_minor) - # nvidia_lxc_passthrough "$ctid" "$minor" && updated=1 - # ;; + nvidia) + msg info "Validating NVIDIA setup..." + nvidia_validate_driver_version + nvidia_validate_cuda_version + local minor + minor=$(nvidia_select_gpu_minor) + nvidia_lxc_passthrough "$ctid" "$minor" && updated=1 + ;; # amd) # msg info "Applying AMD passthrough to CT $ctid..." # passthrough_amd_to_lxc "$ctid" && install_amd_tools_in_ct "$ctid" && updated=1 From bed4d7c9b3c6027a0bf314f2ff5f0abcefafb94a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 14:54:02 +0200 Subject: [PATCH 0226/1614] Update gpu-intel.func --- scripts/tools/gpu-intel.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tools/gpu-intel.func b/scripts/tools/gpu-intel.func index 6e86a26..1df8a31 100644 --- a/scripts/tools/gpu-intel.func +++ b/scripts/tools/gpu-intel.func @@ -64,7 +64,7 @@ function install_intel_tools_in_ct() { read -rp "Install non-free intel-media-va-driver (Debian only)? [y/N]: " confirm if [[ "${confirm,,}" =~ ^(y|yes)$ ]]; then msg info "Enabling non-free sources in $ctid..." - pct exec "$ctid" -- tee /etc/apt/sources.list.d/non-free.list >/dev/null </dev/null" <<'EOF' deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware From 87e5204abe403e009022832bc634725fc5235245 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 14:54:39 +0200 Subject: [PATCH 0227/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index de26044..886c514 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -125,10 +125,10 @@ function main() { minor=$(nvidia_select_gpu_minor) nvidia_lxc_passthrough "$ctid" "$minor" && updated=1 ;; - # amd) - # msg info "Applying AMD passthrough to CT $ctid..." - # passthrough_amd_to_lxc "$ctid" && install_amd_tools_in_ct "$ctid" && updated=1 - # ;; + amd) + msg info "Applying AMD passthrough to CT $ctid..." + passthrough_amd_to_lxc "$ctid" && install_amd_tools_in_ct "$ctid" && updated=1 + ;; esac done From 79f92db110ee974856eadc3129e30ef56be88f9d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 14:57:00 +0200 Subject: [PATCH 0228/1614] Update gpu-nvidia.func --- scripts/tools/gpu-nvidia.func | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/tools/gpu-nvidia.func b/scripts/tools/gpu-nvidia.func index da22311..c0b4c96 100644 --- a/scripts/tools/gpu-nvidia.func +++ b/scripts/tools/gpu-nvidia.func @@ -15,10 +15,10 @@ function msg() { local type="$1" shift case "$type" in - info) printf " \033[36m➤\033[0m %s\n" "$@" ;; - ok) printf " \033[32m✔\033[0m %s\n" "$@" ;; - warn) printf " \033[33m⚠\033[0m %s\n" "$@" >&2 ;; - err) printf " \033[31m✘\033[0m %s\n" "$@" >&2 ;; + info) printf " \033[36m➤\033[0m %s\n" "$@" ;; + ok) printf " \033[32m✔\033[0m %s\n" "$@" ;; + warn) printf " \033[33m⚠\033[0m %s\n" "$@" >&2 ;; + err) printf " \033[31m✘\033[0m %s\n" "$@" >&2 ;; esac } @@ -89,7 +89,7 @@ function nvidia_select_gpu_minor() { model=$(awk -F': ' '/Model:/ {print $2}' "$info") minor=$(awk '/Device Minor/ {print $NF}' "$info") menu+=("$minor" "$model" "OFF") - (( ${#model} > max )) && max=${#model} + ((${#model} > max)) && max=${#model} done < <(find /proc/driver/nvidia/gpus -mindepth 1 -type d) [[ ${#menu[@]} -eq 0 ]] && msg err "No NVIDIA GPU found" && return 1 @@ -124,5 +124,5 @@ function nvidia_lxc_passthrough() { for n in "${devnums[@]}"; do echo "lxc.cgroup2.devices.allow: c ${n}:* rwm" >>"$conf" done - - msg ok "NVIDIA passt + msg ok "Installed NVIDIA GPU tools in $ctid" +} From 96602f913a64df060476da6023e895cb045931a2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:01:06 +0200 Subject: [PATCH 0229/1614] fix bug --- scripts/tools/gpu-intel.func | 4 ++-- scripts/tools/hw-acceleration.sh | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/tools/gpu-intel.func b/scripts/tools/gpu-intel.func index 1df8a31..791d8c2 100644 --- a/scripts/tools/gpu-intel.func +++ b/scripts/tools/gpu-intel.func @@ -55,14 +55,14 @@ function passthrough_intel_to_lxc() { function install_intel_tools_in_ct() { local ctid="$1" + local install_nonfree="$2" if is_alpine_ct "$ctid"; then msg warn "Skipping Intel tool install for Alpine CT $ctid" return 0 fi - read -rp "Install non-free intel-media-va-driver (Debian only)? [y/N]: " confirm - if [[ "${confirm,,}" =~ ^(y|yes)$ ]]; then + if [[ "$install_nonfree" == "yes" ]]; then msg info "Enabling non-free sources in $ctid..." pct exec "$ctid" -- bash -c "tee /etc/apt/sources.list.d/non-free.list >/dev/null" <<'EOF' deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 886c514..25a13bd 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -103,6 +103,14 @@ function main() { local updated_cts=() + local intel_nonfree="no" + if [[ " ${SELECTED_FEATURES[*]} " =~ " intel " ]]; then + read -rp "Install non-free intel-media-va-driver (Debian only)? [y/N]: " confirm + if [[ "${confirm,,}" =~ ^(y|yes)$ ]]; then + intel_nonfree="yes" + fi + fi + for ctid in $SELECTED_CTIDS; do local conf="/etc/pve/lxc/${ctid}.conf" local updated=0 @@ -115,7 +123,7 @@ function main() { ;; intel) msg info "Intel passthrough setup for CT $ctid" - passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" && updated=1 + passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" "$intel_nonfree" && updated=1 ;; nvidia) msg info "Validating NVIDIA setup..." From e50ac22c00af250bb09abcb73978a1ee1d026ba0 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:08:39 +0200 Subject: [PATCH 0230/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 25a13bd..410beee 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -8,6 +8,8 @@ set -euo pipefail TEMP_DIR=$(mktemp -d) trap 'rm -rf $TEMP_DIR' EXIT +declare -a SELECTED_FEATURES +declare -a updated_cts source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-intel.func) source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-nvidia.func) From 639cc9dc134bed2bcf037c45d6c729599f1e8b75 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:12:59 +0200 Subject: [PATCH 0231/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 410beee..e4e924c 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -10,6 +10,8 @@ TEMP_DIR=$(mktemp -d) trap 'rm -rf $TEMP_DIR' EXIT declare -a SELECTED_FEATURES declare -a updated_cts +read -rp "Enter container ID(s) separated by space: " SELECTED_CTIDS +declare SELECTED_CTIDS="" source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-intel.func) source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-nvidia.func) From 1551539cb503836cb0132d1913bded5c9c777b47 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:13:40 +0200 Subject: [PATCH 0232/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index e4e924c..752bfbd 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -103,7 +103,9 @@ EOF function main() { header_info prompt_features + msg info "Features selected: ${SELECTED_FEATURES[*]}" select_lxc_cts + msg info "Containers selected: ${SELECTED_CTIDS}" local updated_cts=() From df257af24e02baf46cd794bbc37815e5e8a05dbd Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:23:26 +0200 Subject: [PATCH 0233/1614] Update hw-acceleration.sh --- scripts/tools/hw-acceleration.sh | 139 +++++++++++++++++++------------ 1 file changed, 86 insertions(+), 53 deletions(-) diff --git a/scripts/tools/hw-acceleration.sh b/scripts/tools/hw-acceleration.sh index 752bfbd..712fd0a 100644 --- a/scripts/tools/hw-acceleration.sh +++ b/scripts/tools/hw-acceleration.sh @@ -1,20 +1,39 @@ #!/usr/bin/env bash - +# # Title: Proxmox LXC Hardware Passthrough & GPU Acceleration Setup -# Maintainer: https://github.com/community-scripts/ProxmoxVED -# Includes: gpu-intel.func, gpu-nvidia.func, gpu-amd.func +# Description: Enables hardware passthrough for USB, Intel, NVIDIA, AMD GPUs inside privileged LXC containers. +# Installs optional drivers/tools inside the container (vainfo, intel-gpu-tools, OpenCL, etc.) +# Only supports PRIVILEGED containers for GPU passthrough. +# License: MIT +# Author: MickLesk (CanbiZ) +# Repo: https://github.com/community-scripts/ProxmoxVED +# +# Usage: bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/misc/hw-acceleration.sh)" +# +# Requires: +# - Proxmox VE 8.1+ +# - Privileged LXC Containers +# - GPU device available on host +# +# Features: +# - USB Serial Passthrough +# - Intel VAAPI passthrough + (optional) non-free drivers +# - NVIDIA GPU passthrough for LXC (binds /dev/nvidia*) +# - AMD GPU passthrough (experimental) +# - Container driver installation via APT +# - User group assignments (video/render) +# - Interactive menu system via whiptail +# +# Proxmox LXC Hardware Passthrough & GPU Acceleration Setup +# https://github.com/community-scripts/ProxmoxVED set -euo pipefail TEMP_DIR=$(mktemp -d) trap 'rm -rf $TEMP_DIR' EXIT -declare -a SELECTED_FEATURES -declare -a updated_cts -read -rp "Enter container ID(s) separated by space: " SELECTED_CTIDS -declare SELECTED_CTIDS="" -source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-intel.func) source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-nvidia.func) +source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-intel.func) source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-amd.func) function header_info() { @@ -43,14 +62,31 @@ function msg() { function prompt_features() { local features=() - printf "\nAvailable passthrough options:\n" - [[ -e /dev/ttyUSB0 || -e /dev/ttyACM0 ]] && echo " [1] USB" && features+=("usb") - [[ -e /dev/dri/renderD128 ]] && echo " [2] Intel VAAPI" && features+=("intel") - [[ -e /dev/nvidia0 ]] && echo " [3] NVIDIA GPU" && features+=("nvidia") - [[ -e /dev/kfd ]] && echo " [4] AMD GPU" && features+=("amd") - [[ ${#features[@]} -eq 0 ]] && msg err "No supported hardware detected." && exit 1 + printf "\nAvailable features:\n" + if [[ -e /dev/ttyUSB0 || -e /dev/ttyACM0 ]]; then + echo " [1] USB Passthrough" + features+=("usb") + fi + if [[ -e /dev/dri/renderD128 ]]; then + echo " [2] Intel iGPU (VAAPI)" + features+=("intel") + fi + if [[ -e /dev/nvidia0 ]]; then + echo " [3] NVIDIA GPU" + features+=("nvidia") + fi + if [[ -e /dev/kfd ]]; then + echo " [4] AMD GPU (ROCm)" + features+=("amd") + fi + + if [[ ${#features[@]} -eq 0 ]]; then + msg err "No supported hardware found on host." + exit 1 + fi + echo - read -rp "Select hardware (e.g. 1 3): " choices + read -rp "Enter number(s) separated by space (e.g. 1 3): " choices SELECTED_FEATURES=() for i in $choices; do case "$i" in @@ -60,12 +96,20 @@ function prompt_features() { 4) SELECTED_FEATURES+=("amd") ;; esac done - [[ ${#SELECTED_FEATURES[@]} -eq 0 ]] && msg warn "No valid feature selected." && exit 1 + + if [[ ${#SELECTED_FEATURES[@]} -eq 0 ]]; then + msg warn "No valid feature selected." + exit 1 + fi } function select_lxc_cts() { mapfile -t containers < <(pct list | awk 'NR>1 {print $1 "|" $2}') - [[ ${#containers[@]} -eq 0 ]] && msg warn "No LXC containers found." && exit 1 + if [[ ${#containers[@]} -eq 0 ]]; then + msg warn "No LXC containers found." + exit 1 + fi + echo echo "Available Containers:" for entry in "${containers[@]}"; do @@ -73,21 +117,20 @@ function select_lxc_cts() { name="${entry##*|}" echo " [$ctid] $name" done + echo read -rp "Enter container ID(s) separated by space: " SELECTED_CTIDS - [[ -z "$SELECTED_CTIDS" ]] && msg warn "No containers selected." && exit 1 -} - -function is_alpine_container() { - local ctid="$1" - pct exec "$ctid" -- sh -c 'grep -qi alpine /etc/os-release' >/dev/null 2>&1 + if [[ -z "$SELECTED_CTIDS" ]]; then + msg warn "No containers selected." + exit 1 + fi } function apply_usb_passthrough() { local conf="$1" grep -q "ttyUSB" "$conf" 2>/dev/null && return cat <>"$conf" -# USB Serial Passthrough +# USB Passthrough lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm @@ -103,20 +146,10 @@ EOF function main() { header_info prompt_features - msg info "Features selected: ${SELECTED_FEATURES[*]}" select_lxc_cts - msg info "Containers selected: ${SELECTED_CTIDS}" local updated_cts=() - local intel_nonfree="no" - if [[ " ${SELECTED_FEATURES[*]} " =~ " intel " ]]; then - read -rp "Install non-free intel-media-va-driver (Debian only)? [y/N]: " confirm - if [[ "${confirm,,}" =~ ^(y|yes)$ ]]; then - intel_nonfree="yes" - fi - fi - for ctid in $SELECTED_CTIDS; do local conf="/etc/pve/lxc/${ctid}.conf" local updated=0 @@ -124,45 +157,45 @@ function main() { for feature in "${SELECTED_FEATURES[@]}"; do case "$feature" in usb) - msg info "Adding USB passthrough to CT $ctid..." + msg info "Applying USB passthrough to CT $ctid..." apply_usb_passthrough "$conf" && updated=1 ;; intel) - msg info "Intel passthrough setup for CT $ctid" - passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" "$intel_nonfree" && updated=1 - ;; - nvidia) - msg info "Validating NVIDIA setup..." - nvidia_validate_driver_version - nvidia_validate_cuda_version - local minor - minor=$(nvidia_select_gpu_minor) - nvidia_lxc_passthrough "$ctid" "$minor" && updated=1 + msg info "Applying Intel VAAPI passthrough to CT $ctid..." + passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" && updated=1 ;; amd) - msg info "Applying AMD passthrough to CT $ctid..." + msg info "Applying AMD GPU passthrough to CT $ctid..." passthrough_amd_to_lxc "$ctid" && install_amd_tools_in_ct "$ctid" && updated=1 ;; + nvidia) + msg info "Checking NVIDIA GPU on host..." + check_nvidia_driver_status && check_cuda_version + gpu_minor=$(select_nvidia_gpu) || continue + passthrough_nvidia_to_lxc "$ctid" "$gpu_minor" && updated=1 + ;; esac done - [[ "$updated" -eq 1 ]] && updated_cts+=("$ctid") + if [[ "$updated" -eq 1 ]]; then + updated_cts+=("$ctid") + fi done echo if [[ ${#updated_cts[@]} -gt 0 ]]; then - msg ok "Updated containers: ${updated_cts[*]}" - read -rp "Restart updated container(s)? [y/N]: " confirm - if [[ "${confirm,,}" == "y" ]]; then + msg ok "Updated: ${updated_cts[*]}" + read -rp "Restart updated container(s)? [y/N]: " restart + if [[ "${restart,,}" == "y" ]]; then for ctid in "${updated_cts[@]}"; do pct reboot "$ctid" - msg ok "Restarted CT $ctid" + msg ok "Restarted container $ctid" done else - msg info "Restart skipped." + msg info "Manual restart required for: ${updated_cts[*]}" fi else - msg warn "No passthrough changes applied." + msg warn "No passthrough applied." fi } From dda43e05a64cba70a090182aa3daf15cf7bb58d2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:27:24 +0200 Subject: [PATCH 0234/1614] Update gpu-intel.func --- scripts/tools/gpu-intel.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tools/gpu-intel.func b/scripts/tools/gpu-intel.func index 791d8c2..0b91a48 100644 --- a/scripts/tools/gpu-intel.func +++ b/scripts/tools/gpu-intel.func @@ -55,7 +55,7 @@ function passthrough_intel_to_lxc() { function install_intel_tools_in_ct() { local ctid="$1" - local install_nonfree="$2" + local install_nonfree="yes" if is_alpine_ct "$ctid"; then msg warn "Skipping Intel tool install for Alpine CT $ctid" From cfda3bce51374d5560efd859685f1c7327a3a81e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:31:06 +0200 Subject: [PATCH 0235/1614] Update gpu-intel.func --- scripts/tools/gpu-intel.func | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/tools/gpu-intel.func b/scripts/tools/gpu-intel.func index 0b91a48..0730a1f 100644 --- a/scripts/tools/gpu-intel.func +++ b/scripts/tools/gpu-intel.func @@ -64,11 +64,16 @@ function install_intel_tools_in_ct() { if [[ "$install_nonfree" == "yes" ]]; then msg info "Enabling non-free sources in $ctid..." - pct exec "$ctid" -- bash -c "tee /etc/apt/sources.list.d/non-free.list >/dev/null" <<'EOF' + + pct exec "$ctid" -- bash -c ' + grep -q "non-free" /etc/apt/sources.list && exit 0 + + cat < /etc/apt/sources.list.d/non-free.list deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware EOF + ' fi msg info "Installing Intel tools in CT $ctid..." From e0a8b4dda26b7829cc897db73b23c52265520051 Mon Sep 17 00:00:00 2001 From: Desert Gamer <44316028+DesertGamer@users.noreply.github.com> Date: Mon, 31 Mar 2025 17:01:33 +0300 Subject: [PATCH 0236/1614] Create add-iptag.sh --- scripts/tools/add-iptag.sh | 713 +++++++++++++++++++++++++++++++++++++ 1 file changed, 713 insertions(+) create mode 100644 scripts/tools/add-iptag.sh diff --git a/scripts/tools/add-iptag.sh b/scripts/tools/add-iptag.sh new file mode 100644 index 0000000..c9f7ae8 --- /dev/null +++ b/scripts/tools/add-iptag.sh @@ -0,0 +1,713 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (Canbiz) && Desert_Gamer +# License: MIT +# Source: https://github.com/gitsang/iptag + +function header_info { +clear +cat <<"EOF" + ___ ____ _____ +|_ _| _ \ _ |_ _|_ _ __ _ + | || |_) (_) | |/ _` |/ _` | + | || __/ _ | | (_| | (_| | +|___|_| (_) |_|\__,_|\__, | + |___/ +EOF +} + +clear +header_info +APP="IP-Tag" +hostname=$(hostname) + +# Farbvariablen +YW=$(echo "\033[33m") +GN=$(echo "\033[1;92m") +RD=$(echo "\033[01;31m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD=" " +CM=" ✔️ ${CL}" +CROSS=" ✖️ ${CL}" + +# This function enables error handling in the script by setting options and defining a trap for the ERR signal. +catch_errors() { + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +# 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() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi + printf "\e[?25h" + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +# This function displays a spinner. +spinner() { + local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') + local spin_i=0 + local interval=0.1 + printf "\e[?25l" + + local color="${YWB}" + + while true; do + printf "\r ${color}%s${CL}" "${frames[spin_i]}" + spin_i=$(((spin_i + 1) % ${#frames[@]})) + sleep "$interval" + done +} + +# This function displays an informational message with a yellow color. +msg_info() { + local msg="$1" + echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}" + spinner & + SPINNER_PID=$! +} + +# This function displays a success message with a green color. +msg_ok() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${CM}${GN}${msg}${CL}" +} + +# This function displays a error message with a red color. +msg_error() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${CROSS}${RD}${msg}${CL}" +} + +# Check if service exists +check_service_exists() { + if systemctl is-active --quiet iptag.service; then + return 0 + else + return 1 + fi +} + +# Migrate configuration from old path to new +migrate_config() { + local old_config="/opt/lxc-iptag" + local new_config="/opt/iptag/iptag.conf" + + if [[ -f "$old_config" ]]; then + msg_info "Migrating configuration from old path" + if cp "$old_config" "$new_config" &>/dev/null; then + rm -rf "$old_config" &>/dev/null + msg_ok "Configuration migrated and old config removed" + else + msg_error "Failed to migrate configuration" + fi + fi +} + +# Update existing installation +update_installation() { + msg_info "Updating IP-Tag Scripts" + systemctl stop iptag.service &>/dev/null + + # Migrate config if needed + migrate_config + + # Update main script + cat <<'EOF' >/opt/iptag/iptag +#!/bin/bash +# =============== CONFIGURATION =============== # +CONFIG_FILE="/opt/iptag/iptag.conf" + +# Load the configuration file if it exists +if [ -f "$CONFIG_FILE" ]; then + # shellcheck source=./iptag.conf + source "$CONFIG_FILE" +fi + +# Convert IP to integer for comparison +ip_to_int() { + local ip="$1" + local a b c d + IFS=. read -r a b c d <<< "${ip}" + echo "$((a << 24 | b << 16 | c << 8 | d))" +} + +# Check if IP is in CIDR +ip_in_cidr() { + local ip="$1" + local cidr="$2" + local ip_int=$(ip_to_int "$ip") + local netmask_int=$(ip_to_int "$(ipcalc -b "$cidr" | grep Broadcast | awk '{print $2}')") + [[ $((ip_int & netmask_int)) -eq $((ip_int & netmask_int)) ]] && return 0 || return 1 +} + +# Check if IP is in any CIDRs +ip_in_cidrs() { + local ip="$1" + local cidrs=() + mapfile -t cidrs < <(echo "$2" | tr ' ' '\n') + for cidr in "${cidrs[@]}"; do + ip_in_cidr "$ip" "$cidr" && return 0 + done + return 1 +} + +# Check if IP is valid +is_valid_ipv4() { + local ip="$1" + [[ "$ip" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]] || return 1 + local IFS='.' + read -ra parts <<< "$ip" + for part in "${parts[@]}"; do + [[ "$part" =~ ^[0-9]+$ ]] && ((part >= 0 && part <= 255)) || return 1 + done + return 0 +} + +lxc_status_changed() { + current_lxc_status=$(pct list 2>/dev/null) + if [ "${last_lxc_status}" == "${current_lxc_status}" ]; then + return 1 + else + last_lxc_status="${current_lxc_status}" + return 0 + fi +} + +vm_status_changed() { + current_vm_status=$(qm list 2>/dev/null) + if [ "${last_vm_status}" == "${current_vm_status}" ]; then + return 1 + else + last_vm_status="${current_vm_status}" + return 0 + fi +} + +fw_net_interface_changed() { + current_net_interface=$(ifconfig | grep "^fw") + if [ "${last_net_interface}" == "${current_net_interface}" ]; then + return 1 + else + last_net_interface="${current_net_interface}" + return 0 + fi +} + +# Get VM IPs using MAC addresses and ARP table +get_vm_ips() { + local vmid=$1 + local ips="" + + # Check if VM is running + qm status "$vmid" | grep -q "status: running" || return + + # Get MAC addresses from VM configuration + local macs + macs=$(qm config "$vmid" | grep -E 'net[0-9]+' | grep -o -E '[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}') + + # Look up IPs from ARP table using MAC addresses + for mac in $macs; do + local ip + ip=$(arp -an | grep -i "$mac" | grep -o -E '([0-9]{1,3}\.){3}[0-9]{1,3}') + if [ -n "$ip" ]; then + ips+="$ip " + fi + done + + echo "$ips" +} + +# Update tags for container or VM +update_tags() { + local type="$1" + local vmid="$2" + local config_cmd="pct" + [[ "$type" == "vm" ]] && config_cmd="qm" + + # Get current IPs + local current_ips_full + if [[ "$type" == "lxc" ]]; then + current_ips_full=$(lxc-info -n "${vmid}" -i | awk '{print $2}') + else + current_ips_full=$(get_vm_ips "${vmid}") + fi + + # Parse current tags and get valid IPs + local current_tags=() + local next_tags=() + mapfile -t current_tags < <($config_cmd config "${vmid}" | grep tags | awk '{print $2}' | sed 's/;/\n/g') + + for tag in "${current_tags[@]}"; do + is_valid_ipv4 "${tag}" || next_tags+=("${tag}") + done + + # Add valid IPs to tags + for ip in ${current_ips_full}; do + is_valid_ipv4 "${ip}" && ip_in_cidrs "${ip}" "${CIDR_LIST[*]}" && next_tags+=("${ip}") + done + + # Update if changed + [[ "$(IFS=';'; echo "${current_tags[*]}")" != "$(IFS=';'; echo "${next_tags[*]}")" ]] && \ + $config_cmd set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" +} + +# Check if status changed +check_status_changed() { + local type="$1" + local current_status + + case "$type" in + "lxc") + current_status=$(pct list 2>/dev/null) + [[ "${last_lxc_status}" == "${current_status}" ]] && return 1 + last_lxc_status="${current_status}" + ;; + "vm") + current_status=$(qm list 2>/dev/null) + [[ "${last_vm_status}" == "${current_status}" ]] && return 1 + last_vm_status="${current_status}" + ;; + "fw") + current_status=$(ifconfig | grep "^fw") + [[ "${last_net_interface}" == "${current_status}" ]] && return 1 + last_net_interface="${current_status}" + ;; + esac + return 0 +} + +check() { + current_time=$(date +%s) + + # Check LXC status + time_since_last_lxc_status_check=$((current_time - last_lxc_status_check_time)) + if [[ "${LXC_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ + && [[ "${time_since_last_lxc_status_check}" -ge "${LXC_STATUS_CHECK_INTERVAL}" ]]; then + echo "Checking lxc status..." + last_lxc_status_check_time=${current_time} + if check_status_changed "lxc"; then + update_tags "lxc" "${vmid}" + last_update_lxc_time=${current_time} + fi + fi + + # Check VM status + time_since_last_vm_status_check=$((current_time - last_vm_status_check_time)) + if [[ "${VM_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ + && [[ "${time_since_last_vm_status_check}" -ge "${VM_STATUS_CHECK_INTERVAL}" ]]; then + echo "Checking vm status..." + last_vm_status_check_time=${current_time} + if check_status_changed "vm"; then + update_tags "vm" "${vmid}" + last_update_vm_time=${current_time} + fi + fi + + # Check network interface changes + time_since_last_fw_net_interface_check=$((current_time - last_fw_net_interface_check_time)) + if [[ "${FW_NET_INTERFACE_CHECK_INTERVAL}" -gt 0 ]] \ + && [[ "${time_since_last_fw_net_interface_check}" -ge "${FW_NET_INTERFACE_CHECK_INTERVAL}" ]]; then + echo "Checking fw net interface..." + last_fw_net_interface_check_time=${current_time} + if check_status_changed "fw"; then + update_tags "lxc" "${vmid}" + update_tags "vm" "${vmid}" + last_update_lxc_time=${current_time} + last_update_vm_time=${current_time} + fi + fi + + # Force update if needed + for type in "lxc" "vm"; do + local last_update_var="last_update_${type}_time" + local time_since_last_update=$((current_time - ${!last_update_var})) + if [ ${time_since_last_update} -ge ${FORCE_UPDATE_INTERVAL} ]; then + echo "Force updating ${type} iptags..." + case "$type" in + "lxc") update_tags "lxc" "${vmid}" ;; + "vm") update_tags "vm" "${vmid}" ;; + esac + eval "${last_update_var}=${current_time}" + fi + done +} + +# Initialize time variables +last_lxc_status_check_time=0 +last_vm_status_check_time=0 +last_fw_net_interface_check_time=0 +last_update_lxc_time=0 +last_update_vm_time=0 + +# main: Set the IP tags for all LXC containers and VMs +main() { + while true; do + check + sleep "${LOOP_INTERVAL}" + done +} + +main +EOF + chmod +x /opt/iptag/iptag + + # Update service file + cat </lib/systemd/system/iptag.service +[Unit] +Description=IP-Tag service +After=network.target + +[Service] +Type=simple +ExecStart=/opt/iptag/iptag +Restart=always + +[Install] +WantedBy=multi-user.target +EOF + + systemctl daemon-reload &>/dev/null + systemctl enable -q --now iptag.service &>/dev/null + msg_ok "Updated IP-Tag Scripts" +} + +# Main installation process +if check_service_exists; then + while true; do + read -p "IP-Tag service is already installed. Do you want to update it? (y/n): " yn + case $yn in + [Yy]*) + update_installation + exit 0 + ;; + [Nn]*) + msg_error "Installation cancelled." + exit 0 + ;; + *) msg_error "Please answer yes or no." ;; + esac + done +fi + +while true; do + read -p "This will install ${APP} on ${hostname}. Proceed? (y/n): " yn + case $yn in + [Yy]*) break ;; + [Nn]*) + msg_error "Installation cancelled." + exit + ;; + *) msg_error "Please answer yes or no." ;; + esac +done + +if ! pveversion | grep -Eq "pve-manager/8\.[0-3](\.[0-9]+)*"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + msg_error "⚠️ Requires Proxmox Virtual Environment Version 8.0 or later." + msg_error "Exiting..." + sleep 2 + exit +fi + +FILE_PATH="/usr/local/bin/iptag" +if [[ -f "$FILE_PATH" ]]; then + msg_info "The file already exists: '$FILE_PATH'. Skipping installation." + exit 0 +fi + +msg_info "Installing Dependencies" +apt-get update &>/dev/null +apt-get install -y ipcalc net-tools &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Setting up IP-Tag Scripts" +mkdir -p /opt/iptag +msg_ok "Setup IP-Tag Scripts" + +# Migrate config if needed +migrate_config + +msg_info "Setup Default Config" +if [[ ! -f /opt/iptag/iptag.conf ]]; then + cat </opt/iptag/iptag.conf +# Configuration file for LXC IP tagging + +# List of allowed CIDRs +CIDR_LIST=( + 192.168.0.0/16 + 172.16.0.0/12 + 10.0.0.0/8 + 100.64.0.0/10 +) + +# Interval settings (in seconds) +LOOP_INTERVAL=60 +VM_STATUS_CHECK_INTERVAL=60 +FW_NET_INTERFACE_CHECK_INTERVAL=60 +LXC_STATUS_CHECK_INTERVAL=60 +FORCE_UPDATE_INTERVAL=1800 +EOF + msg_ok "Setup default config" +else + msg_ok "Default config already exists" +fi + +msg_info "Setup Main Function" +if [[ ! -f /opt/iptag/iptag ]]; then + cat <<'EOF' >/opt/iptag/iptag +#!/bin/bash +# =============== CONFIGURATION =============== # +CONFIG_FILE="/opt/iptag/iptag.conf" + +# Load the configuration file if it exists +if [ -f "$CONFIG_FILE" ]; then + # shellcheck source=./iptag.conf + source "$CONFIG_FILE" +fi + +# Convert IP to integer for comparison +ip_to_int() { + local ip="$1" + local a b c d + IFS=. read -r a b c d <<< "${ip}" + echo "$((a << 24 | b << 16 | c << 8 | d))" +} + +# Check if IP is in CIDR +ip_in_cidr() { + local ip="$1" + local cidr="$2" + local ip_int=$(ip_to_int "$ip") + local netmask_int=$(ip_to_int "$(ipcalc -b "$cidr" | grep Broadcast | awk '{print $2}')") + [[ $((ip_int & netmask_int)) -eq $((ip_int & netmask_int)) ]] && return 0 || return 1 +} + +# Check if IP is in any CIDRs +ip_in_cidrs() { + local ip="$1" + local cidrs=() + mapfile -t cidrs < <(echo "$2" | tr ' ' '\n') + for cidr in "${cidrs[@]}"; do + ip_in_cidr "$ip" "$cidr" && return 0 + done + return 1 +} + +# Check if IP is valid +is_valid_ipv4() { + local ip="$1" + [[ "$ip" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]] || return 1 + local IFS='.' + read -ra parts <<< "$ip" + for part in "${parts[@]}"; do + [[ "$part" =~ ^[0-9]+$ ]] && ((part >= 0 && part <= 255)) || return 1 + done + return 0 +} + +lxc_status_changed() { + current_lxc_status=$(pct list 2>/dev/null) + if [ "${last_lxc_status}" == "${current_lxc_status}" ]; then + return 1 + else + last_lxc_status="${current_lxc_status}" + return 0 + fi +} + +vm_status_changed() { + current_vm_status=$(qm list 2>/dev/null) + if [ "${last_vm_status}" == "${current_vm_status}" ]; then + return 1 + else + last_vm_status="${current_vm_status}" + return 0 + fi +} + +fw_net_interface_changed() { + current_net_interface=$(ifconfig | grep "^fw") + if [ "${last_net_interface}" == "${current_net_interface}" ]; then + return 1 + else + last_net_interface="${current_net_interface}" + return 0 + fi +} + +# Get VM IPs using MAC addresses and ARP table +get_vm_ips() { + local vmid=$1 + local ips="" + + # Check if VM is running + qm status "$vmid" | grep -q "status: running" || return + + # Get MAC addresses from VM configuration + local macs + macs=$(qm config "$vmid" | grep -E 'net[0-9]+' | grep -o -E '[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}') + + # Look up IPs from ARP table using MAC addresses + for mac in $macs; do + local ip + ip=$(arp -an | grep -i "$mac" | grep -o -E '([0-9]{1,3}\.){3}[0-9]{1,3}') + if [ -n "$ip" ]; then + ips+="$ip " + fi + done + + echo "$ips" +} + +# Update tags for container or VM +update_tags() { + local type="$1" + local vmid="$2" + local config_cmd="pct" + [[ "$type" == "vm" ]] && config_cmd="qm" + + # Get current IPs + local current_ips_full + if [[ "$type" == "lxc" ]]; then + current_ips_full=$(lxc-info -n "${vmid}" -i | awk '{print $2}') + else + current_ips_full=$(get_vm_ips "${vmid}") + fi + + # Parse current tags and get valid IPs + local current_tags=() + local next_tags=() + mapfile -t current_tags < <($config_cmd config "${vmid}" | grep tags | awk '{print $2}' | sed 's/;/\n/g') + + for tag in "${current_tags[@]}"; do + is_valid_ipv4 "${tag}" || next_tags+=("${tag}") + done + + # Add valid IPs to tags + for ip in ${current_ips_full}; do + is_valid_ipv4 "${ip}" && ip_in_cidrs "${ip}" "${CIDR_LIST[*]}" && next_tags+=("${ip}") + done + + # Update if changed + [[ "$(IFS=';'; echo "${current_tags[*]}")" != "$(IFS=';'; echo "${next_tags[*]}")" ]] && \ + $config_cmd set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" +} + +check() { + current_time=$(date +%s) + + # Check LXC status + time_since_last_lxc_status_check=$((current_time - last_lxc_status_check_time)) + if [[ "${LXC_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ + && [[ "${time_since_last_lxc_status_check}" -ge "${LXC_STATUS_CHECK_INTERVAL}" ]]; then + echo "Checking lxc status..." + last_lxc_status_check_time=${current_time} + if check_status_changed "lxc"; then + update_tags "lxc" "${vmid}" + last_update_lxc_time=${current_time} + fi + fi + + # Check VM status + time_since_last_vm_status_check=$((current_time - last_vm_status_check_time)) + if [[ "${VM_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ + && [[ "${time_since_last_vm_status_check}" -ge "${VM_STATUS_CHECK_INTERVAL}" ]]; then + echo "Checking vm status..." + last_vm_status_check_time=${current_time} + if check_status_changed "vm"; then + update_tags "vm" "${vmid}" + last_update_vm_time=${current_time} + fi + fi + + # Check network interface changes + time_since_last_fw_net_interface_check=$((current_time - last_fw_net_interface_check_time)) + if [[ "${FW_NET_INTERFACE_CHECK_INTERVAL}" -gt 0 ]] \ + && [[ "${time_since_last_fw_net_interface_check}" -ge "${FW_NET_INTERFACE_CHECK_INTERVAL}" ]]; then + echo "Checking fw net interface..." + last_fw_net_interface_check_time=${current_time} + if check_status_changed "fw"; then + update_tags "lxc" "${vmid}" + update_tags "vm" "${vmid}" + last_update_lxc_time=${current_time} + last_update_vm_time=${current_time} + fi + fi + + # Force update if needed + for type in "lxc" "vm"; do + local last_update_var="last_update_${type}_time" + local time_since_last_update=$((current_time - ${!last_update_var})) + if [ ${time_since_last_update} -ge ${FORCE_UPDATE_INTERVAL} ]; then + echo "Force updating ${type} iptags..." + case "$type" in + "lxc") update_tags "lxc" "${vmid}" ;; + "vm") update_tags "vm" "${vmid}" ;; + esac + eval "${last_update_var}=${current_time}" + fi + done +} + +# Initialize time variables +last_lxc_status_check_time=0 +last_vm_status_check_time=0 +last_fw_net_interface_check_time=0 +last_update_lxc_time=0 +last_update_vm_time=0 + +# main: Set the IP tags for all LXC containers and VMs +main() { + while true; do + check + sleep "${LOOP_INTERVAL}" + done +} + +main +EOF + msg_ok "Setup Main Function" +else + msg_ok "Main Function already exists" +fi +chmod +x /opt/iptag/iptag + +msg_info "Creating Service" +if [[ ! -f /lib/systemd/system/iptag.service ]]; then + cat </lib/systemd/system/iptag.service +[Unit] +Description=IP-Tag service +After=network.target + +[Service] +Type=simple +ExecStart=/opt/iptag/iptag +Restart=always + +[Install] +WantedBy=multi-user.target +EOF + msg_ok "Created Service" +else + msg_ok "Service already exists." +fi + +msg_ok "Setup IP-Tag Scripts" + +msg_info "Starting Service" +systemctl daemon-reload &>/dev/null +systemctl enable -q --now iptag.service &>/dev/null +msg_ok "Started Service" +SPINNER_PID="" +echo -e "\n${APP} installation completed successfully! ${CL}\n" From 890bb7defa2d4cd223881c30f2d359b992b8f6f2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Mar 2025 17:07:49 +0200 Subject: [PATCH 0237/1614] fix nullable header --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index e97c6ec..c59ed6e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -300,7 +300,7 @@ get_header() { mkdir -p "/usr/local/community-scripts/headers" # Check if local file already present - if [ ! -f "$local_header_path" ]; then + if [ ! -s "$local_header_path" ]; then curl -fsSL "$header_url" -o "$local_header_path" if [ $? -ne 0 ]; then echo -e "${WARN}${BOLD}${YLW}Failed to download header for ${app_name}. No header will be displayed.${CL}" From 2d63b45848470d3df49fd6640339364214d11421 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Mon, 31 Mar 2025 11:45:24 -0400 Subject: [PATCH 0238/1614] add ip address output --- ct/openziti-tunnel.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/openziti-tunnel.sh b/ct/openziti-tunnel.sh index 0063f7f..43e28fa 100644 --- a/ct/openziti-tunnel.sh +++ b/ct/openziti-tunnel.sh @@ -39,4 +39,6 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" \ No newline at end of file +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Application was assigned the following IP:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}Address: ${IP}${CL}" \ No newline at end of file From 2b9f7db6737fd9b26900294de12b866ef6d644d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 18:48:39 +0000 Subject: [PATCH 0239/1614] Bump vite in /frontend in the npm_and_yarn group across 1 directory Bumps the npm_and_yarn group with 1 update in the /frontend directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). Updates `vite` from 6.2.3 to 6.2.4 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] --- frontend/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 0861bf0..86899cd 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -9665,9 +9665,9 @@ "license": "MIT" }, "node_modules/vite": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.3.tgz", - "integrity": "sha512-IzwM54g4y9JA/xAeBPNaDXiBF8Jsgl3VBQ2YQ/wOY6fyW3xMdSoltIV3Bo59DErdqdE6RxUfv8W69DvUorE4Eg==", + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.4.tgz", + "integrity": "sha512-veHMSew8CcRzhL5o8ONjy8gkfmFJAd5Ac16oxBUjlwgX3Gq2Wqr+qNC3TjPIpy7TPV/KporLga5GT9HqdrCizw==", "dev": true, "license": "MIT", "dependencies": { From ae8de861aa11b261a809fef101f35afb4fe8bb50 Mon Sep 17 00:00:00 2001 From: Arian Nasr <81041177+arian-nasr@users.noreply.github.com> Date: Mon, 31 Mar 2025 16:15:42 -0400 Subject: [PATCH 0240/1614] Update freepbx-install.sh Fix issue with output showing even when not verbose --- install/freepbx-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/freepbx-install.sh b/install/freepbx-install.sh index b81f798..df40b9f 100644 --- a/install/freepbx-install.sh +++ b/install/freepbx-install.sh @@ -143,8 +143,7 @@ tar zxf freepbx-17.0-latest-EDGE.tgz cd /usr/local/src/freepbx/ $STD ./start_asterisk start # Even though the php code completes successfully, it is returning non-zero exit code, so in the next line we return true, needed for successful installation -# For some reason the next line is outputting even when verbosity not enabled? -$STD ./install -n || true +./install -n &>/dev/null || true $STD fwconsole ma installall $STD fwconsole reload $STD fwconsole restart From 897901b83761f3341492fc7b26c595b90e91d577 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 09:20:28 +0200 Subject: [PATCH 0241/1614] cleanup --- ct/alpine-gitea.sh | 47 ---------------------------- ct/alpine-prometheus.sh | 46 --------------------------- install/alpine-gitea-install.sh | 40 ----------------------- install/alpine-prometheus-install.sh | 40 ----------------------- 4 files changed, 173 deletions(-) delete mode 100644 ct/alpine-gitea.sh delete mode 100644 ct/alpine-prometheus.sh delete mode 100644 install/alpine-gitea-install.sh delete mode 100644 install/alpine-prometheus-install.sh diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh deleted file mode 100644 index dedd6f0..0000000 --- a/ct/alpine-gitea.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/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: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://gitea.io - -APP="Alpine-Gitea" -var_tags="${var_tags:-alpine;git}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-256}" -var_disk="${var_disk:-1}" -var_os="${var_os:-alpine}" -var_version="${var_version:-3.21}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade - msg_ok "Updated Alpine Packages" - - msg_info "Updating Gitea" - $STD apk upgrade gitea - msg_ok "Updated Gitea" - - msg_info "Restarting Gitea" - $STD rc-service gitea restart - msg_ok "Restarted Gitea" - - exit 0 -} - -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}:3000${CL}" diff --git a/ct/alpine-prometheus.sh b/ct/alpine-prometheus.sh deleted file mode 100644 index bb3066e..0000000 --- a/ct/alpine-prometheus.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/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: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://prometheus.io/ - -APP="Alpine-Prometheus" -var_tags="${var_tags:-alpine;monitoring}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-256}" -var_disk="${var_disk:-1}" -var_os="${var_os:-alpine}" -var_version="${var_version:-3.21}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade - msg_ok "Updated Alpine Packages" - - msg_info "Updating Prometheus" - $STD apk upgrade prometheus - msg_ok "Updated Prometheus" - - msg_info "Restarting Prometheus" - $STD rc-service prometheus restart - msg_ok "Restarted Prometheus" - - exit 0 -} - -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}:9090${CL}" diff --git a/install/alpine-gitea-install.sh b/install/alpine-gitea-install.sh deleted file mode 100644 index 6db3c22..0000000 --- a/install/alpine-gitea-install.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://gitea.io/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies" -$STD apk add \ - newt \ - curl \ - openssh \ - nano \ - mc \ - gpg - -msg_ok "Installed Dependencies" - -msg_info "Installing Gitea" -$STD apk add --no-cache gitea -msg_ok "Installed Gitea" - -msg_info "Enabling Gitea Service" -$STD rc-update add gitea default -msg_ok "Enabled Gitea Service" - -msg_info "Starting Gitea" -$STD service gitea start -msg_ok "Started Gitea" - -motd_ssh -customize diff --git a/install/alpine-prometheus-install.sh b/install/alpine-prometheus-install.sh deleted file mode 100644 index 4bcb545..0000000 --- a/install/alpine-prometheus-install.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://prometheus.io/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies" -$STD apk add \ - newt \ - curl \ - openssh \ - nano \ - mc \ - gpg - -msg_ok "Installed Dependencies" - -msg_info "Installing Prometheus" -apk add --no-cache prometheus -msg_ok "Installed Prometheus" - -msg_info "Enabling Prometheus Service" -rc-update add prometheus default -msg_ok "Enabled Prometheus Service" - -msg_info "Starting Prometheus" -service prometheus start -msg_ok "Started Prometheus" - -motd_ssh -customize From d37aafca3895c2b87d1d39c419b5e246bf698c00 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 1 Apr 2025 07:20:45 +0000 Subject: [PATCH 0242/1614] Update .app files --- ct/headers/alpine-gitea | 6 ------ ct/headers/alpine-prometheus | 6 ------ 2 files changed, 12 deletions(-) delete mode 100644 ct/headers/alpine-gitea delete mode 100644 ct/headers/alpine-prometheus diff --git a/ct/headers/alpine-gitea b/ct/headers/alpine-gitea deleted file mode 100644 index 085b375..0000000 --- a/ct/headers/alpine-gitea +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ _ _______ __ - / | / /___ (_)___ ___ / ____(_) /____ ____ _ - / /| | / / __ \/ / __ \/ _ \______/ / __/ / __/ _ \/ __ `/ - / ___ |/ / /_/ / / / / / __/_____/ /_/ / / /_/ __/ /_/ / -/_/ |_/_/ .___/_/_/ /_/\___/ \____/_/\__/\___/\__,_/ - /_/ diff --git a/ct/headers/alpine-prometheus b/ct/headers/alpine-prometheus deleted file mode 100644 index 5934057..0000000 --- a/ct/headers/alpine-prometheus +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ _ ____ __ __ - / | / /___ (_)___ ___ / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ - / /| | / / __ \/ / __ \/ _ \______/ /_/ / ___/ __ \/ __ `__ \/ _ \/ __/ __ \/ _ \/ / / / ___/ - / ___ |/ / /_/ / / / / / __/_____/ ____/ / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ ) -/_/ |_/_/ .___/_/_/ /_/\___/ /_/ /_/ \____/_/ /_/ /_/\___/\__/_/ /_/\___/\__,_/____/ - /_/ From 47dee1ad5c716b9e2718ceb26fdfaa0c80a892a0 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 09:24:05 +0200 Subject: [PATCH 0243/1614] Update alpine-postgresql-install.sh --- install/alpine-postgresql-install.sh | 82 +++++++++++++++++++++------- 1 file changed, 61 insertions(+), 21 deletions(-) diff --git a/install/alpine-postgresql-install.sh b/install/alpine-postgresql-install.sh index a4ce2dc..ef3d05c 100644 --- a/install/alpine-postgresql-install.sh +++ b/install/alpine-postgresql-install.sh @@ -54,24 +54,65 @@ chmod +x $service_path rc-update add postgresql default msg_ok "Created PostgreSQL Service" +msg_info "Configuring PostgreSQL" +cat </var/lib/postgresql/data/pg_hba.conf +# PostgreSQL Client Authentication Configuration File +local all postgres peer +local all all md5 +host all all 127.0.0.1/32 scram-sha-256 +host all all 0.0.0.0/24 md5 +host all all ::1/128 scram-sha-256 +host all all 0.0.0.0/0 md5 +local replication all peer +host replication all 127.0.0.1/32 scram-sha-256 +host replication all ::1/128 scram-sha-256 +EOF + +cat </var/lib/postgresql/data/postgresql.conf +data_directory = '/var/lib/postgresql/data' +hba_file = '/var/lib/postgresql/data/pg_hba.conf' +ident_file = '/var/lib/postgresql/data/pg_ident.conf' +external_pid_file = '/var/run/postgresql.pid' +listen_addresses = '*' +port = 5432 +max_connections = 100 +unix_socket_directories = '/var/run/postgresql' +ssl = off +shared_buffers = 128MB +dynamic_shared_memory_type = posix +max_wal_size = 1GB +min_wal_size = 80MB +log_line_prefix = '%m [%p] %q%u@%d ' +log_timezone = 'Etc/UTC' +cluster_name = 'alpine_pg' +datestyle = 'iso, mdy' +timezone = 'Etc/UTC' +lc_messages = 'C' +lc_monetary = 'C' +lc_numeric = 'C' +lc_time = 'C' +default_text_search_config = 'pg_catalog.english' +include_dir = 'conf.d' +EOF +msg_ok "Configured PostgreSQL" + msg_info "Starting PostgreSQL" service postgresql start msg_ok "Started PostgreSQL" read -p "Do you want to install Adminer with Lighttpd? (y/N): " install_adminer - if [[ "$install_adminer" =~ ^[Yy]$ ]]; then +if [[ "$install_adminer" =~ ^[Yy]$ ]]; then msg_info "Installing Adminer with Lighttpd" - apk add --no-cache lighttpd php php-pdo_pgsql php-session php-json php-mbstring - msg_ok "Installed Lighttpd and PHP" + msg_ok "Installed Lighttpd and PHP" - msg_info "Downloading Adminer" - mkdir -p /var/www/adminer - curl -L "https://www.adminer.org/latest.php" -o /var/www/adminer/index.php - chown -R lighttpd:lighttpd /var/www/adminer - msg_ok "Installed Adminer" + msg_info "Downloading Adminer" + mkdir -p /var/www/adminer + curl -fsSL "https://www.adminer.org/latest.php" -o /var/www/adminer/index.php + chown -R lighttpd:lighttpd /var/www/adminer + msg_ok "Installed Adminer" - msg_info "Configuring Lighttpd" - echo 'server.modules = ( + msg_info "Configuring Lighttpd" + echo 'server.modules = ( "mod_access", "mod_alias", "mod_fastcgi" @@ -83,8 +124,8 @@ server.bind = "0.0.0.0" index-file.names = ("index.php") fastcgi.server = ( ".php" => (( - "bin-path" => "/usr/bin/php-cgi", - "socket" => "/var/run/php-fcgi.sock" + "bin-path" => "/usr/bin/php-cgi", + "socket" => "/var/run/php-fcgi.sock" ))) server.dir-listing = "disable" @@ -92,18 +133,17 @@ server.dir-listing = "disable" accesslog.filename = "/var/log/lighttpd/access.log" server.errorlog = "/var/log/lighttpd/error.log" -include "modules.conf"' > /etc/lighttpd/lighttpd.conf +include "modules.conf"' >/etc/lighttpd/lighttpd.conf - rc-update add lighttpd default - msg_ok "Configured Lighttpd" + rc-update add lighttpd default + msg_ok "Configured Lighttpd" - msg_info "Starting Lighttpd" - service lighttpd start - msg_ok "Started Lighttpd (Adminer available on Port 8080)" - else + msg_info "Starting Lighttpd" + service lighttpd start + msg_ok "Started Lighttpd (Adminer available on Port 8080)" +else msg_ok "Skipped Adminer and Lighttpd installation." - fi -} +fi motd_ssh customize From e86d849038e592f5655a13a4e0ddabe4bba006d8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 09:24:17 +0200 Subject: [PATCH 0244/1614] Update alpine-postgresql-install.sh --- install/alpine-postgresql-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-postgresql-install.sh b/install/alpine-postgresql-install.sh index ef3d05c..90b53fe 100644 --- a/install/alpine-postgresql-install.sh +++ b/install/alpine-postgresql-install.sh @@ -119,7 +119,7 @@ if [[ "$install_adminer" =~ ^[Yy]$ ]]; then ) server.document-root = "/var/www/adminer" -server.port = 8080 +server.port = 9000 server.bind = "0.0.0.0" index-file.names = ("index.php") From 3796146614999e4292ffff369eb30b4e73e3f4f8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 09:51:43 +0200 Subject: [PATCH 0245/1614] Update alpine-postgresql-install.sh --- install/alpine-postgresql-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install/alpine-postgresql-install.sh b/install/alpine-postgresql-install.sh index 90b53fe..15884ce 100644 --- a/install/alpine-postgresql-install.sh +++ b/install/alpine-postgresql-install.sh @@ -32,7 +32,7 @@ msg_ok "Installed PostgreSQL" msg_info "Initializing PostgreSQL Database" mkdir -p /var/lib/postgresql chown postgres:postgres /var/lib/postgresql -sudo -u postgres initdb -D /var/lib/postgresql/data +sudo -u postgres initdb -D /var/lib/postgresql/data --auth-local=md5 --auth-host=md5 msg_ok "Initialized PostgreSQL Database" msg_info "Creating PostgreSQL Service" @@ -55,6 +55,8 @@ rc-update add postgresql default msg_ok "Created PostgreSQL Service" msg_info "Configuring PostgreSQL" +mkdir -p /var/lib/postgresql/data/conf.d + cat </var/lib/postgresql/data/pg_hba.conf # PostgreSQL Client Authentication Configuration File local all postgres peer @@ -103,6 +105,7 @@ msg_ok "Started PostgreSQL" read -p "Do you want to install Adminer with Lighttpd? (y/N): " install_adminer if [[ "$install_adminer" =~ ^[Yy]$ ]]; then msg_info "Installing Adminer with Lighttpd" + apk add --no-cache php php-pdo_pgsql php-session php-json php-mbstring lighttpd msg_ok "Installed Lighttpd and PHP" msg_info "Downloading Adminer" From 723aa10c071cc0c6c15c9eb8b6256182085308ff Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 10:10:08 +0200 Subject: [PATCH 0246/1614] Update alpine-postgresql-install.sh --- install/alpine-postgresql-install.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/install/alpine-postgresql-install.sh b/install/alpine-postgresql-install.sh index 15884ce..f597dde 100644 --- a/install/alpine-postgresql-install.sh +++ b/install/alpine-postgresql-install.sh @@ -26,13 +26,13 @@ $STD apk add \ msg_ok "Installed Dependencies" msg_info "Installing PostgreSQL and Dependencies" -$STD apk add --no-cache postgresql postgresql-contrib +$STD apk add --no-cache postgresql17 postgresql17-contrib msg_ok "Installed PostgreSQL" msg_info "Initializing PostgreSQL Database" -mkdir -p /var/lib/postgresql -chown postgres:postgres /var/lib/postgresql -sudo -u postgres initdb -D /var/lib/postgresql/data --auth-local=md5 --auth-host=md5 +mkdir -p /var/lib/postgresql/17 +chown postgres:postgres /var/lib/postgresql/17 +sudo -u postgres initdb -D /var/lib/postgresql/17 --auth-local=md5 --auth-host=md5 --pwfile=<(printf "postgres") msg_ok "Initialized PostgreSQL Database" msg_info "Creating PostgreSQL Service" @@ -42,7 +42,7 @@ echo '#!/sbin/openrc-run description="PostgreSQL Database Server" command="/usr/bin/postgres" -command_args="-D /var/lib/postgresql/data" +command_args="-D /var/lib/postgresql/17" command_user="postgres" pidfile="/var/run/postgresql.pid" @@ -55,10 +55,9 @@ rc-update add postgresql default msg_ok "Created PostgreSQL Service" msg_info "Configuring PostgreSQL" -mkdir -p /var/lib/postgresql/data/conf.d +mkdir -p /var/lib/postgresql/17/conf.d -cat </var/lib/postgresql/data/pg_hba.conf -# PostgreSQL Client Authentication Configuration File +cat </var/lib/postgresql/17/pg_hba.conf local all postgres peer local all all md5 host all all 127.0.0.1/32 scram-sha-256 @@ -70,10 +69,10 @@ host replication all 127.0.0.1/32 scram-sha-256 host replication all ::1/128 scram-sha-256 EOF -cat </var/lib/postgresql/data/postgresql.conf -data_directory = '/var/lib/postgresql/data' -hba_file = '/var/lib/postgresql/data/pg_hba.conf' -ident_file = '/var/lib/postgresql/data/pg_ident.conf' +cat </var/lib/postgresql/17/postgresql.conf +data_directory = '/var/lib/postgresql/17' +hba_file = '/var/lib/postgresql/17/pg_hba.conf' +ident_file = '/var/lib/postgresql/17/pg_ident.conf' external_pid_file = '/var/run/postgresql.pid' listen_addresses = '*' port = 5432 @@ -122,7 +121,7 @@ if [[ "$install_adminer" =~ ^[Yy]$ ]]; then ) server.document-root = "/var/www/adminer" -server.port = 9000 +server.port = 8080 server.bind = "0.0.0.0" index-file.names = ("index.php") From 5ee954db42f8c65bc2d3a6f70d0105224624edce Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 10:25:26 +0200 Subject: [PATCH 0247/1614] Update alpine-postgresql-install.sh --- install/alpine-postgresql-install.sh | 99 +++++----------------------- 1 file changed, 17 insertions(+), 82 deletions(-) diff --git a/install/alpine-postgresql-install.sh b/install/alpine-postgresql-install.sh index f597dde..b91f499 100644 --- a/install/alpine-postgresql-install.sh +++ b/install/alpine-postgresql-install.sh @@ -13,94 +13,29 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apk add \ - newt \ - curl \ - openssh \ - sudo \ - nano \ - mc \ - gpg - -msg_ok "Installed Dependencies" - -msg_info "Installing PostgreSQL and Dependencies" -$STD apk add --no-cache postgresql17 postgresql17-contrib +msg_info "Installing PostgreSQL" +$STD apk add --no-cache postgresql16 postgresql16-contrib postgresql16-openrc msg_ok "Installed PostgreSQL" -msg_info "Initializing PostgreSQL Database" -mkdir -p /var/lib/postgresql/17 -chown postgres:postgres /var/lib/postgresql/17 -sudo -u postgres initdb -D /var/lib/postgresql/17 --auth-local=md5 --auth-host=md5 --pwfile=<(printf "postgres") -msg_ok "Initialized PostgreSQL Database" - -msg_info "Creating PostgreSQL Service" -service_path="/etc/init.d/postgresql" - -echo '#!/sbin/openrc-run -description="PostgreSQL Database Server" - -command="/usr/bin/postgres" -command_args="-D /var/lib/postgresql/17" -command_user="postgres" -pidfile="/var/run/postgresql.pid" - -depend() { - use net -}' >$service_path - -chmod +x $service_path +msg_info "Enabling PostgreSQL Service" rc-update add postgresql default -msg_ok "Created PostgreSQL Service" - -msg_info "Configuring PostgreSQL" -mkdir -p /var/lib/postgresql/17/conf.d - -cat </var/lib/postgresql/17/pg_hba.conf -local all postgres peer -local all all md5 -host all all 127.0.0.1/32 scram-sha-256 -host all all 0.0.0.0/24 md5 -host all all ::1/128 scram-sha-256 -host all all 0.0.0.0/0 md5 -local replication all peer -host replication all 127.0.0.1/32 scram-sha-256 -host replication all ::1/128 scram-sha-256 -EOF - -cat </var/lib/postgresql/17/postgresql.conf -data_directory = '/var/lib/postgresql/17' -hba_file = '/var/lib/postgresql/17/pg_hba.conf' -ident_file = '/var/lib/postgresql/17/pg_ident.conf' -external_pid_file = '/var/run/postgresql.pid' -listen_addresses = '*' -port = 5432 -max_connections = 100 -unix_socket_directories = '/var/run/postgresql' -ssl = off -shared_buffers = 128MB -dynamic_shared_memory_type = posix -max_wal_size = 1GB -min_wal_size = 80MB -log_line_prefix = '%m [%p] %q%u@%d ' -log_timezone = 'Etc/UTC' -cluster_name = 'alpine_pg' -datestyle = 'iso, mdy' -timezone = 'Etc/UTC' -lc_messages = 'C' -lc_monetary = 'C' -lc_numeric = 'C' -lc_time = 'C' -default_text_search_config = 'pg_catalog.english' -include_dir = 'conf.d' -EOF -msg_ok "Configured PostgreSQL" +msg_ok "Enabled PostgreSQL Service" msg_info "Starting PostgreSQL" -service postgresql start +rc-service postgresql start msg_ok "Started PostgreSQL" +msg_info "Configuring PostgreSQL for External Access" +conf_file="/etc/postgresql16/postgresql.conf" +hba_file="/etc/postgresql16/pg_hba.conf" + +sed -i 's/^#listen_addresses =.*/listen_addresses = '\''*'\''/' "$conf_file" + +sed -i '/^host\s\+all\s\+all\s\+127.0.0.1\/32\s\+md5/ s/.*/host all all 0.0.0.0\/0 md5/' "$hba_file" + +rc-service postgresql restart +msg_ok "Configured and Restarted PostgreSQL" + read -p "Do you want to install Adminer with Lighttpd? (y/N): " install_adminer if [[ "$install_adminer" =~ ^[Yy]$ ]]; then msg_info "Installing Adminer with Lighttpd" @@ -121,7 +56,7 @@ if [[ "$install_adminer" =~ ^[Yy]$ ]]; then ) server.document-root = "/var/www/adminer" -server.port = 8080 +server.port = 9000 server.bind = "0.0.0.0" index-file.names = ("index.php") From 62b2b3a84059fc5c0cdafaf1b965e7f246b74c82 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 13:34:02 +0200 Subject: [PATCH 0248/1614] testing --- install/ubuntu-install.sh | 105 +++++++++++++++++++++++++++++++++++++- misc/build.func | 53 ++++++++++++++++--- 2 files changed, 150 insertions(+), 8 deletions(-) diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index 08835d4..03a602c 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -19,6 +19,109 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" +msg_info "Check GH Releases" +echo "Getting 0xERR0R/blocky..." +RELEASE=$(check_gh_release 0xERR0R/blocky) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting aceberg/WatchYourLAN..." +RELEASE=$(check_gh_release aceberg/WatchYourLAN) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting actualbudget/actual-server..." +RELEASE=$(check_gh_release actualbudget/actual-server) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting agl/jbig2enc..." +RELEASE=$(check_gh_release agl/jbig2enc) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting alexta69/metube..." +RELEASE=$(check_gh_release alexta69/metube) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting AlexxIT/go2rtc..." +RELEASE=$(check_gh_release AlexxIT/go2rtc) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting apache/tika..." +RELEASE=$(check_gh_release apache/tika) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting ArtifexSoftware/ghostpdl-downloads..." +RELEASE=$(check_gh_release ArtifexSoftware/ghostpdl-downloads) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting Athou/commafeed..." +RELEASE=$(check_gh_release Athou/commafeed) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting authelia/authelia..." +RELEASE=$(check_gh_release authelia/authelia) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting azukaar/Cosmos-Server..." +RELEASE=$(check_gh_release azukaar/Cosmos-Server) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting bastienwirtz/homer..." +RELEASE=$(check_gh_release bastienwirtz/homer) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting benjaminjonard/koillection..." +RELEASE=$(check_gh_release benjaminjonard/koillection) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting benzino77/tasmocompiler..." +RELEASE=$(check_gh_release benzino77/tasmocompiler) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting blakeblackshear/frigate..." +RELEASE=$(check_gh_release blakeblackshear/frigate) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting bluenviron/mediamtx..." +RELEASE=$(check_gh_release bluenviron/mediamtx) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting BookStackApp/BookStack..." +RELEASE=$(check_gh_release BookStackApp/BookStack) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting browserless/chrome..." +RELEASE=$(check_gh_release browserless/chrome) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting Bubka/2FAuth..." +RELEASE=$(check_gh_release Bubka/2FAuth) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting caddyserver/xcaddy..." +RELEASE=$(check_gh_release caddyserver/xcaddy) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting clusterzx/paperless-ai..." +RELEASE=$(check_gh_release clusterzx/paperless-ai) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting cockpit-project/cockpit..." +RELEASE=$(check_gh_release cockpit-project/cockpit) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting community-scripts/ProxmoxVE..." +RELEASE=$(check_gh_release community-scripts/ProxmoxVE) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting CorentinTh/it-tools..." +RELEASE=$(check_gh_release CorentinTh/it-tools) || exit 1 +echo "Got Version: $RELEASE" + +echo "Getting dani-garcia/bw_web_builds..." +RELEASE=$(check_gh_release dani-garcia/bw_web_builds) || exit 1 +echo "Got Version: $RELEASE" + +msg_ok "Done" + motd_ssh customize diff --git a/misc/build.func b/misc/build.func index c59ed6e..dd4d4fa 100644 --- a/misc/build.func +++ b/misc/build.func @@ -291,22 +291,61 @@ update_motd_ip() { fi } +get_gh_release() { + local repo="$1" + local api_url="https://api.github.com/repos/$repo/releases/latest" + local header=() + + # Ensure jq is installed + if ! command -v jq &>/dev/null; then + msg_info "Installing jq (required for GitHub API parsing)" + apt-get update &>/dev/null + apt-get install -y jq &>/dev/null && msg_ok "jq installed" || { + msg_error "Failed to install jq" + return 1 + } + fi + + # Optional: GitHub Token for higher rate limit + [[ -n "$GITHUB_TOKEN" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") + + # Info output + msg_info "Fetching GitHub release for $repo" + local api_response + if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then + msg_error "Request failed for $repo" + return 1 + fi + + # Extract release tag + local tag + tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + + if [[ -z "$tag" ]]; then + msg_error "No release tag found for $repo" + return 1 + fi + + msg_ok "Found release: $tag for $repo" + echo "$tag" +} + # Function to download & save header files get_header() { - local app_name=$(echo ${APP,,} | tr -d ' ') - local header_url="https://github.com/community-scripts/ProxmoxVED/raw/main/ct/headers/${app_name}" + local app_name=$(echo "${APP,,}" | tr -d ' ') + local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/headers/${app_name}" local local_header_path="/usr/local/community-scripts/headers/${app_name}" - mkdir -p "/usr/local/community-scripts/headers" + mkdir -p "$(dirname "$local_header_path")" - # Check if local file already present if [ ! -s "$local_header_path" ]; then - curl -fsSL "$header_url" -o "$local_header_path" - if [ $? -ne 0 ]; then - echo -e "${WARN}${BOLD}${YLW}Failed to download header for ${app_name}. No header will be displayed.${CL}" + if ! curl -fsSL "$header_url" -o "$local_header_path"; then + echo -e "${WARN:-}[WARN]${BOLD:-}${YLW:-} Failed to download header for ${app_name}. No header will be displayed.${CL:-}" return 1 fi fi + cat "$local_header_path" } From 37194a57245e2fba56c0c056938954d3f8544adb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 13:34:15 +0200 Subject: [PATCH 0249/1614] Update ubuntu-install.sh --- install/ubuntu-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index 03a602c..8f17dd2 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -16,7 +16,7 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo -$STD apt-get install -y mc +$STD apt-get install -y jq msg_ok "Installed Dependencies" msg_info "Check GH Releases" From 46cc7c99f7f448ffd300fbe4d3a2a0fd30ac8d72 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 13:47:17 +0200 Subject: [PATCH 0250/1614] Update ubuntu-install.sh --- install/ubuntu-install.sh | 50 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index 8f17dd2..5b9b8ff 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -21,103 +21,103 @@ msg_ok "Installed Dependencies" msg_info "Check GH Releases" echo "Getting 0xERR0R/blocky..." -RELEASE=$(check_gh_release 0xERR0R/blocky) || exit 1 +RELEASE=$(get_gh_release 0xERR0R/blocky) || exit 1 echo "Got Version: $RELEASE" echo "Getting aceberg/WatchYourLAN..." -RELEASE=$(check_gh_release aceberg/WatchYourLAN) || exit 1 +RELEASE=$(get_gh_release aceberg/WatchYourLAN) || exit 1 echo "Got Version: $RELEASE" echo "Getting actualbudget/actual-server..." -RELEASE=$(check_gh_release actualbudget/actual-server) || exit 1 +RELEASE=$(get_gh_release actualbudget/actual-server) || exit 1 echo "Got Version: $RELEASE" echo "Getting agl/jbig2enc..." -RELEASE=$(check_gh_release agl/jbig2enc) || exit 1 +RELEASE=$(get_gh_release agl/jbig2enc) || exit 1 echo "Got Version: $RELEASE" echo "Getting alexta69/metube..." -RELEASE=$(check_gh_release alexta69/metube) || exit 1 +RELEASE=$(get_gh_release alexta69/metube) || exit 1 echo "Got Version: $RELEASE" echo "Getting AlexxIT/go2rtc..." -RELEASE=$(check_gh_release AlexxIT/go2rtc) || exit 1 +RELEASE=$(get_gh_release AlexxIT/go2rtc) || exit 1 echo "Got Version: $RELEASE" echo "Getting apache/tika..." -RELEASE=$(check_gh_release apache/tika) || exit 1 +RELEASE=$(get_gh_release apache/tika) || exit 1 echo "Got Version: $RELEASE" echo "Getting ArtifexSoftware/ghostpdl-downloads..." -RELEASE=$(check_gh_release ArtifexSoftware/ghostpdl-downloads) || exit 1 +RELEASE=$(get_gh_release ArtifexSoftware/ghostpdl-downloads) || exit 1 echo "Got Version: $RELEASE" echo "Getting Athou/commafeed..." -RELEASE=$(check_gh_release Athou/commafeed) || exit 1 +RELEASE=$(get_gh_release Athou/commafeed) || exit 1 echo "Got Version: $RELEASE" echo "Getting authelia/authelia..." -RELEASE=$(check_gh_release authelia/authelia) || exit 1 +RELEASE=$(get_gh_release authelia/authelia) || exit 1 echo "Got Version: $RELEASE" echo "Getting azukaar/Cosmos-Server..." -RELEASE=$(check_gh_release azukaar/Cosmos-Server) || exit 1 +RELEASE=$(get_gh_release azukaar/Cosmos-Server) || exit 1 echo "Got Version: $RELEASE" echo "Getting bastienwirtz/homer..." -RELEASE=$(check_gh_release bastienwirtz/homer) || exit 1 +RELEASE=$(get_gh_release bastienwirtz/homer) || exit 1 echo "Got Version: $RELEASE" echo "Getting benjaminjonard/koillection..." -RELEASE=$(check_gh_release benjaminjonard/koillection) || exit 1 +RELEASE=$(get_gh_release benjaminjonard/koillection) || exit 1 echo "Got Version: $RELEASE" echo "Getting benzino77/tasmocompiler..." -RELEASE=$(check_gh_release benzino77/tasmocompiler) || exit 1 +RELEASE=$(get_gh_release benzino77/tasmocompiler) || exit 1 echo "Got Version: $RELEASE" echo "Getting blakeblackshear/frigate..." -RELEASE=$(check_gh_release blakeblackshear/frigate) || exit 1 +RELEASE=$(get_gh_release blakeblackshear/frigate) || exit 1 echo "Got Version: $RELEASE" echo "Getting bluenviron/mediamtx..." -RELEASE=$(check_gh_release bluenviron/mediamtx) || exit 1 +RELEASE=$(get_gh_release bluenviron/mediamtx) || exit 1 echo "Got Version: $RELEASE" echo "Getting BookStackApp/BookStack..." -RELEASE=$(check_gh_release BookStackApp/BookStack) || exit 1 +RELEASE=$(get_gh_release BookStackApp/BookStack) || exit 1 echo "Got Version: $RELEASE" echo "Getting browserless/chrome..." -RELEASE=$(check_gh_release browserless/chrome) || exit 1 +RELEASE=$(get_gh_release browserless/chrome) || exit 1 echo "Got Version: $RELEASE" echo "Getting Bubka/2FAuth..." -RELEASE=$(check_gh_release Bubka/2FAuth) || exit 1 +RELEASE=$(get_gh_release Bubka/2FAuth) || exit 1 echo "Got Version: $RELEASE" echo "Getting caddyserver/xcaddy..." -RELEASE=$(check_gh_release caddyserver/xcaddy) || exit 1 +RELEASE=$(get_gh_release caddyserver/xcaddy) || exit 1 echo "Got Version: $RELEASE" echo "Getting clusterzx/paperless-ai..." -RELEASE=$(check_gh_release clusterzx/paperless-ai) || exit 1 +RELEASE=$(get_gh_release clusterzx/paperless-ai) || exit 1 echo "Got Version: $RELEASE" echo "Getting cockpit-project/cockpit..." -RELEASE=$(check_gh_release cockpit-project/cockpit) || exit 1 +RELEASE=$(get_gh_release cockpit-project/cockpit) || exit 1 echo "Got Version: $RELEASE" echo "Getting community-scripts/ProxmoxVE..." -RELEASE=$(check_gh_release community-scripts/ProxmoxVE) || exit 1 +RELEASE=$(get_gh_release community-scripts/ProxmoxVE) || exit 1 echo "Got Version: $RELEASE" echo "Getting CorentinTh/it-tools..." -RELEASE=$(check_gh_release CorentinTh/it-tools) || exit 1 +RELEASE=$(get_gh_release CorentinTh/it-tools) || exit 1 echo "Got Version: $RELEASE" echo "Getting dani-garcia/bw_web_builds..." -RELEASE=$(check_gh_release dani-garcia/bw_web_builds) || exit 1 +RELEASE=$(get_gh_release dani-garcia/bw_web_builds) || exit 1 echo "Got Version: $RELEASE" msg_ok "Done" From f0dd9cc600abfda279857ca7bcf840217a20cee2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 15:45:48 +0200 Subject: [PATCH 0251/1614] move to install --- misc/build.func | 2506 ++++++++++++++++++++++----------------------- misc/install.func | 40 + 2 files changed, 1273 insertions(+), 1273 deletions(-) diff --git a/misc/build.func b/misc/build.func index dd4d4fa..5a70a74 100644 --- a/misc/build.func +++ b/misc/build.func @@ -5,82 +5,82 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE variables() { - NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. - var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. - INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern. - PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase - DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. - METHOD="default" # sets the METHOD variable to "default", used for the API call. - RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. + NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. + var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. + INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern. + PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase + DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. + METHOD="default" # sets the METHOD variable to "default", used for the API call. + RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { - # Colors - YW=$(echo "\033[33m") - YWB=$(echo "\033[93m") - BL=$(echo "\033[36m") - RD=$(echo "\033[01;31m") - BGN=$(echo "\033[4;92m") - GN=$(echo "\033[1;92m") - DGN=$(echo "\033[32m") + # Colors + YW=$(echo "\033[33m") + YWB=$(echo "\033[93m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") - # Formatting - CL=$(echo "\033[m") - BOLD=$(echo "\033[1m") - HOLD=" " - TAB=" " + # Formatting + CL=$(echo "\033[m") + BOLD=$(echo "\033[1m") + HOLD=" " + TAB=" " - # Icons - CM="${TAB}✔️${TAB}" - CROSS="${TAB}✖️${TAB}${CL}" - INFO="${TAB}💡${TAB}${CL}" - OS="${TAB}🖥️${TAB}${CL}" - OSVERSION="${TAB}🌟${TAB}${CL}" - CONTAINERTYPE="${TAB}📦${TAB}${CL}" - DISKSIZE="${TAB}💾${TAB}${CL}" - CPUCORE="${TAB}🧠${TAB}${CL}" - RAMSIZE="${TAB}🛠️${TAB}${CL}" - SEARCH="${TAB}🔍${TAB}${CL}" - VERIFYPW="${TAB}🔐${TAB}${CL}" - CONTAINERID="${TAB}🆔${TAB}${CL}" - HOSTNAME="${TAB}🏠${TAB}${CL}" - BRIDGE="${TAB}🌉${TAB}${CL}" - NETWORK="${TAB}📡${TAB}${CL}" - GATEWAY="${TAB}🌐${TAB}${CL}" - DISABLEIPV6="${TAB}🚫${TAB}${CL}" - DEFAULT="${TAB}⚙️${TAB}${CL}" - MACADDRESS="${TAB}🔗${TAB}${CL}" - VLANTAG="${TAB}🏷️${TAB}${CL}" - ROOTSSH="${TAB}🔑${TAB}${CL}" - CREATING="${TAB}🚀${TAB}${CL}" - ADVANCED="${TAB}🧩${TAB}${CL}" - FUSE="${TAB}🔧${TAB}${CL}" + # Icons + CM="${TAB}✔️${TAB}" + CROSS="${TAB}✖️${TAB}${CL}" + INFO="${TAB}💡${TAB}${CL}" + OS="${TAB}🖥️${TAB}${CL}" + OSVERSION="${TAB}🌟${TAB}${CL}" + CONTAINERTYPE="${TAB}📦${TAB}${CL}" + DISKSIZE="${TAB}💾${TAB}${CL}" + CPUCORE="${TAB}🧠${TAB}${CL}" + RAMSIZE="${TAB}🛠️${TAB}${CL}" + SEARCH="${TAB}🔍${TAB}${CL}" + VERIFYPW="${TAB}🔐${TAB}${CL}" + CONTAINERID="${TAB}🆔${TAB}${CL}" + HOSTNAME="${TAB}🏠${TAB}${CL}" + BRIDGE="${TAB}🌉${TAB}${CL}" + NETWORK="${TAB}📡${TAB}${CL}" + GATEWAY="${TAB}🌐${TAB}${CL}" + DISABLEIPV6="${TAB}🚫${TAB}${CL}" + DEFAULT="${TAB}⚙️${TAB}${CL}" + MACADDRESS="${TAB}🔗${TAB}${CL}" + VLANTAG="${TAB}🏷️${TAB}${CL}" + ROOTSSH="${TAB}🔑${TAB}${CL}" + CREATING="${TAB}🚀${TAB}${CL}" + ADVANCED="${TAB}🧩${TAB}${CL}" + FUSE="${TAB}🔧${TAB}${CL}" } # This function enables error handling in the script by setting options and defining a trap for the ERR signal. catch_errors() { - set -Eeuo pipefail - trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } # 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://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi - printf "\e[?25h" - local exit_code="$?" - local line_number="$1" - local command="$2" - ## 26.03.2025 alpine bug - #local error_description="$(get_error_description "$exit_code")" - #local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" - #post_update_to_api "failed" "$exit_code" "$error_description" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - post_update_to_api "failed" "${command}" - echo -e "\n$error_message\n" + source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi + printf "\e[?25h" + local exit_code="$?" + local line_number="$1" + local command="$2" + ## 26.03.2025 alpine bug + #local error_description="$(get_error_description "$exit_code")" + #local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" + #post_update_to_api "failed" "$exit_code" "$error_description" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + post_update_to_api "failed" "${command}" + echo -e "\n$error_message\n" } # This function displays an informational message with logging support. @@ -92,822 +92,782 @@ SPINNER_MSG="" trap 'stop_spinner' EXIT INT TERM HUP start_spinner() { - local msg="$1" - local frames=(⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏) - local spin_i=0 - local interval=0.1 + local msg="$1" + local frames=(⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏) + local spin_i=0 + local interval=0.1 - SPINNER_MSG="$msg" - printf "\r\e[2K" >&2 + SPINNER_MSG="$msg" + printf "\r\e[2K" >&2 - { - while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do - printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 - spin_i=$(((spin_i + 1) % ${#frames[@]})) - sleep "$interval" - done - } & + { + while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do + printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 + spin_i=$(((spin_i + 1) % ${#frames[@]})) + sleep "$interval" + done + } & - SPINNER_PID=$! - disown "$SPINNER_PID" + SPINNER_PID=$! + disown "$SPINNER_PID" } stop_spinner() { - if [[ ${SPINNER_PID+v} && -n "$SPINNER_PID" ]] && kill -0 "$SPINNER_PID" 2>/dev/null; then - kill "$SPINNER_PID" 2>/dev/null - sleep 0.1 - kill -0 "$SPINNER_PID" 2>/dev/null && kill -9 "$SPINNER_PID" 2>/dev/null - wait "$SPINNER_PID" 2>/dev/null || true - fi - SPINNER_ACTIVE=0 - unset SPINNER_PID + if [[ ${SPINNER_PID+v} && -n "$SPINNER_PID" ]] && kill -0 "$SPINNER_PID" 2>/dev/null; then + kill "$SPINNER_PID" 2>/dev/null + sleep 0.1 + kill -0 "$SPINNER_PID" 2>/dev/null && kill -9 "$SPINNER_PID" 2>/dev/null + wait "$SPINNER_PID" 2>/dev/null || true + fi + SPINNER_ACTIVE=0 + unset SPINNER_PID } spinner_guard() { - if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "$SPINNER_PID" ]]; then - kill "$SPINNER_PID" 2>/dev/null - wait "$SPINNER_PID" 2>/dev/null || true - SPINNER_ACTIVE=0 - unset SPINNER_PID - fi + if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "$SPINNER_PID" ]]; then + kill "$SPINNER_PID" 2>/dev/null + wait "$SPINNER_PID" 2>/dev/null || true + SPINNER_ACTIVE=0 + unset SPINNER_PID + fi } msg_info() { - local msg="$1" - [[ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]] && return - MSG_INFO_SHOWN["$msg"]=1 + local msg="$1" + [[ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]] && return + MSG_INFO_SHOWN["$msg"]=1 - spinner_guard - SPINNER_ACTIVE=1 - start_spinner "$msg" + spinner_guard + SPINNER_ACTIVE=1 + start_spinner "$msg" } msg_ok() { - local msg="$1" - stop_spinner - printf "\r\e[2K%s %b\n" "${CM}" "${GN}${msg}${CL}" >&2 - unset MSG_INFO_SHOWN["$msg"] + local msg="$1" + stop_spinner + printf "\r\e[2K%s %b\n" "${CM}" "${GN}${msg}${CL}" >&2 + unset MSG_INFO_SHOWN["$msg"] } msg_error() { - stop_spinner - local msg="$1" - printf "\r\e[2K%s %b\n" "${CROSS}" "${RD}${msg}${CL}" >&2 - log_message "ERROR" "$msg" + stop_spinner + local msg="$1" + printf "\r\e[2K%s %b\n" "${CROSS}" "${RD}${msg}${CL}" >&2 + log_message "ERROR" "$msg" } log_message() { - local level="$1" - local message="$2" - local timestamp - local logdate - timestamp=$(date '+%Y-%m-%d %H:%M:%S') - logdate=$(date '+%Y-%m-%d') + local level="$1" + local message="$2" + local timestamp + local logdate + timestamp=$(date '+%Y-%m-%d %H:%M:%S') + logdate=$(date '+%Y-%m-%d') - LOGDIR="/usr/local/community-scripts/logs" - mkdir -p "$LOGDIR" + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" - LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log" - echo "$timestamp - $level: $message" >>"$LOGFILE" + LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log" + echo "$timestamp - $level: $message" >>"$LOGFILE" } # Check if the shell is using bash shell_check() { - if [[ "$(basename "$SHELL")" != "bash" ]]; then - clear - msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell." - echo -e "\nExiting..." - sleep 2 - exit - fi + if [[ "$(basename "$SHELL")" != "bash" ]]; then + clear + msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell." + echo -e "\nExiting..." + sleep 2 + exit + fi } # Run as root only root_check() { - if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then - clear - msg_error "Please run this script as root." - echo -e "\nExiting..." - sleep 2 - exit - fi + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi } # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { - if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then - msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" - echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." - echo -e "Exiting..." - sleep 2 - exit - fi + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then + msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." + echo -e "Exiting..." + sleep 2 + exit + fi } # When a node is running tens of containers, it's possible to exceed the kernel's cryptographic key storage allocations. # These are tuneable, so verify if the currently deployment is approaching the limits, advise the user on how to tune the limits, and exit the script. # https://cleveruptime.com/docs/files/proc-key-users | https://docs.kernel.org/security/keys/core.html maxkeys_check() { - # Read kernel parameters - per_user_maxkeys=$(cat /proc/sys/kernel/keys/maxkeys 2>/dev/null || echo 0) - per_user_maxbytes=$(cat /proc/sys/kernel/keys/maxbytes 2>/dev/null || echo 0) + # Read kernel parameters + per_user_maxkeys=$(cat /proc/sys/kernel/keys/maxkeys 2>/dev/null || echo 0) + per_user_maxbytes=$(cat /proc/sys/kernel/keys/maxbytes 2>/dev/null || echo 0) - # Exit if kernel parameters are unavailable - if [[ "$per_user_maxkeys" -eq 0 || "$per_user_maxbytes" -eq 0 ]]; then - echo -e "${CROSS}${RD} Error: Unable to read kernel parameters. Ensure proper permissions.${CL}" - exit 1 - fi + # Exit if kernel parameters are unavailable + if [[ "$per_user_maxkeys" -eq 0 || "$per_user_maxbytes" -eq 0 ]]; then + echo -e "${CROSS}${RD} Error: Unable to read kernel parameters. Ensure proper permissions.${CL}" + exit 1 + fi - # Fetch key usage for user ID 100000 (typical for containers) - used_lxc_keys=$(awk '/100000:/ {print $2}' /proc/key-users 2>/dev/null || echo 0) - used_lxc_bytes=$(awk '/100000:/ {split($5, a, "/"); print a[1]}' /proc/key-users 2>/dev/null || echo 0) + # Fetch key usage for user ID 100000 (typical for containers) + used_lxc_keys=$(awk '/100000:/ {print $2}' /proc/key-users 2>/dev/null || echo 0) + used_lxc_bytes=$(awk '/100000:/ {split($5, a, "/"); print a[1]}' /proc/key-users 2>/dev/null || echo 0) - # Calculate thresholds and suggested new limits - threshold_keys=$((per_user_maxkeys - 100)) - threshold_bytes=$((per_user_maxbytes - 1000)) - new_limit_keys=$((per_user_maxkeys * 2)) - new_limit_bytes=$((per_user_maxbytes * 2)) + # Calculate thresholds and suggested new limits + threshold_keys=$((per_user_maxkeys - 100)) + threshold_bytes=$((per_user_maxbytes - 1000)) + new_limit_keys=$((per_user_maxkeys * 2)) + new_limit_bytes=$((per_user_maxbytes * 2)) - # Check if key or byte usage is near limits - failure=0 - if [[ "$used_lxc_keys" -gt "$threshold_keys" ]]; then - echo -e "${CROSS}${RD} Warning: Key usage is near the limit (${used_lxc_keys}/${per_user_maxkeys}).${CL}" - echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxkeys=${new_limit_keys}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." - failure=1 - fi - if [[ "$used_lxc_bytes" -gt "$threshold_bytes" ]]; then - echo -e "${CROSS}${RD} Warning: Key byte usage is near the limit (${used_lxc_bytes}/${per_user_maxbytes}).${CL}" - echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxbytes=${new_limit_bytes}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." - failure=1 - fi + # Check if key or byte usage is near limits + failure=0 + if [[ "$used_lxc_keys" -gt "$threshold_keys" ]]; then + echo -e "${CROSS}${RD} Warning: Key usage is near the limit (${used_lxc_keys}/${per_user_maxkeys}).${CL}" + echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxkeys=${new_limit_keys}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." + failure=1 + fi + if [[ "$used_lxc_bytes" -gt "$threshold_bytes" ]]; then + echo -e "${CROSS}${RD} Warning: Key byte usage is near the limit (${used_lxc_bytes}/${per_user_maxbytes}).${CL}" + echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxbytes=${new_limit_bytes}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." + failure=1 + fi - # Provide next steps if issues are detected - if [[ "$failure" -eq 1 ]]; then - echo -e "${INFO} To apply changes, run: ${BOLD}service procps force-reload${CL}" - exit 1 - fi + # Provide next steps if issues are detected + if [[ "$failure" -eq 1 ]]; then + echo -e "${INFO} To apply changes, run: ${BOLD}service procps force-reload${CL}" + exit 1 + fi - echo -e "${CM}${GN} All kernel key limits are within safe thresholds.${CL}" + echo -e "${CM}${GN} All kernel key limits are within safe thresholds.${CL}" } # This function checks the system architecture and exits if it's not "amd64". arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" - echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" - echo -e "Exiting..." - sleep 2 - exit - fi + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" + echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" + echo -e "Exiting..." + sleep 2 + exit + fi } # Function to get the current IP address based on the distribution get_current_ip() { - if [ -f /etc/os-release ]; then - # Check for Debian/Ubuntu (uses hostname -I) - if grep -qE 'ID=debian|ID=ubuntu' /etc/os-release; then - CURRENT_IP=$(hostname -I | awk '{print $1}') - # Check for Alpine (uses ip command) - elif grep -q 'ID=alpine' /etc/os-release; then - CURRENT_IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1) - else - CURRENT_IP="Unknown" - fi + if [ -f /etc/os-release ]; then + # Check for Debian/Ubuntu (uses hostname -I) + if grep -qE 'ID=debian|ID=ubuntu' /etc/os-release; then + CURRENT_IP=$(hostname -I | awk '{print $1}') + # Check for Alpine (uses ip command) + elif grep -q 'ID=alpine' /etc/os-release; then + CURRENT_IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1) + else + CURRENT_IP="Unknown" fi - echo "$CURRENT_IP" + fi + echo "$CURRENT_IP" } # Function to update the IP address in the MOTD file update_motd_ip() { - MOTD_FILE="/etc/motd" + MOTD_FILE="/etc/motd" - if [ -f "$MOTD_FILE" ]; then - # Remove existing IP Address lines to prevent duplication - sed -i '/IP Address:/d' "$MOTD_FILE" + if [ -f "$MOTD_FILE" ]; then + # Remove existing IP Address lines to prevent duplication + sed -i '/IP Address:/d' "$MOTD_FILE" - IP=$(get_current_ip) - # Add the new IP address - echo -e "${TAB}${NETWORK}${YW} IP Address: ${GN}${IP}${CL}" >>"$MOTD_FILE" - fi -} - -get_gh_release() { - local repo="$1" - local api_url="https://api.github.com/repos/$repo/releases/latest" - local header=() - - # Ensure jq is installed - if ! command -v jq &>/dev/null; then - msg_info "Installing jq (required for GitHub API parsing)" - apt-get update &>/dev/null - apt-get install -y jq &>/dev/null && msg_ok "jq installed" || { - msg_error "Failed to install jq" - return 1 - } - fi - - # Optional: GitHub Token for higher rate limit - [[ -n "$GITHUB_TOKEN" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") - - # Info output - msg_info "Fetching GitHub release for $repo" - local api_response - if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then - msg_error "Request failed for $repo" - return 1 - fi - - # Extract release tag - local tag - tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') - [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" - - if [[ -z "$tag" ]]; then - msg_error "No release tag found for $repo" - return 1 - fi - - msg_ok "Found release: $tag for $repo" - echo "$tag" + IP=$(get_current_ip) + # Add the new IP address + echo -e "${TAB}${NETWORK}${YW} IP Address: ${GN}${IP}${CL}" >>"$MOTD_FILE" + fi } # Function to download & save header files get_header() { - local app_name=$(echo "${APP,,}" | tr -d ' ') - local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/headers/${app_name}" - local local_header_path="/usr/local/community-scripts/headers/${app_name}" + local app_name=$(echo "${APP,,}" | tr -d ' ') + local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/headers/${app_name}" + local local_header_path="/usr/local/community-scripts/headers/${app_name}" - mkdir -p "$(dirname "$local_header_path")" + mkdir -p "$(dirname "$local_header_path")" - if [ ! -s "$local_header_path" ]; then - if ! curl -fsSL "$header_url" -o "$local_header_path"; then - echo -e "${WARN:-}[WARN]${BOLD:-}${YLW:-} Failed to download header for ${app_name}. No header will be displayed.${CL:-}" - return 1 - fi + if [ ! -s "$local_header_path" ]; then + if ! curl -fsSL "$header_url" -o "$local_header_path"; then + echo -e "${WARN:-}[WARN]${BOLD:-}${YLW:-} Failed to download header for ${app_name}. No header will be displayed.${CL:-}" + return 1 fi + fi - cat "$local_header_path" + cat "$local_header_path" } # This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node. header_info() { - local app_name=$(echo ${APP,,} | tr -d ' ') - local header_content + local app_name=$(echo ${APP,,} | tr -d ' ') + local header_content - # Download & save Header-File locally - header_content=$(get_header "$app_name") - if [ $? -ne 0 ]; then - # Fallback: Doesn't show Header - return 0 - fi + # Download & save Header-File locally + header_content=$(get_header "$app_name") + if [ $? -ne 0 ]; then + # Fallback: Doesn't show Header + return 0 + fi - # Show ASCII-Header - term_width=$(tput cols 2>/dev/null || echo 120) - clear - echo "$header_content" + # Show ASCII-Header + term_width=$(tput cols 2>/dev/null || echo 120) + clear + echo "$header_content" } # This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit. ssh_check() { - if [[ -n "${SSH_CLIENT:+x}" ]]; then - dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "SSH DETECTED" \ - --yesno "It's advisable to utilize the Proxmox shell rather than SSH,\nas there may be potential complications with variable retrieval.\n\nProceed using SSH?" 12 72 \ - --ok-label "Yes" --cancel-label "No" + if [[ -n "${SSH_CLIENT:+x}" ]]; then + dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "SSH DETECTED" \ + --yesno "It's advisable to utilize the Proxmox shell rather than SSH,\nas there may be potential complications with variable retrieval.\n\nProceed using SSH?" 12 72 \ + --ok-label "Yes" --cancel-label "No" - case $? in - 0) - dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "Proceed using SSH" \ - --msgbox "You've chosen to proceed using SSH.\n\nIf any issues arise, please run the script in the Proxmox shell before creating a repository issue." 10 72 - ;; - 1 | 255) - clear - printf "%s\n" "Exiting due to SSH usage. Please consider using the Proxmox shell." - exit - ;; - esac - fi + case $? in + 0) + dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ + --title "Proceed using SSH" \ + --msgbox "You've chosen to proceed using SSH.\n\nIf any issues arise, please run the script in the Proxmox shell before creating a repository issue." 10 72 + ;; + 1 | 255) + clear + printf "%s\n" "Exiting due to SSH usage. Please consider using the Proxmox shell." + exit + ;; + esac + fi } base_settings() { - # Default Settings - CT_TYPE="1" - DISK_SIZE="4" - CORE_COUNT="1" - RAM_SIZE="1024" - VERBOSE="${1:-no}" - PW="" - CT_ID=$NEXTID - HN=$NSAPP - BRG="vmbr0" - NET="dhcp" - # 26.03.2025 disabled - #IPv6="dhcp" - #IPv6GW="" - GATE="" - APT_CACHER="" - APT_CACHER_IP="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - SSH_AUTHORIZED_KEY="" - TAGS="community-script-dev;" - # 26.03.2025 disabled - # ENABLE_FUSE="no" + # Default Settings + CT_TYPE="1" + DISK_SIZE="4" + CORE_COUNT="1" + RAM_SIZE="1024" + VERBOSE="${1:-no}" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + BRG="vmbr0" + NET="dhcp" + # 26.03.2025 disabled + #IPv6="dhcp" + #IPv6GW="" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + SSH_AUTHORIZED_KEY="" + TAGS="community-script-dev;" + # 26.03.2025 disabled + # ENABLE_FUSE="no" - # Override default settings with variables from ct script - CT_TYPE=${var_unprivileged:-$CT_TYPE} - DISK_SIZE=${var_disk:-$DISK_SIZE} - CORE_COUNT=${var_cpu:-$CORE_COUNT} - RAM_SIZE=${var_ram:-$RAM_SIZE} - VERB=${var_verbose:-$VERBOSE} - TAGS="${TAGS}${var_tags:-}" - # 26.03.2025 disabled - #ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} + # Override default settings with variables from ct script + CT_TYPE=${var_unprivileged:-$CT_TYPE} + DISK_SIZE=${var_disk:-$DISK_SIZE} + CORE_COUNT=${var_cpu:-$CORE_COUNT} + RAM_SIZE=${var_ram:-$RAM_SIZE} + VERB=${var_verbose:-$VERBOSE} + TAGS="${TAGS}${var_tags:-}" + # 26.03.2025 disabled + #ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} - # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts - if [ -z "$var_os" ]; then - var_os="debian" - fi - if [ -z "$var_version" ]; then - var_version="12" - fi + # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts + if [ -z "$var_os" ]; then + var_os="debian" + fi + if [ -z "$var_version" ]; then + var_version="12" + fi } # This function displays the default values for various settings. echo_default() { - # Convert CT_TYPE to description - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi + # Convert CT_TYPE to description + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi - # Output the selected values with icons - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}" - if [ "$VERB" == "yes" ]; then - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}" - fi - echo -e "${CREATING}${BOLD}${BL}Creating a ${APP} LXC using the above default settings${CL}" - echo -e " " + # Output the selected values with icons + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}" + if [ "$VERB" == "yes" ]; then + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}" + fi + echo -e "${CREATING}${BOLD}${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e " " } # This function is called when the user decides to exit the script. It clears the screen and displays an exit message. exit_script() { - clear - echo -e "\n${CROSS}${RD}User exited script${CL}\n" - exit + clear + echo -e "\n${CROSS}${RD}User exited script${CL}\n" + exit } # This function allows the user to configure advanced settings for the script. advanced_settings() { - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 - if [ "$var_os" != "alpine" ]; then - var_default_os="${var_os}" - var_os="" - while [ -z "$var_os" ]; do - if [ "$var_default_os" == "debian" ]; then - if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" ON \ - "ubuntu" "" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_os" ]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - fi - else - exit_script - fi - fi - if [ "$var_default_os" == "ubuntu" ]; then - if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" OFF \ - "ubuntu" "" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_os" ]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - fi - else - exit_script - fi - fi - done - fi - - if [ "$var_os" == "debian" ]; then - var_default_version="${var_version}" - var_version="" - while [ -z "$var_version" ]; do - if [ "$var_default_version" == "11" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ - "11" "Bullseye" ON \ - "12" "Bookworm" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - if [ "$var_default_version" == "12" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ - "11" "Bullseye" OFF \ - "12" "Bookworm" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - done - fi - - if [ "$var_os" == "ubuntu" ]; then - var_default_version="${var_version}" - var_version="" - while [ -z "$var_version" ]; do - if [ "$var_default_version" == "20.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - elif [ "$var_default_version" == "22.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" ON \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - elif [ "$var_default_version" == "24.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" ON \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - else - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - done - fi - # Setting Default Tag for Advanced Settings - TAGS="community-script-dev;${var_tags:-}" - CT_DEFAULT_TYPE="${CT_TYPE}" - CT_TYPE="" - while [ -z "$CT_TYPE" ]; do - if [ "$CT_DEFAULT_TYPE" == "1" ]; then - if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$CT_TYPE" ]; then - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - fi - else - exit_script - fi + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 + if [ "$var_os" != "alpine" ]; then + var_default_os="${var_os}" + var_os="" + while [ -z "$var_os" ]; do + if [ "$var_default_os" == "debian" ]; then + if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + "debian" "" ON \ + "ubuntu" "" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_os" ]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + fi + else + exit_script fi - if [ "$CT_DEFAULT_TYPE" == "0" ]; then - if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$CT_TYPE" ]; then - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - fi - else - exit_script - fi + fi + if [ "$var_default_os" == "ubuntu" ]; then + if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + "debian" "" OFF \ + "ubuntu" "" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_os" ]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + fi + else + exit_script fi + fi done + fi - while true; do - if PW1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [[ ! -z "$PW1" ]]; then - if [[ "$PW1" == *" "* ]]; then - whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 - elif [ ${#PW1} -lt 5 ]; then - whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 - else - if PW2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then - if [[ "$PW1" == "$PW2" ]]; then - PW="-password $PW1" - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" - break - else - whiptail --msgbox "Passwords do not match. Please try again." 8 58 - fi - else - exit_script - fi - fi - else - PW1="Automatic Login" - PW="" - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}" - break - fi + if [ "$var_os" == "debian" ]; then + var_default_version="${var_version}" + var_version="" + while [ -z "$var_version" ]; do + if [ "$var_default_version" == "11" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ + "11" "Bullseye" ON \ + "12" "Bookworm" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi else - exit_script + exit_script fi + fi + if [ "$var_default_version" == "12" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ + "11" "Bullseye" OFF \ + "12" "Bookworm" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi + else + exit_script + fi + fi done + fi - if CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + if [ "$var_os" == "ubuntu" ]; then + var_default_version="${var_version}" + var_version="" + while [ -z "$var_version" ]; do + if [ "$var_default_version" == "20.04" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" ON \ + "22.04" "Jammy" OFF \ + "24.04" "Noble" OFF \ + "24.10" "Oracular" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi else - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + exit_script fi - else - exit - fi - - if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" + elif [ "$var_default_version" == "22.04" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" ON \ + "24.04" "Noble" OFF \ + "24.10" "Oracular" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi else - HN=$(echo ${CT_NAME,,} | tr -d ' ') + exit_script fi - echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" - else - exit_script - fi - - if DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + elif [ "$var_default_version" == "24.04" ]; then + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" OFF \ + "24.04" "Noble" ON \ + "24.10" "Oracular" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + exit_script fi - else - exit_script - fi - - if CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" + else + if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" OFF \ + "24.04" "Noble" OFF \ + "24.10" "Oracular" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + fi else - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" - fi - else - exit_script - fi - - if RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - else - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - fi - else - exit_script - fi - - if BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" - else - echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" - fi - else - exit_script - fi - - while true; do - NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) - exit_status=$? - if [ $exit_status -eq 0 ]; then - if [ "$NET" = "dhcp" ]; then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" - break - else - if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" - break - else - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 - fi - fi - else - exit_script + exit_script fi + fi done + fi + # Setting Default Tag for Advanced Settings + TAGS="community-script-dev;${var_tags:-}" + CT_DEFAULT_TYPE="${CT_TYPE}" + CT_TYPE="" + while [ -z "$CT_TYPE" ]; do + if [ "$CT_DEFAULT_TYPE" == "1" ]; then + if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$CT_TYPE" ]; then + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + fi + else + exit_script + fi + fi + if [ "$CT_DEFAULT_TYPE" == "0" ]; then + if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$CT_TYPE" ]; then + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + fi + else + exit_script + fi + fi + done - if [ "$NET" != "dhcp" ]; then - while true; do - GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) - if [ -z "$GATE1" ]; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 - elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 + while true; do + if PW1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [[ ! -z "$PW1" ]]; then + if [[ "$PW1" == *" "* ]]; then + whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 + elif [ ${#PW1} -lt 5 ]; then + whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 + else + if PW2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then + if [[ "$PW1" == "$PW2" ]]; then + PW="-password $PW1" + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" + break else - GATE=",gw=$GATE1" - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}" - break + whiptail --msgbox "Passwords do not match. Please try again." 8 58 fi - done - else - GATE="" - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" - fi - - if [ "$var_os" == "alpine" ]; then - APT_CACHER="" - APT_CACHER_IP="" - else - if APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then - APT_CACHER="${APT_CACHER_IP:+yes}" - echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" - else + else exit_script + fi fi - fi - - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" + else + PW1="Automatic Login" + PW="" + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}" + break + fi else - DISABLEIP6="no" + exit_script fi - echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + done - if MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" + if CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" else - exit_script + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" fi + else + exit + fi - if SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}" + if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" else - exit_script + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi + echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" + else + exit_script + fi - if NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}" + if DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" else - exit_script - fi - - if MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}" - fi - else - exit_script - fi - - if VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}" - else - exit_script - fi - - if ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then - if [ -n "${ADV_TAGS}" ]; then - ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') - TAGS="${ADV_TAGS}" - else - TAGS=";" - fi - echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" - else - exit_script - fi - - if [[ "$PW" == -password* ]]; then - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" - else - SSH="no" - fi - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" - else - SSH="no" - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" - fi - - if [[ "${SSH}" == "yes" ]]; then - SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" - - if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then - echo "Warning: No SSH key provided." - fi - else - SSH_AUTHORIZED_KEY="" - fi - - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then - ENABLE_FUSE="yes" - else - ENABLE_FUSE="no" - fi - echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" - - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" - else - VERB="no" - fi - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" - - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" advanced_settings + fi + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" fi + else + exit_script + fi + + if CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit_script + fi + + if RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + else + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + fi + else + exit_script + fi + + if BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + else + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + fi + else + exit_script + fi + + while true; do + NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) + exit_status=$? + if [ $exit_status -eq 0 ]; then + if [ "$NET" = "dhcp" ]; then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + break + else + if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + break + else + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 + fi + fi + else + exit_script + fi + done + + if [ "$NET" != "dhcp" ]; then + while true; do + GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) + if [ -z "$GATE1" ]; then + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 + elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 + else + GATE=",gw=$GATE1" + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}" + break + fi + done + else + GATE="" + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" + fi + + if [ "$var_os" == "alpine" ]; then + APT_CACHER="" + APT_CACHER_IP="" + else + if APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then + APT_CACHER="${APT_CACHER_IP:+yes}" + echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" + else + exit_script + fi + fi + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" + else + DISABLEIP6="no" + fi + echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + + if MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" + else + exit_script + fi + + if SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}" + else + exit_script + fi + + if NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}" + else + exit_script + fi + + if MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit_script + fi + + if VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}" + else + exit_script + fi + + if ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then + if [ -n "${ADV_TAGS}" ]; then + ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') + TAGS="${ADV_TAGS}" + else + TAGS=";" + fi + echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" + else + exit_script + fi + + if [[ "$PW" == -password* ]]; then + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" + else + SSH="no" + fi + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + else + SSH="no" + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + fi + + if [[ "${SSH}" == "yes" ]]; then + SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" + + if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then + echo "Warning: No SSH key provided." + fi + else + SSH_AUTHORIZED_KEY="" + fi + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then + ENABLE_FUSE="yes" + else + ENABLE_FUSE="no" + fi + echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" + else + VERB="no" + fi + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" + advanced_settings + fi } # dialog_input() { @@ -1761,13 +1721,13 @@ advanced_settings() { # } diagnostics_check() { - if ! [ -d "/usr/local/community-scripts" ]; then - mkdir -p /usr/local/community-scripts - fi + if ! [ -d "/usr/local/community-scripts" ]; then + mkdir -p /usr/local/community-scripts + fi - if ! [ -f "/usr/local/community-scripts/diagnostics" ]; then - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS" --yesno "Send Diagnostics of LXC Installation?\n\n(This only transmits data without user data, just RAM, CPU, LXC name, ...)" 10 58); then - cat </usr/local/community-scripts/diagnostics + if ! [ -f "/usr/local/community-scripts/diagnostics" ]; then + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS" --yesno "Send Diagnostics of LXC Installation?\n\n(This only transmits data without user data, just RAM, CPU, LXC name, ...)" 10 58); then + cat </usr/local/community-scripts/diagnostics DIAGNOSTICS=yes #This file is used to store the diagnostics settings for the Community-Scripts API. @@ -1792,9 +1752,9 @@ DIAGNOSTICS=yes #"status" #If you have any concerns, please review the source code at /misc/build.func EOF - DIAGNOSTICS="yes" - else - cat </usr/local/community-scripts/diagnostics + DIAGNOSTICS="yes" + else + cat </usr/local/community-scripts/diagnostics DIAGNOSTICS=no #This file is used to store the diagnostics settings for the Community-Scripts API. @@ -1819,547 +1779,547 @@ DIAGNOSTICS=no #"status" #If you have any concerns, please review the source code at /misc/build.func EOF - DIAGNOSTICS="no" - fi - else - DIAGNOSTICS=$(awk -F '=' '/^DIAGNOSTICS/ {print $2}' /usr/local/community-scripts/diagnostics) - + DIAGNOSTICS="no" fi + else + DIAGNOSTICS=$(awk -F '=' '/^DIAGNOSTICS/ {print $2}' /usr/local/community-scripts/diagnostics) + + fi } config_file() { - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 - CONFIG_FILE="/opt/community-scripts/.settings" + CONFIG_FILE="/opt/community-scripts/.settings" - if [[ -f "/opt/community-scripts/${NSAPP}.conf" ]]; then - CONFIG_FILE="/opt/community-scripts/${NSAPP}.conf" - fi + if [[ -f "/opt/community-scripts/${NSAPP}.conf" ]]; then + CONFIG_FILE="/opt/community-scripts/${NSAPP}.conf" + fi - if CONFIG_FILE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set absolute path to config file" 8 58 $CONFIG_FILE --title "CONFIG FILE" 3>&1 1>&2 2>&3); then - if [[ ! -f "$CONFIG_FILE" ]]; then - echo -e "${CROSS}${RD}Config file not found, exiting script!.${CL}" - exit - else - echo -e "${INFO}${BOLD}${DGN}Using config File: ${BGN}$CONFIG_FILE${CL}" - base_settings - source "$CONFIG_FILE" - fi - fi - - if [[ "$var_os" == "debian" ]]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - if [[ "$var_version" == "11" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "12" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - else - msg_error "Unknown setting for var_version, should be 11 or 12, was ${var_version}" - exit - fi - elif [[ "$var_os" == "ubuntu" ]]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - if [[ "$var_version" == "20.04" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "22.04" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "24.04" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "24.10" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - else - msg_error "Unknown setting for var_version, should be 20.04, 22.04, 24.04 or 24.10, was ${var_version}" - exit - fi + if CONFIG_FILE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set absolute path to config file" 8 58 $CONFIG_FILE --title "CONFIG FILE" 3>&1 1>&2 2>&3); then + if [[ ! -f "$CONFIG_FILE" ]]; then + echo -e "${CROSS}${RD}Config file not found, exiting script!.${CL}" + exit else - msg_error "Unknown setting for var_os! should be debian or ubuntu, was ${var_os}" + echo -e "${INFO}${BOLD}${DGN}Using config File: ${BGN}$CONFIG_FILE${CL}" + base_settings + source "$CONFIG_FILE" + fi + fi + + if [[ "$var_os" == "debian" ]]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + if [[ "$var_version" == "11" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "12" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + else + msg_error "Unknown setting for var_version, should be 11 or 12, was ${var_version}" + exit + fi + elif [[ "$var_os" == "ubuntu" ]]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + if [[ "$var_version" == "20.04" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "22.04" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "24.04" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "24.10" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + else + msg_error "Unknown setting for var_version, should be 20.04, 22.04, 24.04 or 24.10, was ${var_version}" + exit + fi + else + msg_error "Unknown setting for var_os! should be debian or ubuntu, was ${var_os}" + exit + fi + + if [[ -n "$CT_ID" ]]; then + + if [[ "$CT_ID" =~ ^([0-9]{3,4})-([0-9]{3,4})$ ]]; then + MIN_ID=${BASH_REMATCH[1]} + MAX_ID=${BASH_REMATCH[2]} + + if ((MIN_ID >= MAX_ID)); then + msg_error "Invalid Container ID range. The first number must be smaller than the second number, was ${CT_ID}" exit - fi + fi - if [[ -n "$CT_ID" ]]; then + LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') - if [[ "$CT_ID" =~ ^([0-9]{3,4})-([0-9]{3,4})$ ]]; then - MIN_ID=${BASH_REMATCH[1]} - MAX_ID=${BASH_REMATCH[2]} - - if ((MIN_ID >= MAX_ID)); then - msg_error "Invalid Container ID range. The first number must be smaller than the second number, was ${CT_ID}" - exit - fi - - LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') - - for ((ID = MIN_ID; ID <= MAX_ID; ID++)); do - if ! grep -q "^$ID$" <<<"$LIST_OF_IDS"; then - CT_ID=$ID - break - fi - done - - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - - elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then - - LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') - if ! grep -q "^$CT_ID$" <<<"$LIST_OF_IDS"; then - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - msg_error "Container ID $CT_ID already exists" - exit - fi - else - msg_error "Invalid Container ID format. Needs to be 0000-9999 or 0-9999, was ${CT_ID}" - exit + for ((ID = MIN_ID; ID <= MAX_ID; ID++)); do + if ! grep -q "^$ID$" <<<"$LIST_OF_IDS"; then + CT_ID=$ID + break fi - fi + done - if [[ "$CT_TYPE" -eq 0 ]]; then - CT_TYPE_DESC="Privileged" - elif [[ "$CT_TYPE" -eq 1 ]]; then - CT_TYPE_DESC="Unprivileged" - else - msg_error "Unknown setting for CT_TYPE, should be 1 or 0, was ${CT_TYPE}" + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + + elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then + + LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') + if ! grep -q "^$CT_ID$" <<<"$LIST_OF_IDS"; then + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + msg_error "Container ID $CT_ID already exists" exit - fi - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - - if [[ ! -z "$PW" ]]; then - - if [[ "$PW" == *" "* ]]; then - msg_error "Password cannot be empty" - exit - elif [[ ${#PW} -lt 5 ]]; then - msg_error "Password must be at least 5 characters long" - exit - else - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" - fi - PW="-password $PW" + fi else - PW="" - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}Automatic Login${CL}" + msg_error "Invalid Container ID format. Needs to be 0000-9999 or 0-9999, was ${CT_ID}" + exit fi - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi - if [[ ! -z "$HN" ]]; then - echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" + if [[ "$CT_TYPE" -eq 0 ]]; then + CT_TYPE_DESC="Privileged" + elif [[ "$CT_TYPE" -eq 1 ]]; then + CT_TYPE_DESC="Unprivileged" + else + msg_error "Unknown setting for CT_TYPE, should be 1 or 0, was ${CT_TYPE}" + exit + fi + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + + if [[ ! -z "$PW" ]]; then + + if [[ "$PW" == *" "* ]]; then + msg_error "Password cannot be empty" + exit + elif [[ ${#PW} -lt 5 ]]; then + msg_error "Password must be at least 5 characters long" + exit else - msg_error "Hostname cannot be empty" - exit + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" fi + PW="-password $PW" + else + PW="" + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}Automatic Login${CL}" + fi + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - if [[ ! -z "$DISK_SIZE" ]]; then - if [[ "$DISK_SIZE" =~ ^-?[0-9]+$ ]]; then - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" - else - msg_error "DISK_SIZE must be an integer, was ${DISK_SIZE}" - exit - fi + if [[ ! -z "$HN" ]]; then + echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" + else + msg_error "Hostname cannot be empty" + exit + fi + + if [[ ! -z "$DISK_SIZE" ]]; then + if [[ "$DISK_SIZE" =~ ^-?[0-9]+$ ]]; then + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" else - msg_error "DISK_SIZE cannot be empty" - exit + msg_error "DISK_SIZE must be an integer, was ${DISK_SIZE}" + exit fi + else + msg_error "DISK_SIZE cannot be empty" + exit + fi - if [[ ! -z "$CORE_COUNT" ]]; then - if [[ "$CORE_COUNT" =~ ^-?[0-9]+$ ]]; then - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" - else - msg_error "CORE_COUNT must be an integer, was ${CORE_COUNT}" - exit - fi + if [[ ! -z "$CORE_COUNT" ]]; then + if [[ "$CORE_COUNT" =~ ^-?[0-9]+$ ]]; then + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" else - msg_error "CORE_COUNT cannot be empty" - exit + msg_error "CORE_COUNT must be an integer, was ${CORE_COUNT}" + exit fi + else + msg_error "CORE_COUNT cannot be empty" + exit + fi - if [[ ! -z "$RAM_SIZE" ]]; then - if [[ "$RAM_SIZE" =~ ^-?[0-9]+$ ]]; then - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - else - msg_error "RAM_SIZE must be an integer, was ${RAM_SIZE}" - exit - fi + if [[ ! -z "$RAM_SIZE" ]]; then + if [[ "$RAM_SIZE" =~ ^-?[0-9]+$ ]]; then + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" else - msg_error "RAM_SIZE cannot be empty" - exit + msg_error "RAM_SIZE must be an integer, was ${RAM_SIZE}" + exit fi + else + msg_error "RAM_SIZE cannot be empty" + exit + fi - if [[ ! -z "$BRG" ]]; then - if grep -q "^iface ${BRG}" /etc/network/interfaces; then - echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" - else - msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces" - exit - fi + if [[ ! -z "$BRG" ]]; then + if grep -q "^iface ${BRG}" /etc/network/interfaces; then + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" else - msg_error "Bridge cannot be empty" - exit + msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces" + exit fi + else + msg_error "Bridge cannot be empty" + exit + fi - local ip_cidr_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/([0-9]{1,2})$' - local ip_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$' + local ip_cidr_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/([0-9]{1,2})$' + local ip_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$' - if [[ ! -z $NET ]]; then - if [ "$NET" == "dhcp" ]; then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}DHCP${CL}" - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" - elif - [[ "$NET" =~ $ip_cidr_regex ]] - then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" - else - msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}" - exit - fi - fi - if [ ! -z "$GATE" ]; then - if [[ "$GATE" =~ $ip_regex ]]; then - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE${CL}" - GATE=",gw=$GATE" - else - msg_error "Invalid IP Address format for Gateway. Needs to be 0.0.0.0, was ${GATE}" - exit - fi + if [[ ! -z $NET ]]; then + if [ "$NET" == "dhcp" ]; then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}DHCP${CL}" + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" + elif + [[ "$NET" =~ $ip_cidr_regex ]] + then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" else - msg_error "Gateway IP Address cannot be empty" - exit + msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}" + exit fi - - if [[ ! -z "$APT_CACHER_IP" ]]; then - if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then - APT_CACHER="yes" - echo -e "${NETWORK}${BOLD}${DGN}APT-CACHER IP Address: ${BGN}$APT_CACHER_IP${CL}" - else - msg_error "Invalid IP Address format for APT-Cacher. Needs to be 0.0.0.0, was ${APT_CACHER_IP}" - exit - fi - fi - - if [[ "$DISABLEIP6" == "yes" ]]; then - echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}Yes${CL}" - elif [[ "$DISABLEIP6" == "no" ]]; then - echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}No${CL}" + fi + if [ ! -z "$GATE" ]; then + if [[ "$GATE" =~ $ip_regex ]]; then + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE${CL}" + GATE=",gw=$GATE" else - msg_error "Disable IPv6 needs to be 'yes' or 'no'" - exit + msg_error "Invalid IP Address format for Gateway. Needs to be 0.0.0.0, was ${GATE}" + exit fi + else + msg_error "Gateway IP Address cannot be empty" + exit + fi - if [[ ! -z "$MTU" ]]; then - if [[ "$MTU" =~ ^-?[0-9]+$ ]]; then - echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU${CL}" - MTU=",mtu=$MTU" - else - msg_error "MTU must be an integer, was ${MTU}" - exit - fi + if [[ ! -z "$APT_CACHER_IP" ]]; then + if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then + APT_CACHER="yes" + echo -e "${NETWORK}${BOLD}${DGN}APT-CACHER IP Address: ${BGN}$APT_CACHER_IP${CL}" else - MTU="" - echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}" - + msg_error "Invalid IP Address format for APT-Cacher. Needs to be 0.0.0.0, was ${APT_CACHER_IP}" + exit fi + fi - if [[ ! -z "$SD" ]]; then - echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SD${CL}" - SD="-searchdomain=$SD" + if [[ "$DISABLEIP6" == "yes" ]]; then + echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}Yes${CL}" + elif [[ "$DISABLEIP6" == "no" ]]; then + echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}No${CL}" + else + msg_error "Disable IPv6 needs to be 'yes' or 'no'" + exit + fi + + if [[ ! -z "$MTU" ]]; then + if [[ "$MTU" =~ ^-?[0-9]+$ ]]; then + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU${CL}" + MTU=",mtu=$MTU" else - SD="" - echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}HOST${CL}" + msg_error "MTU must be an integer, was ${MTU}" + exit fi + else + MTU="" + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}" - if [[ ! -z "$NS" ]]; then - if [[ "$NS" =~ $ip_regex ]]; then - echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NS${CL}" - NS="-nameserver=$NS" - else - msg_error "Invalid IP Address format for DNS Server. Needs to be 0.0.0.0, was ${NS}" - exit - fi + fi + + if [[ ! -z "$SD" ]]; then + echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SD${CL}" + SD="-searchdomain=$SD" + else + SD="" + echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}HOST${CL}" + fi + + if [[ ! -z "$NS" ]]; then + if [[ "$NS" =~ $ip_regex ]]; then + echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NS${CL}" + NS="-nameserver=$NS" else - NS="" - echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}HOST${CL}" + msg_error "Invalid IP Address format for DNS Server. Needs to be 0.0.0.0, was ${NS}" + exit fi + else + NS="" + echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}HOST${CL}" + fi - if [[ ! -z "$MAC" ]]; then - if [[ "$MAC" =~ ^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$ ]]; then - echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}" - MAC=",hwaddr=$MAC" - else - msg_error "MAC Address must be in the format xx:xx:xx:xx:xx:xx, was ${MAC}" - exit - fi - fi - - if [[ ! -z "$VLAN" ]]; then - if [[ "$VLAN" =~ ^-?[0-9]+$ ]]; then - echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN${CL}" - VLAN=",tag=$VLAN" - else - msg_error "VLAN must be an integer, was ${VLAN}" - exit - fi - fi - - if [[ ! -z "$TAGS" ]]; then - echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" - fi - - if [[ "$SSH" == "yes" ]]; then - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" - if [[ ! -z "$SSH_AUTHORIZED_KEY" ]]; then - echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}********************${CL}" - else - echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}None${CL}" - fi - elif [[ "$SSH" == "no" ]]; then - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + if [[ ! -z "$MAC" ]]; then + if [[ "$MAC" =~ ^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$ ]]; then + echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}" + MAC=",hwaddr=$MAC" else - msg_error "SSH needs to be 'yes' or 'no', was ${SSH}" - exit + msg_error "MAC Address must be in the format xx:xx:xx:xx:xx:xx, was ${MAC}" + exit fi + fi - if [[ "$VERB" == "yes" ]]; then - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" - elif [[ "$VERB" == "no" ]]; then - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}No${CL}" + if [[ ! -z "$VLAN" ]]; then + if [[ "$VLAN" =~ ^-?[0-9]+$ ]]; then + echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN${CL}" + VLAN=",tag=$VLAN" else - msg_error "Verbose Mode needs to be 'yes' or 'no', was ${VERB}" - exit + msg_error "VLAN must be an integer, was ${VLAN}" + exit fi + fi - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS WITH CONFIG FILE COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above settings${CL}" + if [[ ! -z "$TAGS" ]]; then + echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" + fi + + if [[ "$SSH" == "yes" ]]; then + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + if [[ ! -z "$SSH_AUTHORIZED_KEY" ]]; then + echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}********************${CL}" else - clear - header_info - echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" - config_file + echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}None${CL}" fi + elif [[ "$SSH" == "no" ]]; then + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + else + msg_error "SSH needs to be 'yes' or 'no', was ${SSH}" + exit + fi + + if [[ "$VERB" == "yes" ]]; then + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" + elif [[ "$VERB" == "no" ]]; then + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}No${CL}" + else + msg_error "Verbose Mode needs to be 'yes' or 'no', was ${VERB}" + exit + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS WITH CONFIG FILE COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above settings${CL}" + else + clear + header_info + echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" + config_file + fi } install_script() { - pve_check - shell_check - root_check - arch_check - ssh_check - maxkeys_check - diagnostics_check + pve_check + shell_check + root_check + arch_check + ssh_check + maxkeys_check + diagnostics_check - if systemctl is-active -q ping-instances.service; then - systemctl -q stop ping-instances.service + if systemctl is-active -q ping-instances.service; then + systemctl -q stop ping-instances.service + fi + NEXTID=$(pvesh get /cluster/nextid) + timezone=$(cat /etc/timezone) + header_info + while true; do + + CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \ + 18 60 6 \ + "1" "Default Settings" \ + "2" "Default Settings (with output)" \ + "3" "Advanced Settings" \ + "4" "Diagnostic Settings" \ + "5" "Use Config File" \ + "6" "Exit" --nocancel --default-item "1" 3>&1 1>&2 2>&3) + + if [ $? -ne 0 ]; then + echo -e "${CROSS}${RD} Menu canceled. Exiting.${CL}" + exit 0 fi - NEXTID=$(pvesh get /cluster/nextid) - timezone=$(cat /etc/timezone) - header_info - while true; do - CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \ - 18 60 6 \ - "1" "Default Settings" \ - "2" "Default Settings (with output)" \ - "3" "Advanced Settings" \ - "4" "Diagnostic Settings" \ - "5" "Use Config File" \ - "6" "Exit" --nocancel --default-item "1" 3>&1 1>&2 2>&3) - - if [ $? -ne 0 ]; then - echo -e "${CROSS}${RD} Menu canceled. Exiting.${CL}" - exit 0 + case $CHOICE in + 1) + header_info + echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME${CL}" + VERB="no" + METHOD="default" + base_settings "$VERB" + echo_default + break + ;; + 2) + header_info + echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}Verbose)${CL}" + VERB="yes" + METHOD="default" + base_settings "$VERB" + echo_default + break + ;; + 3) + header_info + echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" + METHOD="advanced" + base_settings + advanced_settings + break + ;; + 4) + if [[ $DIAGNOSTICS == "yes" ]]; then + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ + --yes-button "No" --no-button "Back"; then + DIAGNOSTICS="no" + sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=no/' /usr/local/community-scripts/diagnostics + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 fi + else + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ + --yes-button "Yes" --no-button "Back"; then + DIAGNOSTICS="yes" + sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=yes/' /usr/local/community-scripts/diagnostics + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 + fi + fi - case $CHOICE in - 1) - header_info - echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME${CL}" - VERB="no" - METHOD="default" - base_settings "$VERB" - echo_default - break - ;; - 2) - header_info - echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}Verbose)${CL}" - VERB="yes" - METHOD="default" - base_settings "$VERB" - echo_default - break - ;; - 3) - header_info - echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" - METHOD="advanced" - base_settings - advanced_settings - break - ;; - 4) - if [[ $DIAGNOSTICS == "yes" ]]; then - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ - --yes-button "No" --no-button "Back"; then - DIAGNOSTICS="no" - sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=no/' /usr/local/community-scripts/diagnostics - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 - fi - else - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ - --yes-button "Yes" --no-button "Back"; then - DIAGNOSTICS="yes" - sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=yes/' /usr/local/community-scripts/diagnostics - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 - fi - fi - - ;; - 5) - header_info - echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" - config_file - break - ;; - 6) - echo -e "${CROSS}${RD}Exiting.${CL}" - exit 0 - ;; - *) - echo -e "${CROSS}${RD}Invalid option, please try again.${CL}" - ;; - esac - done + ;; + 5) + header_info + echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" + config_file + break + ;; + 6) + echo -e "${CROSS}${RD}Exiting.${CL}" + exit 0 + ;; + *) + echo -e "${CROSS}${RD}Invalid option, please try again.${CL}" + ;; + esac + done } check_container_resources() { - # Check actual RAM & Cores - current_ram=$(free -m | awk 'NR==2{print $2}') - current_cpu=$(nproc) + # Check actual RAM & Cores + current_ram=$(free -m | awk 'NR==2{print $2}') + current_cpu=$(nproc) - # Check whether the current RAM is less than the required RAM or the CPU cores are less than required - if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then - echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}" - echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n" - echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " - read -r prompt - # Check if the input is 'yes', otherwise exit with status 1 - if [[ ! ${prompt,,} =~ ^(yes)$ ]]; then - echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}" - exit 1 - fi - else - echo -e "" + # Check whether the current RAM is less than the required RAM or the CPU cores are less than required + if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then + echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}" + echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n" + echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " + read -r prompt + # Check if the input is 'yes', otherwise exit with status 1 + if [[ ! ${prompt,,} =~ ^(yes)$ ]]; then + echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}" + exit 1 fi + else + echo -e "" + fi } check_container_storage() { - # Check if the /boot partition is more than 80% full - total_size=$(df /boot --output=size | tail -n 1) - local used_size=$(df /boot --output=used | tail -n 1) - usage=$((100 * used_size / total_size)) - if ((usage > 80)); then - # Prompt the user for confirmation to continue - echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}" - echo -ne "Continue anyway? " - read -r prompt - # Check if the input is 'y' or 'yes', otherwise exit with status 1 - if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then - echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}" - exit 1 - fi + # Check if the /boot partition is more than 80% full + total_size=$(df /boot --output=size | tail -n 1) + local used_size=$(df /boot --output=used | tail -n 1) + usage=$((100 * used_size / total_size)) + if ((usage > 80)); then + # Prompt the user for confirmation to continue + echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}" + echo -ne "Continue anyway? " + read -r prompt + # Check if the input is 'y' or 'yes', otherwise exit with status 1 + if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then + echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}" + exit 1 fi + fi } start() { - LOGDIR="/usr/local/community-scripts/logs" - mkdir -p "$LOGDIR" + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" - if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - exit_script - exit - fi - SPINNER_PID="" - install_script + if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + exit_script + exit fi + SPINNER_PID="" + install_script + fi - if ! command -v pveversion >/dev/null 2>&1; then - CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ - "Support/Update functions for ${APP} LXC. Choose an option:" \ - 12 60 3 \ - "1" "YES (Silent Mode)" \ - "2" "YES (Verbose Mode)" \ - "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) + if ! command -v pveversion >/dev/null 2>&1; then + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ + "Support/Update functions for ${APP} LXC. Choose an option:" \ + 12 60 3 \ + "1" "YES (Silent Mode)" \ + "2" "YES (Verbose Mode)" \ + "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) - case "$CHOICE" in - 1) - VERB="no" - set_std_mode - log_message "INFO" "Update started (Silent Mode)" - ;; - 2) - VERB="yes" - set_std_mode - log_message "INFO" "Update started (Verbose Mode)" - ;; - 3) - clear - log_message "INFO" "Update aborted." - exit_script - exit - ;; - esac + case "$CHOICE" in + 1) + VERB="no" + set_std_mode + log_message "INFO" "Update started (Silent Mode)" + ;; + 2) + VERB="yes" + set_std_mode + log_message "INFO" "Update started (Verbose Mode)" + ;; + 3) + clear + log_message "INFO" "Update aborted." + exit_script + exit + ;; + esac - SPINNER_PID="" - update_script - fi + SPINNER_PID="" + update_script + fi } # This function collects user settings and integrates all the collected information. build_container() { - # if [ "$VERB" == "yes" ]; then set -x; fi + # if [ "$VERB" == "yes" ]; then set -x; fi - if [ "$CT_TYPE" == "1" ]; then - FEATURES="keyctl=1,nesting=1" - else - FEATURES="nesting=1" - fi - # 26.03.2025 disabled - #if [ "$ENABLE_FUSE" == "yes" ]; then - # FEATURES+=",fuse=1" - #fi + if [ "$CT_TYPE" == "1" ]; then + FEATURES="keyctl=1,nesting=1" + else + FEATURES="nesting=1" + fi + # 26.03.2025 disabled + #if [ "$ENABLE_FUSE" == "yes" ]; then + # FEATURES+=",fuse=1" + #fi - if [[ $DIAGNOSTICS == "yes" ]]; then - post_to_api - fi + if [[ $DIAGNOSTICS == "yes" ]]; then + post_to_api + fi - FEATURES="${FEATURES#,}" - TEMP_DIR=$(mktemp -d) - pushd $TEMP_DIR >/dev/null - if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" - else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" - fi - export RANDOM_UUID="$RANDOM_UUID" - export CACHER="$APT_CACHER" - export CACHER_IP="$APT_CACHER_IP" - export tz="$timezone" - export DISABLEIPV6="$DISABLEIP6" - export APPLICATION="$APP" - export app="$NSAPP" - export PASSWORD="$PW" - export VERBOSE="$VERB" - export SSH_ROOT="${SSH}" - export SSH_AUTHORIZED_KEY - export CTID="$CT_ID" - export CTTYPE="$CT_TYPE" - export PCT_OSTYPE="$var_os" - export PCT_OSVERSION="$var_version" - export PCT_DISK_SIZE="$DISK_SIZE" - #export IPv6="$IPv6" - export PCT_OPTIONS=" + FEATURES="${FEATURES#,}" + TEMP_DIR=$(mktemp -d) + pushd $TEMP_DIR >/dev/null + if [ "$var_os" == "alpine" ]; then + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" + else + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + fi + export RANDOM_UUID="$RANDOM_UUID" + export CACHER="$APT_CACHER" + export CACHER_IP="$APT_CACHER_IP" + export tz="$timezone" + export DISABLEIPV6="$DISABLEIP6" + export APPLICATION="$APP" + export app="$NSAPP" + export PASSWORD="$PW" + export VERBOSE="$VERB" + export SSH_ROOT="${SSH}" + export SSH_AUTHORIZED_KEY + export CTID="$CT_ID" + export CTTYPE="$CT_TYPE" + export PCT_OSTYPE="$var_os" + export PCT_OSVERSION="$var_version" + export PCT_DISK_SIZE="$DISK_SIZE" + #export IPv6="$IPv6" + export PCT_OPTIONS=" -features $FEATURES -hostname $HN -tags $TAGS @@ -2373,12 +2333,12 @@ build_container() { $PW " - # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? + # This executes create_lxc.sh and creates the container and .conf file + bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - if [ "$CT_TYPE" == "0" ]; then - cat <>$LXC_CONFIG + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + if [ "$CT_TYPE" == "0" ]; then + cat <>$LXC_CONFIG # USB passthrough lxc.cgroup2.devices.allow: a lxc.cap.drop: @@ -2390,11 +2350,11 @@ lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create= lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file EOF - fi + fi - if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then - cat <>$LXC_CONFIG + if [ "$CT_TYPE" == "0" ]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then + cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm @@ -2403,50 +2363,50 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF - fi - else - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then - if [[ -e "/dev/dri/renderD128" ]]; then - if [[ -e "/dev/dri/card0" ]]; then - cat <>$LXC_CONFIG + fi + else + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then + if [[ -e "/dev/dri/renderD128" ]]; then + if [[ -e "/dev/dri/card0" ]]; then + cat <>$LXC_CONFIG # VAAPI hardware transcoding dev0: /dev/dri/card0,gid=44 dev1: /dev/dri/renderD128,gid=104 EOF - else - cat <>$LXC_CONFIG + else + cat <>$LXC_CONFIG # VAAPI hardware transcoding dev0: /dev/dri/card1,gid=44 dev1: /dev/dri/renderD128,gid=104 EOF - fi - fi fi + fi fi + fi - # This starts the container and executes -install.sh - msg_info "Starting LXC Container" - pct start "$CTID" - msg_ok "Started LXC Container" - if [ "$var_os" == "alpine" ]; then - sleep 3 - pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories + # This starts the container and executes -install.sh + msg_info "Starting LXC Container" + pct start "$CTID" + msg_ok "Started LXC Container" + if [ "$var_os" == "alpine" ]; then + sleep 3 + pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories http://dl-cdn.alpinelinux.org/alpine/latest-stable/main http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' - pct exec "$CTID" -- ash -c "apk add bash >/dev/null" - fi - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? + pct exec "$CTID" -- ash -c "apk add bash >/dev/null" + fi + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? } # This function sets the description of the container. description() { - IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) + IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - # Generate LXC Description - DESCRIPTION=$( - cat < Logo @@ -2474,33 +2434,33 @@ description() { EOF - ) + ) - # Set Description in LXC - pct set "$CTID" -description "$DESCRIPTION" + # Set Description in LXC + pct set "$CTID" -description "$DESCRIPTION" - if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service - fi + if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service + fi - post_update_to_api "done" "none" + post_update_to_api "done" "none" } set_std_mode() { - if [ "$VERB" = "yes" ]; then - STD="" - else - STD="silent" - fi + if [ "$VERB" = "yes" ]; then + STD="" + else + STD="silent" + fi } # Silent execution function silent() { - if [ "$VERB" = "no" ]; then - "$@" >>"$LOGFILE" 2>&1 - else - "$@" 2>&1 | tee -a "$LOGFILE" - fi + if [ "$VERB" = "no" ]; then + "$@" >>"$LOGFILE" 2>&1 + else + "$@" 2>&1 | tee -a "$LOGFILE" + fi } # 26.03.2025 disabled @@ -2515,27 +2475,27 @@ silent() { #trap 'post_update_to_api "failed" "143"' SIGTERM exit_script() { - exit_code=$? # Capture the exit status of the last executed command - #200 exit codes indicate error in create_lxc.sh - #100 exit codes indicate error in install.func + exit_code=$? # Capture the exit status of the last executed command + #200 exit codes indicate error in create_lxc.sh + #100 exit codes indicate error in install.func - if [ $exit_code -ne 0 ]; then - case $exit_code in - 100) post_update_to_api "failed" "100: Unexpected error in create_lxc.sh" ;; - 101) post_update_to_api "failed" "101: No network connection detected in create_lxc.sh" ;; - 200) post_update_to_api "failed" "200: LXC creation failed in create_lxc.sh" ;; - 201) post_update_to_api "failed" "201: Invalid Storage class in create_lxc.sh" ;; - 202) post_update_to_api "failed" "202: User aborted menu in create_lxc.sh" ;; - 203) post_update_to_api "failed" "203: CTID not set in create_lxc.sh" ;; - 204) post_update_to_api "failed" "204: PCT_OSTYPE not set in create_lxc.sh" ;; - 205) post_update_to_api "failed" "205: CTID cannot be less than 100 in create_lxc.sh" ;; - 206) post_update_to_api "failed" "206: CTID already in use in create_lxc.sh" ;; - 207) post_update_to_api "failed" "207: Template not found in create_lxc.sh" ;; - 208) post_update_to_api "failed" "208: Error downloading template in create_lxc.sh" ;; - 209) post_update_to_api "failed" "209: Container creation failed, but template is intact in create_lxc.sh" ;; - *) post_update_to_api "failed" "Unknown error, exit code: $exit_code in create_lxc.sh" ;; - esac - fi + if [ $exit_code -ne 0 ]; then + case $exit_code in + 100) post_update_to_api "failed" "100: Unexpected error in create_lxc.sh" ;; + 101) post_update_to_api "failed" "101: No network connection detected in create_lxc.sh" ;; + 200) post_update_to_api "failed" "200: LXC creation failed in create_lxc.sh" ;; + 201) post_update_to_api "failed" "201: Invalid Storage class in create_lxc.sh" ;; + 202) post_update_to_api "failed" "202: User aborted menu in create_lxc.sh" ;; + 203) post_update_to_api "failed" "203: CTID not set in create_lxc.sh" ;; + 204) post_update_to_api "failed" "204: PCT_OSTYPE not set in create_lxc.sh" ;; + 205) post_update_to_api "failed" "205: CTID cannot be less than 100 in create_lxc.sh" ;; + 206) post_update_to_api "failed" "206: CTID already in use in create_lxc.sh" ;; + 207) post_update_to_api "failed" "207: Template not found in create_lxc.sh" ;; + 208) post_update_to_api "failed" "208: Error downloading template in create_lxc.sh" ;; + 209) post_update_to_api "failed" "209: Container creation failed, but template is intact in create_lxc.sh" ;; + *) post_update_to_api "failed" "Unknown error, exit code: $exit_code in create_lxc.sh" ;; + esac + fi } trap 'exit_script' EXIT diff --git a/misc/install.func b/misc/install.func index ad6ba80..f53f129 100644 --- a/misc/install.func +++ b/misc/install.func @@ -218,6 +218,46 @@ EOF msg_ok "Core dependencies installed" } +get_gh_release() { + local repo="$1" + local api_url="https://api.github.com/repos/$repo/releases/latest" + local header=() + + # Ensure jq is installed + if ! command -v jq &>/dev/null; then + msg_info "Installing jq (required for GitHub API parsing)" + apt-get update &>/dev/null + apt-get install -y jq &>/dev/null && msg_ok "jq installed" || { + msg_error "Failed to install jq" + return 1 + } + fi + + # Optional: GitHub Token for higher rate limit + [[ -n "$GITHUB_TOKEN" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") + + # Info output + msg_info "Fetching GitHub release for $repo" + local api_response + if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then + msg_error "Request failed for $repo" + return 1 + fi + + # Extract release tag + local tag + tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + + if [[ -z "$tag" ]]; then + msg_error "No release tag found for $repo" + return 1 + fi + + msg_ok "Found release: $tag for $repo" + echo "$tag" +} + # This function modifies the message of the day (motd) and SSH settings motd_ssh() { grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >>/root/.bashrc From f84dd07c70f186fc7f208535f46c00c3798a3e42 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 15:52:04 +0200 Subject: [PATCH 0252/1614] Update ubuntu-install.sh --- install/ubuntu-install.sh | 52 +++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index 5b9b8ff..cee1f77 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -21,103 +21,103 @@ msg_ok "Installed Dependencies" msg_info "Check GH Releases" echo "Getting 0xERR0R/blocky..." -RELEASE=$(get_gh_release 0xERR0R/blocky) || exit 1 +RELEASE=$(get_gh_release 0xERR0R/blocky) echo "Got Version: $RELEASE" echo "Getting aceberg/WatchYourLAN..." -RELEASE=$(get_gh_release aceberg/WatchYourLAN) || exit 1 +RELEASE=$(get_gh_release aceberg/WatchYourLAN) echo "Got Version: $RELEASE" -echo "Getting actualbudget/actual-server..." -RELEASE=$(get_gh_release actualbudget/actual-server) || exit 1 +echo "Getting actualbudget/actual..." +RELEASE=$(get_gh_release actualbudget/actual) echo "Got Version: $RELEASE" echo "Getting agl/jbig2enc..." -RELEASE=$(get_gh_release agl/jbig2enc) || exit 1 +RELEASE=$(get_gh_release agl/jbig2enc) echo "Got Version: $RELEASE" echo "Getting alexta69/metube..." -RELEASE=$(get_gh_release alexta69/metube) || exit 1 +RELEASE=$(get_gh_release alexta69/metube) echo "Got Version: $RELEASE" echo "Getting AlexxIT/go2rtc..." -RELEASE=$(get_gh_release AlexxIT/go2rtc) || exit 1 +RELEASE=$(get_gh_release AlexxIT/go2rtc) echo "Got Version: $RELEASE" echo "Getting apache/tika..." -RELEASE=$(get_gh_release apache/tika) || exit 1 +RELEASE=$(get_gh_release apache/tika) echo "Got Version: $RELEASE" echo "Getting ArtifexSoftware/ghostpdl-downloads..." -RELEASE=$(get_gh_release ArtifexSoftware/ghostpdl-downloads) || exit 1 +RELEASE=$(get_gh_release ArtifexSoftware/ghostpdl-downloads) echo "Got Version: $RELEASE" echo "Getting Athou/commafeed..." -RELEASE=$(get_gh_release Athou/commafeed) || exit 1 +RELEASE=$(get_gh_release Athou/commafeed) echo "Got Version: $RELEASE" echo "Getting authelia/authelia..." -RELEASE=$(get_gh_release authelia/authelia) || exit 1 +RELEASE=$(get_gh_release authelia/authelia) echo "Got Version: $RELEASE" echo "Getting azukaar/Cosmos-Server..." -RELEASE=$(get_gh_release azukaar/Cosmos-Server) || exit 1 +RELEASE=$(get_gh_release azukaar/Cosmos-Server) echo "Got Version: $RELEASE" echo "Getting bastienwirtz/homer..." -RELEASE=$(get_gh_release bastienwirtz/homer) || exit 1 +RELEASE=$(get_gh_release bastienwirtz/homer) echo "Got Version: $RELEASE" echo "Getting benjaminjonard/koillection..." -RELEASE=$(get_gh_release benjaminjonard/koillection) || exit 1 +RELEASE=$(get_gh_release benjaminjonard/koillection) echo "Got Version: $RELEASE" echo "Getting benzino77/tasmocompiler..." -RELEASE=$(get_gh_release benzino77/tasmocompiler) || exit 1 +RELEASE=$(get_gh_release benzino77/tasmocompiler) echo "Got Version: $RELEASE" echo "Getting blakeblackshear/frigate..." -RELEASE=$(get_gh_release blakeblackshear/frigate) || exit 1 +RELEASE=$(get_gh_release blakeblackshear/frigate) echo "Got Version: $RELEASE" echo "Getting bluenviron/mediamtx..." -RELEASE=$(get_gh_release bluenviron/mediamtx) || exit 1 +RELEASE=$(get_gh_release bluenviron/mediamtx) echo "Got Version: $RELEASE" echo "Getting BookStackApp/BookStack..." -RELEASE=$(get_gh_release BookStackApp/BookStack) || exit 1 +RELEASE=$(get_gh_release BookStackApp/BookStack) echo "Got Version: $RELEASE" echo "Getting browserless/chrome..." -RELEASE=$(get_gh_release browserless/chrome) || exit 1 +RELEASE=$(get_gh_release browserless/chrome) echo "Got Version: $RELEASE" echo "Getting Bubka/2FAuth..." -RELEASE=$(get_gh_release Bubka/2FAuth) || exit 1 +RELEASE=$(get_gh_release Bubka/2FAuth) echo "Got Version: $RELEASE" echo "Getting caddyserver/xcaddy..." -RELEASE=$(get_gh_release caddyserver/xcaddy) || exit 1 +RELEASE=$(get_gh_release caddyserver/xcaddy) echo "Got Version: $RELEASE" echo "Getting clusterzx/paperless-ai..." -RELEASE=$(get_gh_release clusterzx/paperless-ai) || exit 1 +RELEASE=$(get_gh_release clusterzx/paperless-ai) echo "Got Version: $RELEASE" echo "Getting cockpit-project/cockpit..." -RELEASE=$(get_gh_release cockpit-project/cockpit) || exit 1 +RELEASE=$(get_gh_release cockpit-project/cockpit) echo "Got Version: $RELEASE" echo "Getting community-scripts/ProxmoxVE..." -RELEASE=$(get_gh_release community-scripts/ProxmoxVE) || exit 1 +RELEASE=$(get_gh_release community-scripts/ProxmoxVE) echo "Got Version: $RELEASE" echo "Getting CorentinTh/it-tools..." -RELEASE=$(get_gh_release CorentinTh/it-tools) || exit 1 +RELEASE=$(get_gh_release CorentinTh/it-tools) echo "Got Version: $RELEASE" echo "Getting dani-garcia/bw_web_builds..." -RELEASE=$(get_gh_release dani-garcia/bw_web_builds) || exit 1 +RELEASE=$(get_gh_release dani-garcia/bw_web_builds) echo "Got Version: $RELEASE" msg_ok "Done" From e434c1738ee1abf9f83a1e93fdb5117645d297d6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:00:12 +0200 Subject: [PATCH 0253/1614] Update install.func --- misc/install.func | 55 +++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/misc/install.func b/misc/install.func index f53f129..c856dd8 100644 --- a/misc/install.func +++ b/misc/install.func @@ -222,6 +222,10 @@ get_gh_release() { local repo="$1" local api_url="https://api.github.com/repos/$repo/releases/latest" local header=() + local attempts=0 + local max_attempts=3 + local delay=2 + local api_response tag message # Ensure jq is installed if ! command -v jq &>/dev/null; then @@ -229,33 +233,46 @@ get_gh_release() { apt-get update &>/dev/null apt-get install -y jq &>/dev/null && msg_ok "jq installed" || { msg_error "Failed to install jq" - return 1 + exit_script } fi - # Optional: GitHub Token for higher rate limit [[ -n "$GITHUB_TOKEN" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") - # Info output - msg_info "Fetching GitHub release for $repo" - local api_response - if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then - msg_error "Request failed for $repo" - return 1 - fi + while ((attempts < max_attempts)); do + ((attempts++)) + msg_info "Fetching GitHub release for $repo (Attempt $attempts/$max_attempts)" - # Extract release tag - local tag - tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') - [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then + msg_error "HTTP request failed for $repo" + else + # Check for errors in the API response + message=$(echo "$api_response" | jq -r '.message // empty') + if [[ "$message" == "Not Found" ]]; then + msg_error "Repository '$repo' does not exist or has no releases" + exit_script + elif [[ "$message" == "API rate limit exceeded" ]]; then + msg_error "GitHub API rate limit exceeded. Set GITHUB_TOKEN to increase limits." + exit_script + fi - if [[ -z "$tag" ]]; then - msg_error "No release tag found for $repo" - return 1 - fi + tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" - msg_ok "Found release: $tag for $repo" - echo "$tag" + if [[ -n "$tag" ]]; then + msg_ok "Found release: $tag for $repo" + echo "$tag" + return 0 + else + msg_error "No release tag found in response for $repo" + fi + fi + + ((attempts < max_attempts)) && sleep "$delay" + done + + msg_error "Giving up after $max_attempts attempts for $repo" + exit_script } # This function modifies the message of the day (motd) and SSH settings From 20adb818021cab9cfd22273a4e4c7f3e82278e1e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:04:49 +0200 Subject: [PATCH 0254/1614] Update install.func --- misc/install.func | 102 ++++++++++++++++++++++++++++++---------------- 1 file changed, 66 insertions(+), 36 deletions(-) diff --git a/misc/install.func b/misc/install.func index c856dd8..419380e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -29,11 +29,7 @@ color() { CROSS="${TAB}✖️${TAB}${CL}" INFO="${TAB}💡${TAB}${CL}" NETWORK="${TAB}📡${TAB}${CL}" - OS="${TAB}🖥️${TAB}${CL}" - OSVERSION="${TAB}🌟${TAB}${CL}" HOSTNAME="${TAB}🏠${TAB}${CL}" - GATEWAY="${TAB}🌐${TAB}${CL}" - DEFAULT="${TAB}⚙️${TAB}${CL}" } # Function to set STD mode based on verbosity @@ -220,12 +216,11 @@ EOF get_gh_release() { local repo="$1" + local application="$2" local api_url="https://api.github.com/repos/$repo/releases/latest" local header=() - local attempts=0 - local max_attempts=3 - local delay=2 - local api_response tag message + local retries=3 + local release="" # Ensure jq is installed if ! command -v jq &>/dev/null; then @@ -233,46 +228,81 @@ get_gh_release() { apt-get update &>/dev/null apt-get install -y jq &>/dev/null && msg_ok "jq installed" || { msg_error "Failed to install jq" - exit_script + exit 1 } fi [[ -n "$GITHUB_TOKEN" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") - while ((attempts < max_attempts)); do - ((attempts++)) - msg_info "Fetching GitHub release for $repo (Attempt $attempts/$max_attempts)" + for attempt in $(seq 1 $retries); do + msg_info "Fetching GitHub release for $repo (attempt $attempt)" + api_response=$(curl -fsSL "${header[@]}" "$api_url") || { + msg_warn "Request failed for $repo (attempt $attempt)" + sleep 2 + continue + } - if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then - msg_error "HTTP request failed for $repo" - else - # Check for errors in the API response - message=$(echo "$api_response" | jq -r '.message // empty') + # Handle API errors + if echo "$api_response" | jq -e '.message' &>/dev/null; then + message=$(echo "$api_response" | jq -r '.message') if [[ "$message" == "Not Found" ]]; then - msg_error "Repository '$repo' does not exist or has no releases" - exit_script - elif [[ "$message" == "API rate limit exceeded" ]]; then - msg_error "GitHub API rate limit exceeded. Set GITHUB_TOKEN to increase limits." - exit_script - fi - - tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') - [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" - - if [[ -n "$tag" ]]; then - msg_ok "Found release: $tag for $repo" - echo "$tag" - return 0 - else - msg_error "No release tag found in response for $repo" + msg_error "Repository not found: $repo" + return 1 + elif [[ "$message" == *"API rate limit exceeded"* ]]; then + msg_error "GitHub API rate limit exceeded. Set GITHUB_TOKEN to avoid this." + return 1 fi fi - ((attempts < max_attempts)) && sleep "$delay" + release=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + [[ "$release" =~ ^v[0-9] ]] && release="${release:1}" + + if [[ -n "$release" ]]; then + msg_ok "Found release: $release for $repo" + break + fi + + msg_warn "No release tag found (attempt $attempt)" + sleep 2 done - msg_error "Giving up after $max_attempts attempts for $repo" - exit_script + [[ -z "$release" ]] && { + msg_error "Unable to retrieve release after $retries attempts" + return 1 + } + + # Write version to version file if not exists + local version_file="/opt/${application}_version.txt" + if [[ ! -f "$version_file" ]]; then + echo "$release" >"$version_file" + msg_ok "Saved version $release to $version_file" + else + msg_info "Version file already exists: $version_file" + fi + + # Download and extract tarball + local temp_file=$(mktemp) + local tarball_url="https://github.com/${repo}/archive/refs/tags/v${release}.tar.gz" + + msg_info "Downloading $repo v$release" + curl -fsSL "$tarball_url" -o "$temp_file" || { + msg_error "Failed to download tarball from $tarball_url" + return 1 + } + + mkdir -p "/opt/$application" + tar -xzf "$temp_file" -C /opt || { + msg_error "Failed to extract archive" + return 1 + } + + extracted_folder=$(tar -tzf "$temp_file" | head -1 | cut -f1 -d"/") + mv "/opt/$extracted_folder" "/opt/$application" &>/dev/null || true + + rm -f "$temp_file" + + msg_ok "$application v$release installed at /opt/$application" + echo "$release" } # This function modifies the message of the day (motd) and SSH settings From 1470de4576a691dffa906954ea430441dcdf318b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:09:19 +0200 Subject: [PATCH 0255/1614] Update install.func --- misc/install.func | 128 +++++++++++++++++++--------------------------- 1 file changed, 54 insertions(+), 74 deletions(-) diff --git a/misc/install.func b/misc/install.func index 419380e..ca60e1e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -216,93 +216,73 @@ EOF get_gh_release() { local repo="$1" - local application="$2" + local app="$2" local api_url="https://api.github.com/repos/$repo/releases/latest" local header=() - local retries=3 - local release="" - - # Ensure jq is installed - if ! command -v jq &>/dev/null; then - msg_info "Installing jq (required for GitHub API parsing)" - apt-get update &>/dev/null - apt-get install -y jq &>/dev/null && msg_ok "jq installed" || { - msg_error "Failed to install jq" - exit 1 - } - fi + local attempt=0 + local max_attempts=3 + local api_response tag [[ -n "$GITHUB_TOKEN" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") - for attempt in $(seq 1 $retries); do - msg_info "Fetching GitHub release for $repo (attempt $attempt)" - api_response=$(curl -fsSL "${header[@]}" "$api_url") || { - msg_warn "Request failed for $repo (attempt $attempt)" + # Retry loop + until [[ $attempt -ge $max_attempts ]]; do + ((attempt++)) + msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo" + if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then + msg_warn "Request failed for $repo, retrying..." sleep 2 continue - } - - # Handle API errors - if echo "$api_response" | jq -e '.message' &>/dev/null; then - message=$(echo "$api_response" | jq -r '.message') - if [[ "$message" == "Not Found" ]]; then - msg_error "Repository not found: $repo" - return 1 - elif [[ "$message" == *"API rate limit exceeded"* ]]; then - msg_error "GitHub API rate limit exceeded. Set GITHUB_TOKEN to avoid this." - return 1 - fi fi - release=$(echo "$api_response" | jq -r '.tag_name // .name // empty') - [[ "$release" =~ ^v[0-9] ]] && release="${release:1}" - - if [[ -n "$release" ]]; then - msg_ok "Found release: $release for $repo" - break + # Check for rate limit + if echo "$api_response" | grep -q "API rate limit exceeded"; then + msg_error "GitHub API rate limit exceeded. Set GITHUB_TOKEN to increase limit." + return 1 fi - msg_warn "No release tag found (attempt $attempt)" - sleep 2 + # Check if repo not found + if echo "$api_response" | jq -e '.message == "Not Found"' &>/dev/null; then + msg_error "Repository not found: $repo" + return 1 + fi + + tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + + if [[ -z "$tag" ]]; then + msg_warn "Empty tag received, retrying..." + sleep 2 + continue + fi + + msg_ok "Found release: $tag for $repo" + + # Save version file if not exists + local version_file="/opt/${app}_version.txt" + [[ ! -f "$version_file" ]] && echo "$tag" >"$version_file" + + # Download tarball + local temp_file + temp_file=$(mktemp) + local tarball_url="https://github.com/$repo/archive/refs/tags/v$tag.tar.gz" + msg_info "Downloading tarball for $repo..." + if ! curl -fsSL "$tarball_url" -o "$temp_file"; then + msg_error "Failed to download tarball: $tarball_url" + return 1 + fi + + mkdir -p "/opt/$app" + tar -xzf "$temp_file" -C /opt + mv /opt/"$(basename "$repo")-$tag"/* "/opt/$app/" 2>/dev/null + rm -rf "/opt/$(basename "$repo")-$tag" + + echo "$tag" + return 0 done - [[ -z "$release" ]] && { - msg_error "Unable to retrieve release after $retries attempts" - return 1 - } - - # Write version to version file if not exists - local version_file="/opt/${application}_version.txt" - if [[ ! -f "$version_file" ]]; then - echo "$release" >"$version_file" - msg_ok "Saved version $release to $version_file" - else - msg_info "Version file already exists: $version_file" - fi - - # Download and extract tarball - local temp_file=$(mktemp) - local tarball_url="https://github.com/${repo}/archive/refs/tags/v${release}.tar.gz" - - msg_info "Downloading $repo v$release" - curl -fsSL "$tarball_url" -o "$temp_file" || { - msg_error "Failed to download tarball from $tarball_url" - return 1 - } - - mkdir -p "/opt/$application" - tar -xzf "$temp_file" -C /opt || { - msg_error "Failed to extract archive" - return 1 - } - - extracted_folder=$(tar -tzf "$temp_file" | head -1 | cut -f1 -d"/") - mv "/opt/$extracted_folder" "/opt/$application" &>/dev/null || true - - rm -f "$temp_file" - - msg_ok "$application v$release installed at /opt/$application" - echo "$release" + msg_error "Failed to fetch release for $repo after $max_attempts attempts." + return 1 } # This function modifies the message of the day (motd) and SSH settings From 0670484b70703c2d1fdb95b31213d521bda58d34 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:10:27 +0200 Subject: [PATCH 0256/1614] Update install.func --- misc/install.func | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/misc/install.func b/misc/install.func index ca60e1e..096d0fa 100644 --- a/misc/install.func +++ b/misc/install.func @@ -148,6 +148,12 @@ setting_up_container() { msg_ok "Network Connected: ${BL}$(hostname -I)" } +exit_script() { + clear + echo -e "\n${CROSS}${RD}Script aborted.${CL}\n" + exit +} + # This function checks the network connection by pinging a known IP address and prompts the user to continue if the internet is not connected network_check() { set +e From c39afae9578e0c4f74be3760a6e117dc4a7e8aad Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:15:09 +0200 Subject: [PATCH 0257/1614] Update install.func --- misc/install.func | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/misc/install.func b/misc/install.func index 096d0fa..6ec0296 100644 --- a/misc/install.func +++ b/misc/install.func @@ -222,7 +222,7 @@ EOF get_gh_release() { local repo="$1" - local app="$2" + local app="${repo##*/}" # extract the app name from the repo URL local api_url="https://api.github.com/repos/$repo/releases/latest" local header=() local attempt=0 @@ -231,7 +231,6 @@ get_gh_release() { [[ -n "$GITHUB_TOKEN" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") - # Retry loop until [[ $attempt -ge $max_attempts ]]; do ((attempt++)) msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo" @@ -241,13 +240,11 @@ get_gh_release() { continue fi - # Check for rate limit if echo "$api_response" | grep -q "API rate limit exceeded"; then msg_error "GitHub API rate limit exceeded. Set GITHUB_TOKEN to increase limit." return 1 fi - # Check if repo not found if echo "$api_response" | jq -e '.message == "Not Found"' &>/dev/null; then msg_error "Repository not found: $repo" return 1 @@ -264,11 +261,11 @@ get_gh_release() { msg_ok "Found release: $tag for $repo" - # Save version file if not exists + # save version to file local version_file="/opt/${app}_version.txt" [[ ! -f "$version_file" ]] && echo "$tag" >"$version_file" - # Download tarball + # Download and extract local temp_file temp_file=$(mktemp) local tarball_url="https://github.com/$repo/archive/refs/tags/v$tag.tar.gz" @@ -280,8 +277,8 @@ get_gh_release() { mkdir -p "/opt/$app" tar -xzf "$temp_file" -C /opt - mv /opt/"$(basename "$repo")-$tag"/* "/opt/$app/" 2>/dev/null - rm -rf "/opt/$(basename "$repo")-$tag" + mv "/opt/${app}-${tag}"/* "/opt/$app/" 2>/dev/null || msg_warn "Could not move extracted files." + rm -rf "/opt/${app}-${tag}" echo "$tag" return 0 From f5a5b93b2e473d2ab0d5f83cccd3fb832662e81a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:24:09 +0200 Subject: [PATCH 0258/1614] Update install.func --- misc/install.func | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/misc/install.func b/misc/install.func index 6ec0296..e99fe33 100644 --- a/misc/install.func +++ b/misc/install.func @@ -222,7 +222,7 @@ EOF get_gh_release() { local repo="$1" - local app="${repo##*/}" # extract the app name from the repo URL + local app="${repo##*/}" local api_url="https://api.github.com/repos/$repo/releases/latest" local header=() local attempt=0 @@ -234,6 +234,7 @@ get_gh_release() { until [[ $attempt -ge $max_attempts ]]; do ((attempt++)) msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo" + if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then msg_warn "Request failed for $repo, retrying..." sleep 2 @@ -241,7 +242,7 @@ get_gh_release() { fi if echo "$api_response" | grep -q "API rate limit exceeded"; then - msg_error "GitHub API rate limit exceeded. Set GITHUB_TOKEN to increase limit." + msg_error "GitHub API rate limit exceeded." return 1 fi @@ -261,15 +262,14 @@ get_gh_release() { msg_ok "Found release: $tag for $repo" - # save version to file local version_file="/opt/${app}_version.txt" [[ ! -f "$version_file" ]] && echo "$tag" >"$version_file" - # Download and extract local temp_file temp_file=$(mktemp) local tarball_url="https://github.com/$repo/archive/refs/tags/v$tag.tar.gz" - msg_info "Downloading tarball for $repo..." + msg_info "Downloading tarball..." + if ! curl -fsSL "$tarball_url" -o "$temp_file"; then msg_error "Failed to download tarball: $tarball_url" return 1 From 1fa00c4046cab24eace771d030c4d5a9dfb3940d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:32:08 +0200 Subject: [PATCH 0259/1614] Update install.func --- misc/install.func | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index e99fe33..2082183 100644 --- a/misc/install.func +++ b/misc/install.func @@ -221,6 +221,9 @@ EOF } get_gh_release() { + set -Eeuo pipefail + trap 'echo -e "\n❌ [get_gh_release] Error on line $LINENO: $BASH_COMMAND"' ERR + local repo="$1" local app="${repo##*/}" local api_url="https://api.github.com/repos/$repo/releases/latest" @@ -229,7 +232,7 @@ get_gh_release() { local max_attempts=3 local api_response tag - [[ -n "$GITHUB_TOKEN" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") + [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") until [[ $attempt -ge $max_attempts ]]; do ((attempt++)) From 28591895f035c274882c7ce08d96b6bbf67f1d84 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:36:41 +0200 Subject: [PATCH 0260/1614] Update install.func --- misc/install.func | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/misc/install.func b/misc/install.func index 2082183..01b1522 100644 --- a/misc/install.func +++ b/misc/install.func @@ -268,21 +268,6 @@ get_gh_release() { local version_file="/opt/${app}_version.txt" [[ ! -f "$version_file" ]] && echo "$tag" >"$version_file" - local temp_file - temp_file=$(mktemp) - local tarball_url="https://github.com/$repo/archive/refs/tags/v$tag.tar.gz" - msg_info "Downloading tarball..." - - if ! curl -fsSL "$tarball_url" -o "$temp_file"; then - msg_error "Failed to download tarball: $tarball_url" - return 1 - fi - - mkdir -p "/opt/$app" - tar -xzf "$temp_file" -C /opt - mv "/opt/${app}-${tag}"/* "/opt/$app/" 2>/dev/null || msg_warn "Could not move extracted files." - rm -rf "/opt/${app}-${tag}" - echo "$tag" return 0 done @@ -291,6 +276,32 @@ get_gh_release() { return 1 } +fetch_and_extract_gh_release() { + set -Eeuo pipefail + trap 'echo -e "\n❌ [fetch_and_extract_gh_release] Error on line $LINENO: $BASH_COMMAND"' ERR + + local repo="$1" + local tag="$2" + local app="${repo##*/}" + + local temp_file + temp_file=$(mktemp) + local tarball_url="https://github.com/$repo/archive/refs/tags/v$tag.tar.gz" + + msg_info "Downloading tarball for $app..." + if ! curl -fsSL "$tarball_url" -o "$temp_file"; then + msg_error "Failed to download tarball: $tarball_url" + return 1 + fi + + mkdir -p "/opt/$app" + tar -xzf "$temp_file" -C /opt + mv "/opt/${app}-${tag}"/* "/opt/$app/" 2>/dev/null || msg_warn "Could not move extracted files." + rm -rf "/opt/${app}-${tag}" + + msg_ok "Extracted $app to /opt/$app" +} + # This function modifies the message of the day (motd) and SSH settings motd_ssh() { grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >>/root/.bashrc From 8a9b8eaff53febcc22c786fd8ca8eb3d5feffbd5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:48:41 +0200 Subject: [PATCH 0261/1614] add test --- misc/build.func | 1 + misc/github.func | 82 +++++++++++++++++++++++++++++++++++++++++++++++ misc/install.func | 82 ----------------------------------------------- 3 files changed, 83 insertions(+), 82 deletions(-) create mode 100644 misc/github.func diff --git a/misc/build.func b/misc/build.func index 5a70a74..c884f0a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -15,6 +15,7 @@ variables() { } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { diff --git a/misc/github.func b/misc/github.func new file mode 100644 index 0000000..6c8d7b9 --- /dev/null +++ b/misc/github.func @@ -0,0 +1,82 @@ +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +get_gh_release() { + set -Eeuo pipefail + trap 'echo -e "\n❌ [get_gh_release] Error on line $LINENO: $BASH_COMMAND"' ERR + + local repo="$1" + local app="${repo##*/}" + local api_url="https://api.github.com/repos/$repo/releases/latest" + local header=() + local attempt=0 + local max_attempts=3 + local api_response tag + + [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") + + until [[ $attempt -ge $max_attempts ]]; do + ((attempt++)) + msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo" + + if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then + msg_warn "Request failed for $repo, retrying..." + sleep 2 + continue + fi + + if echo "$api_response" | grep -q "API rate limit exceeded"; then + msg_error "GitHub API rate limit exceeded." + return 1 + fi + + if echo "$api_response" | jq -e '.message == "Not Found"' &>/dev/null; then + msg_error "Repository not found: $repo" + return 1 + fi + + tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + + if [[ -z "$tag" ]]; then + msg_error "Empty tag received, retrying..." + sleep 2 + continue + fi + + msg_ok "Found release: $tag for $repo" + + local version_file="/opt/${app}_version.txt" + [[ ! -f "$version_file" ]] && echo "$tag" >"$version_file" + + echo "$tag" + return 0 + done + + msg_error "Failed to fetch release for $repo after $max_attempts attempts." + return 1 +} + +fetch_and_extract_gh_release() { + set -Eeuo pipefail + trap 'echo -e "\n❌ [fetch_and_extract_gh_release] Error on line $LINENO: $BASH_COMMAND"' ERR + + local repo="$1" + local tag="$2" + local app="${repo##*/}" + + local temp_file + temp_file=$(mktemp) + local tarball_url="https://github.com/$repo/archive/refs/tags/v$tag.tar.gz" + + msg_info "Downloading tarball for $app..." + if ! curl -fsSL "$tarball_url" -o "$temp_file"; then + msg_error "Failed to download tarball: $tarball_url" + return 1 + fi + + mkdir -p "/opt/$app" + tar -xzf "$temp_file" -C /opt + mv "/opt/${app}-${tag}"/* "/opt/$app/" 2>/dev/null || msg_warn "Could not move extracted files." + rm -rf "/opt/${app}-${tag}" + + msg_ok "Extracted $app to /opt/$app" +} diff --git a/misc/install.func b/misc/install.func index 01b1522..2a730fb 100644 --- a/misc/install.func +++ b/misc/install.func @@ -220,88 +220,6 @@ EOF msg_ok "Core dependencies installed" } -get_gh_release() { - set -Eeuo pipefail - trap 'echo -e "\n❌ [get_gh_release] Error on line $LINENO: $BASH_COMMAND"' ERR - - local repo="$1" - local app="${repo##*/}" - local api_url="https://api.github.com/repos/$repo/releases/latest" - local header=() - local attempt=0 - local max_attempts=3 - local api_response tag - - [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") - - until [[ $attempt -ge $max_attempts ]]; do - ((attempt++)) - msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo" - - if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then - msg_warn "Request failed for $repo, retrying..." - sleep 2 - continue - fi - - if echo "$api_response" | grep -q "API rate limit exceeded"; then - msg_error "GitHub API rate limit exceeded." - return 1 - fi - - if echo "$api_response" | jq -e '.message == "Not Found"' &>/dev/null; then - msg_error "Repository not found: $repo" - return 1 - fi - - tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') - [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" - - if [[ -z "$tag" ]]; then - msg_warn "Empty tag received, retrying..." - sleep 2 - continue - fi - - msg_ok "Found release: $tag for $repo" - - local version_file="/opt/${app}_version.txt" - [[ ! -f "$version_file" ]] && echo "$tag" >"$version_file" - - echo "$tag" - return 0 - done - - msg_error "Failed to fetch release for $repo after $max_attempts attempts." - return 1 -} - -fetch_and_extract_gh_release() { - set -Eeuo pipefail - trap 'echo -e "\n❌ [fetch_and_extract_gh_release] Error on line $LINENO: $BASH_COMMAND"' ERR - - local repo="$1" - local tag="$2" - local app="${repo##*/}" - - local temp_file - temp_file=$(mktemp) - local tarball_url="https://github.com/$repo/archive/refs/tags/v$tag.tar.gz" - - msg_info "Downloading tarball for $app..." - if ! curl -fsSL "$tarball_url" -o "$temp_file"; then - msg_error "Failed to download tarball: $tarball_url" - return 1 - fi - - mkdir -p "/opt/$app" - tar -xzf "$temp_file" -C /opt - mv "/opt/${app}-${tag}"/* "/opt/$app/" 2>/dev/null || msg_warn "Could not move extracted files." - rm -rf "/opt/${app}-${tag}" - - msg_ok "Extracted $app to /opt/$app" -} - # This function modifies the message of the day (motd) and SSH settings motd_ssh() { grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >>/root/.bashrc From 41da1d2def211b7671ceb28293efaece4dddf818 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:49:32 +0200 Subject: [PATCH 0262/1614] Update github.func --- misc/github.func | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/misc/github.func b/misc/github.func index 6c8d7b9..c85ee75 100644 --- a/misc/github.func +++ b/misc/github.func @@ -1,4 +1,5 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) + get_gh_release() { set -Eeuo pipefail trap 'echo -e "\n❌ [get_gh_release] Error on line $LINENO: $BASH_COMMAND"' ERR @@ -11,6 +12,8 @@ get_gh_release() { local max_attempts=3 local api_response tag + echo "🔍 Checking latest release for: $repo" + [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") until [[ $attempt -ge $max_attempts ]]; do @@ -45,7 +48,10 @@ get_gh_release() { msg_ok "Found release: $tag for $repo" local version_file="/opt/${app}_version.txt" - [[ ! -f "$version_file" ]] && echo "$tag" >"$version_file" + if [[ ! -f "$version_file" ]]; then + echo "$tag" >"$version_file" + echo "📝 Saved version info to $version_file" + fi echo "$tag" return 0 @@ -67,13 +73,14 @@ fetch_and_extract_gh_release() { temp_file=$(mktemp) local tarball_url="https://github.com/$repo/archive/refs/tags/v$tag.tar.gz" - msg_info "Downloading tarball for $app..." + msg_info "Downloading tarball for $app from $tarball_url..." if ! curl -fsSL "$tarball_url" -o "$temp_file"; then msg_error "Failed to download tarball: $tarball_url" return 1 fi mkdir -p "/opt/$app" + echo "📦 Extracting tarball to /opt/$app..." tar -xzf "$temp_file" -C /opt mv "/opt/${app}-${tag}"/* "/opt/$app/" 2>/dev/null || msg_warn "Could not move extracted files." rm -rf "/opt/${app}-${tag}" From f70cc74c591792db606a2fac380354ba44aa6c5a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:52:47 +0200 Subject: [PATCH 0263/1614] Update github.func --- misc/github.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/github.func b/misc/github.func index c85ee75..4bbe1ca 100644 --- a/misc/github.func +++ b/misc/github.func @@ -1,4 +1,4 @@ -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +#source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) get_gh_release() { set -Eeuo pipefail From 184d01387027dd7ed29e7d94aa95df0f7e7d3c6d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:54:14 +0200 Subject: [PATCH 0264/1614] Update build.func --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index c884f0a..d272e09 100644 --- a/misc/build.func +++ b/misc/build.func @@ -15,7 +15,7 @@ variables() { } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) +#source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { From c9b9d35d017127c75383979dae68ab01bf8884ec Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:54:34 +0200 Subject: [PATCH 0265/1614] Update github.func --- misc/github.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/github.func b/misc/github.func index 4bbe1ca..c85ee75 100644 --- a/misc/github.func +++ b/misc/github.func @@ -1,4 +1,4 @@ -#source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) get_gh_release() { set -Eeuo pipefail From 96548a7890b1c2a9037c1ea588d6302da56e87ba Mon Sep 17 00:00:00 2001 From: vhsdream Date: Tue, 1 Apr 2025 17:39:38 -0400 Subject: [PATCH 0266/1614] Immich: simplify ML run script; other small changes --- install/immich-install.sh | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/install/immich-install.sh b/install/immich-install.sh index 47571b7..9eaba75 100644 --- a/install/immich-install.sh +++ b/install/immich-install.sh @@ -258,7 +258,7 @@ ML_DIR="${APP_DIR}/machine-learning" GEO_DIR="${INSTALL_DIR}/geodata" mkdir -p ${INSTALL_DIR} mv ${APPLICATION}-${RELEASE}/ ${SRC_DIR} -mkdir -p {${APP_DIR},${UPLOAD_DIR},${GEO_DIR},${ML_DIR},${INSTALL_DIR}/cache} +mkdir -p {${APP_DIR},${UPLOAD_DIR},${GEO_DIR},${ML_DIR},${INSTALL_DIR}/.cache} cd ${SRC_DIR}/server $STD npm ci @@ -284,12 +284,13 @@ $STD python3 -m venv ${ML_DIR}/ml-venv $STD uv sync --extra cpu --active ) cd ${SRC_DIR} -cp -a machine-learning/{ann,start.sh,app} ${ML_DIR} +cp -a machine-learning/{ann,immich_ml} ${ML_DIR} ln -sf ${APP_DIR}/resources ${INSTALL_DIR} cd ${APP_DIR} -grep -Rl /usr/src | xargs -n1 sed -i "s|\/usr/src|$INSTALL_DIR|g" -sed -i "s|\"/cache\"|\"$INSTALL_DIR/cache\"|g" $ML_DIR/app/config.py +grep -RlI /usr/src . --exclude="*.py*" --exclude="*.json" | + xargs -n1 sed -i "s|\/usr/src|$INSTALL_DIR|g" +# sed -i "s|\"/cache\"|\"$INSTALL_DIR/cache\"|g" $ML_DIR/immich_ml/config.py grep -RlE "'/build'" | xargs -n1 sed -i "s|'/build'|'$APP_DIR'|g" ln -s ${UPLOAD_DIR} ${APP_DIR}/upload ln -s ${UPLOAD_DIR} ${ML_DIR}/upload @@ -334,27 +335,17 @@ DB_VECTOR_EXTENSION=pgvector REDIS_HOSTNAME=localhost -MACHINE_LEARNING_CACHE_FOLDER=${INSTALL_DIR}/cache +MACHINE_LEARNING_CACHE_FOLDER=${INSTALL_DIR}/.cache EOF -cat <${ML_DIR}/start.sh +cat <${ML_DIR}/ml_start.sh #!/usr/bin/env bash cd ${ML_DIR} . ml-venv/bin/activate -: "\${MACHINE_LEARNING_HOST:=127.0.0.1}" -: "\${MACHINE_LEARNING_PORT:=3003}" -: "\${MACHINE_LEARNING_WORKERS:=1}" -: "\${MACHINE_LEARNING_WORKER_TIMEOUT:=120}" - -exec gunicorn app.main:app \ - -k app.config.CustomUvicornWorker \ - -w "\$MACHINE_LEARNING_WORKERS" \ - -b "\$MACHINE_LEARNING_HOST":"\$MACHINE_LEARNING_PORT" \ - -t "\$MACHINE_LEARNING_WORKER_TIMEOUT" \ - --log-config-json log_conf.json \ - --graceful-timeout 0 +python -m immich_ml EOF +chmod +x ${ML_DIR}/ml_start.sh cat </etc/systemd/system/${APPLICATION}-web.service [Unit] Description=${APPLICATION} Web Service @@ -387,7 +378,7 @@ Type=simple User=root WorkingDirectory=${APP_DIR} EnvironmentFile=${INSTALL_DIR}/.env -ExecStart=${ML_DIR}/start.sh +ExecStart=${ML_DIR}/ml_start.sh Restart=on-failure SyslogIdentifier=immich-machine-learning StandardOutput=append:/var/log/immich/ml.log From d050d1eaeaf1a208548817bd444cb49959f4de81 Mon Sep 17 00:00:00 2001 From: Don Locke Date: Tue, 1 Apr 2025 17:08:21 -0600 Subject: [PATCH 0267/1614] add AllStarLink Script --- ct/allstarlink.sh | 44 +++++++++++++++++++ ct/headers/allstarlink | 5 +++ frontend/public/json/allstarlink.json | 39 +++++++++++++++++ install/allstarlink-install.sh | 62 +++++++++++++++++++++++++++ 4 files changed, 150 insertions(+) create mode 100644 ct/allstarlink.sh create mode 100644 ct/headers/allstarlink create mode 100644 frontend/public/json/allstarlink.json create mode 100644 install/allstarlink-install.sh diff --git a/ct/allstarlink.sh b/ct/allstarlink.sh new file mode 100644 index 0000000..b9e6106 --- /dev/null +++ b/ct/allstarlink.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Don Locke (DonLocke) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/AllStarLink + +APP="AllStarLink" +var_tags="radio" +var_cpu="1" +var_ram="512" +var_disk="8" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /etc/asterisk ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + $STD apt-get update + $STD DEBIAN_FRONTEND=noninteractive apt-get -y upgrade + msg_ok "Updated $APP LXC" + 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}/allmon3${CL}" diff --git a/ct/headers/allstarlink b/ct/headers/allstarlink new file mode 100644 index 0000000..9b97c4a --- /dev/null +++ b/ct/headers/allstarlink @@ -0,0 +1,5 @@ + ___ ____ ____ __ __ _ __ + / | / / / ___// /_____ ______/ / (_)___ / /__ + / /| | / / /\__ \/ __/ __ `/ ___/ / / / __ \/ //_/ + / ___ |/ / /___/ / /_/ /_/ / / / /___/ / / / / ,< +/_/ |_/_/_/_____/\__/\__,_/_/ /_____/_/_/ /_/_/|_| diff --git a/frontend/public/json/allstarlink.json b/frontend/public/json/allstarlink.json new file mode 100644 index 0000000..515c463 --- /dev/null +++ b/frontend/public/json/allstarlink.json @@ -0,0 +1,39 @@ +{ + "name": "AllStarLink", + "slug": "allstarlink", + "categories": [ + 24 + ], + "date_created": "2025-3-30", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://allstarlink.github.io/", + "website": "https://www.allstarlink.org/", + "logo": "https://raw.githubusercontent.com/AllStarLink/ASL3-Manual/blob/main/docs/assets/allstar-logo-small.png", + "description": "AllStarLink is a network of Amateur Radio repeaters, remote base stations and hot spots accessible to each other via Voice over Internet Protocol.", + "install_methods": [ + { + "type": "default", + "script": "ct/allstarlink.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 8, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Options to Install Allmon3", + "type": "info" + } + ] +} diff --git a/install/allstarlink-install.sh b/install/allstarlink-install.sh new file mode 100644 index 0000000..38d327e --- /dev/null +++ b/install/allstarlink-install.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Don Locke (DonLocke) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/AllStarLink + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Adding ASL Package Repository" +wget -q -P /tmp https://repo.allstarlink.org/public/asl-apt-repos.deb12_all.deb +$STD dpkg -i /tmp/asl-apt-repos.deb12_all.deb +$STD apt-get update +msg_ok "Added ASL Package Repository" + +msg_info "Installing AllStarLink" +$STD apt-get install -y asl3 +msg_ok "Installed AllStarLink" + +msg_info "Configuring AllStarLink" +sed -i "/secret /s/= .*/= $(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)/" /etc/asterisk/manager.conf +msg_ok "Configured AllStarLink" + +read -r -p "Would you like to set up AllStarLink Node now? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + node-setup +else + msg_warn "You will need to run \`node-setup\` before you can connect to the AllStarLink Network." +fi + +read -r -p "Would you like to add Allmon3? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing Allmon3" + $STD apt-get install -y allmon3 + msg_ok "Installed Allmon3" + + NODE=$(grep -oP '^\[\d+\]\(node-main\)' /etc/asterisk/rpt.conf | grep -oP '\d+') + if [[ -n $NODE ]]; then + msg_info "Configuring Allmon3" + sed -i "s/;\[1999\]/\[$NODE\]/" /etc/allmon3/allmon3.ini + sed -i "s/;host/host/" /etc/allmon3/allmon3.ini + sed -i "s/;user/user/" /etc/allmon3/allmon3.ini + sed -i "s/;pass=.*/pass=$(sed -ne 's/^secret = //p' /etc/asterisk/manager.conf)/" /etc/allmon3/allmon3.ini + systemctl restart allmon3 + msg_ok "Configured Allmon3" + fi +fi + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f /tmp/asl-apt-repos.deb12_all.deb +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 1f0281b43e1d1d2046e86cbf5e5b1dfe4cbfff4a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:05:18 +0200 Subject: [PATCH 0268/1614] UI Fix: Verbose in Header --- misc/build.func | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index d272e09..8d26eca 100644 --- a/misc/build.func +++ b/misc/build.func @@ -45,6 +45,7 @@ color() { CPUCORE="${TAB}🧠${TAB}${CL}" RAMSIZE="${TAB}🛠️${TAB}${CL}" SEARCH="${TAB}🔍${TAB}${CL}" + VERBOSE_CROPPED="🔍${TAB}" VERIFYPW="${TAB}🔐${TAB}${CL}" CONTAINERID="${TAB}🆔${TAB}${CL}" HOSTNAME="${TAB}🏠${TAB}${CL}" @@ -2142,7 +2143,7 @@ install_script() { ;; 2) header_info - echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}Verbose)${CL}" + echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${VERBOSE_CROPPED}Verbose)${CL}" VERB="yes" METHOD="default" base_settings "$VERB" From 6c717a39fc251ba8660c65e38d345acc6c5e7a97 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:19:13 +0200 Subject: [PATCH 0269/1614] Create add-iptag.json --- frontend/public/json/add-iptag.json | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 frontend/public/json/add-iptag.json diff --git a/frontend/public/json/add-iptag.json b/frontend/public/json/add-iptag.json new file mode 100644 index 0000000..6de81a7 --- /dev/null +++ b/frontend/public/json/add-iptag.json @@ -0,0 +1,47 @@ +{ + "name": "Proxmox VE LXC IP-Tag", + "slug": "add-lxc-iptag", + "categories": [ + 1 + ], + "date_created": "2025-04-02", + "type": "misc", + "updateable": false, + "privileged": false, + "interface_port": null, + "documentation": null, + "website": null, + "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/proxmox.svg", + "description": "This script automatically adds IP address as tags to LXC containers using a Systemd service. The service also updates the tags if a LXC IP address is changed.", + "install_methods": [ + { + "type": "default", + "script": "misc/add-iptag.sh", + "resources": { + "cpu": null, + "ram": null, + "hdd": null, + "os": null, + "version": null + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Execute within the Proxmox shell", + "type": "info" + }, + { + "text": "Configuration: `nano /opt/iptag/iptag.conf`. iptag.service must be restarted after change.", + "type": "info" + }, + { + "text": "The Proxmox Node must contain ipcalc and net-tools. `apt-get install -y ipcalc net-tools`", + "type": "warning" + } + ] +} From 7e1f84ae2aed835e1a01cc99125bbb83ce271c44 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:21:54 +0200 Subject: [PATCH 0270/1614] Update add-iptag.json --- frontend/public/json/add-iptag.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/add-iptag.json b/frontend/public/json/add-iptag.json index 6de81a7..9446d26 100644 --- a/frontend/public/json/add-iptag.json +++ b/frontend/public/json/add-iptag.json @@ -16,7 +16,7 @@ "install_methods": [ { "type": "default", - "script": "misc/add-iptag.sh", + "script": "scripts/tools/add-iptag.sh", "resources": { "cpu": null, "ram": null, From d856b73ab4c6d9f9a3e17a71eab630a1422af2d3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 10:42:24 +0200 Subject: [PATCH 0271/1614] Update github.func --- misc/github.func | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/misc/github.func b/misc/github.func index c85ee75..06979d5 100644 --- a/misc/github.func +++ b/misc/github.func @@ -1,9 +1,6 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) get_gh_release() { - set -Eeuo pipefail - trap 'echo -e "\n❌ [get_gh_release] Error on line $LINENO: $BASH_COMMAND"' ERR - local repo="$1" local app="${repo##*/}" local api_url="https://api.github.com/repos/$repo/releases/latest" @@ -18,10 +15,10 @@ get_gh_release() { until [[ $attempt -ge $max_attempts ]]; do ((attempt++)) - msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo" + msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then - msg_warn "Request failed for $repo, retrying..." + msg_info "Request failed, retrying...\n" sleep 2 continue fi @@ -40,19 +37,12 @@ get_gh_release() { [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" if [[ -z "$tag" ]]; then - msg_error "Empty tag received, retrying..." + msg_info "Empty tag received, retrying...\n" sleep 2 continue fi msg_ok "Found release: $tag for $repo" - - local version_file="/opt/${app}_version.txt" - if [[ ! -f "$version_file" ]]; then - echo "$tag" >"$version_file" - echo "📝 Saved version info to $version_file" - fi - echo "$tag" return 0 done From 9463e051fe90a4354993ea212db75dbd01e508dc Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 10:46:44 +0200 Subject: [PATCH 0272/1614] fixes --- misc/build.func | 2 +- misc/github.func | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/misc/build.func b/misc/build.func index 8d26eca..6604f92 100644 --- a/misc/build.func +++ b/misc/build.func @@ -15,7 +15,7 @@ variables() { } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) -#source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { diff --git a/misc/github.func b/misc/github.func index 06979d5..9cb68c8 100644 --- a/misc/github.func +++ b/misc/github.func @@ -1,4 +1,4 @@ -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +#source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) get_gh_release() { local repo="$1" @@ -15,10 +15,10 @@ get_gh_release() { until [[ $attempt -ge $max_attempts ]]; do ((attempt++)) - msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" + $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then - msg_info "Request failed, retrying...\n" + $STD msg_info "Request failed, retrying...\n" sleep 2 continue fi @@ -37,12 +37,12 @@ get_gh_release() { [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" if [[ -z "$tag" ]]; then - msg_info "Empty tag received, retrying...\n" + $STD msg_info "Empty tag received, retrying...\n" sleep 2 continue fi - msg_ok "Found release: $tag for $repo" + $STD msg_ok "Found release: $tag for $repo" echo "$tag" return 0 done From 5734ab529df6878f2a2c80988efebb6ce7db1497 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 10:51:44 +0200 Subject: [PATCH 0273/1614] test --- misc/build.func | 1 - misc/install.func | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 6604f92..3689fc8 100644 --- a/misc/build.func +++ b/misc/build.func @@ -15,7 +15,6 @@ variables() { } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { diff --git a/misc/install.func b/misc/install.func index 2a730fb..12b08c7 100644 --- a/misc/install.func +++ b/misc/install.func @@ -32,6 +32,8 @@ color() { HOSTNAME="${TAB}🏠${TAB}${CL}" } +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) + # Function to set STD mode based on verbosity set_std_mode() { if [ "$VERBOSE" = "yes" ]; then From 5909d513e864005781c5920bb65807b35c3fd9f3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 10:57:31 +0200 Subject: [PATCH 0274/1614] test --- ct/ubuntu.sh | 25 +++++++++++++------------ install/ubuntu-install.sh | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index 1901951..28266e3 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE @@ -20,18 +21,18 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /var ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_info "Updating ${APP} LXC" - $STD apt-get update - $STD apt-get -y upgrade - msg_ok "Updated ${APP} LXC" + header_info + check_container_storage + check_container_resources + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + msg_info "Updating ${APP} LXC" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "Updated ${APP} LXC" + exit } start @@ -39,4 +40,4 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" \ No newline at end of file +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index cee1f77..e487202 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT From cad271f13e539b4fb6072c1300f68964f91e0e2a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 11:11:15 +0200 Subject: [PATCH 0275/1614] Update build.func --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index 3689fc8..6604f92 100644 --- a/misc/build.func +++ b/misc/build.func @@ -15,6 +15,7 @@ variables() { } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { From 6a24644ad518d3c750483cd23a9a32f3be907cf1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 11:28:40 +0200 Subject: [PATCH 0276/1614] test --- install/ubuntu-install.sh | 2 +- misc/build.func | 2 +- misc/install.func | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index e487202..cee1f77 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) + # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT diff --git a/misc/build.func b/misc/build.func index 6604f92..b587291 100644 --- a/misc/build.func +++ b/misc/build.func @@ -15,7 +15,6 @@ variables() { } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { @@ -2233,6 +2232,7 @@ check_container_storage() { } start() { + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" diff --git a/misc/install.func b/misc/install.func index 12b08c7..2a730fb 100644 --- a/misc/install.func +++ b/misc/install.func @@ -32,8 +32,6 @@ color() { HOSTNAME="${TAB}🏠${TAB}${CL}" } -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) - # Function to set STD mode based on verbosity set_std_mode() { if [ "$VERBOSE" = "yes" ]; then From 101b2786e453ecd7f4016b6c82fd80b0ef5265e4 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Wed, 2 Apr 2025 11:01:26 +0000 Subject: [PATCH 0277/1614] Update versions.json --- frontend/public/json/versions.json | 1253 +++++++++++++++++++++++++++- 1 file changed, 1252 insertions(+), 1 deletion(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index fe51488..861fd72 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1 +1,1252 @@ -[] +[ + { + "name": "home-assistant/core", + "version": "2025.3.4", + "date": "2025-03-21T20:22:46Z" + }, + { + "name": "zwave-js/zwave-js-ui", + "version": "v10.1.4", + "date": "2025-04-02T09:38:52Z" + }, + { + "name": "mattermost/mattermost", + "version": "server/public/v0.1.11", + "date": "2025-03-28T14:04:31Z" + }, + { + "name": "syncthing/syncthing", + "version": "v1.29.4", + "date": "2025-04-01T08:45:07Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1719", + "date": "2025-04-02T05:50:17Z" + }, + { + "name": "rabbitmq/rabbitmq-server", + "version": "v4.0.7", + "date": "2025-02-26T19:07:11Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-02T02:02:53Z" + }, + { + "name": "immich-app/immich", + "version": "v1.131.3", + "date": "2025-04-01T22:48:22Z" + }, + { + "name": "icereed/paperless-gpt", + "version": "v0.14.3", + "date": "2025-04-01T19:53:18Z" + }, + { + "name": "runtipi/runtipi", + "version": "nightly", + "date": "2025-04-01T19:30:29Z" + }, + { + "name": "fallenbagel/jellyseerr", + "version": "preview-music-support", + "date": "2025-04-01T19:04:25Z" + }, + { + "name": "Koenkk/zigbee2mqtt", + "version": "2.2.0", + "date": "2025-04-01T18:50:44Z" + }, + { + "name": "apache/tomcat", + "version": "9.0.103", + "date": "2025-04-01T18:39:51Z" + }, + { + "name": "MagicMirrorOrg/MagicMirror", + "version": "v2.31.0", + "date": "2025-04-01T18:12:45Z" + }, + { + "name": "msgbyte/tianji", + "version": "v1.19.6", + "date": "2025-04-01T17:26:31Z" + }, + { + "name": "influxdata/influxdb", + "version": "v3.0.0-0.beta.3", + "date": "2025-04-01T15:34:30Z" + }, + { + "name": "element-hq/synapse", + "version": "v1.127.1", + "date": "2025-03-26T21:44:28Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" + }, + { + "name": "Luligu/matterbridge", + "version": "2.2.6", + "date": "2025-04-01T14:01:36Z" + }, + { + "name": "theonedev/onedev", + "version": "v11.8.6", + "date": "2025-04-01T13:52:03Z" + }, + { + "name": "OctoPrint/OctoPrint", + "version": "1.10.3", + "date": "2024-11-05T09:20:50Z" + }, + { + "name": "semaphoreui/semaphore", + "version": "v2.13.7", + "date": "2025-04-01T09:41:55Z" + }, + { + "name": "neo4j/neo4j", + "version": "5.26.5", + "date": "2025-04-01T09:32:48Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.4.0b3-rc1", + "date": "2025-04-01T09:22:44Z" + }, + { + "name": "wazuh/wazuh", + "version": "v4.11.2", + "date": "2025-04-01T07:07:35Z" + }, + { + "name": "firefly-iii/firefly-iii", + "version": "v6.2.10", + "date": "2025-03-22T13:02:26Z" + }, + { + "name": "diced/zipline", + "version": "v4.0.2", + "date": "2025-04-01T04:51:05Z" + }, + { + "name": "open-webui/open-webui", + "version": "v0.6.0", + "date": "2025-04-01T01:47:32Z" + }, + { + "name": "outline/outline", + "version": "v0.82.1-18", + "date": "2025-03-31T23:12:40Z" + }, + { + "name": "esphome/esphome", + "version": "2025.3.3", + "date": "2025-03-31T22:07:05Z" + }, + { + "name": "Kometa-Team/Kometa", + "version": "v2.2.0", + "date": "2025-03-31T21:31:48Z" + }, + { + "name": "NodeBB/NodeBB", + "version": "v4.2.0", + "date": "2025-03-19T18:34:01Z" + }, + { + "name": "redis/redis", + "version": "8.0-rc1-int", + "date": "2025-03-31T18:26:40Z" + }, + { + "name": "traefik/traefik", + "version": "v3.3.5", + "date": "2025-03-31T08:55:12Z" + }, + { + "name": "home-assistant/operating-system", + "version": "15.1", + "date": "2025-03-31T13:42:20Z" + }, + { + "name": "n8n-io/n8n", + "version": "n8n@1.84.3", + "date": "2025-03-27T11:54:33Z" + }, + { + "name": "zitadel/zitadel", + "version": "v2.63.9", + "date": "2025-03-31T12:47:21Z" + }, + { + "name": "Graylog2/graylog2-server", + "version": "6.2.0-beta.3", + "date": "2025-03-31T11:22:28Z" + }, + { + "name": "documenso/documenso", + "version": "v1.10.0-rc.4", + "date": "2025-03-31T09:02:22Z" + }, + { + "name": "MediaBrowser/Emby.Releases", + "version": "4.8.11.0", + "date": "2025-03-10T06:39:11Z" + }, + { + "name": "TriliumNext/Notes", + "version": "v0.92.5", + "date": "2025-03-30T12:32:43Z" + }, + { + "name": "StarFleetCPTN/GoMFT", + "version": "v0.2.4", + "date": "2025-03-30T19:46:08Z" + }, + { + "name": "louislam/dockge", + "version": "1.5.0", + "date": "2025-03-30T17:42:59Z" + }, + { + "name": "pi-hole/pi-hole", + "version": "v6.0.6", + "date": "2025-03-30T16:59:06Z" + }, + { + "name": "sabnzbd/sabnzbd", + "version": "4.5.0", + "date": "2025-03-30T16:17:11Z" + }, + { + "name": "Part-DB/Part-DB-server", + "version": "v1.17.0", + "date": "2025-03-30T14:21:53Z" + }, + { + "name": "openhab/openhab-core", + "version": "4.3.4", + "date": "2025-03-30T13:32:38Z" + }, + { + "name": "pocketbase/pocketbase", + "version": "v0.26.6", + "date": "2025-03-30T08:02:19Z" + }, + { + "name": "Prowlarr/Prowlarr", + "version": "v1.32.2.4987", + "date": "2025-03-16T09:41:37Z" + }, + { + "name": "Readarr/Readarr", + "version": "v2.0.0.4645", + "date": "2017-03-07T18:56:06Z" + }, + { + "name": "Lidarr/Lidarr", + "version": "v2.10.3.4602", + "date": "2025-03-23T11:00:37Z" + }, + { + "name": "Radarr/Radarr", + "version": "v5.21.1.9799", + "date": "2025-03-24T15:52:12Z" + }, + { + "name": "aceberg/WatchYourLAN", + "version": "2.1.2-alpine", + "date": "2025-03-30T06:25:22Z" + }, + { + "name": "pocket-id/pocket-id", + "version": "v0.45.0", + "date": "2025-03-29T23:12:22Z" + }, + { + "name": "glanceapp/glance", + "version": "v0.7.9", + "date": "2025-03-29T18:08:11Z" + }, + { + "name": "tobychui/zoraxy", + "version": "v3.1.9", + "date": "2025-03-01T02:24:33Z" + }, + { + "name": "inspircd/inspircd", + "version": "v4.7.0", + "date": "2025-03-29T03:50:50Z" + }, + { + "name": "bunkerity/bunkerweb", + "version": "v1.6.1", + "date": "2025-03-15T17:29:17Z" + }, + { + "name": "OliveTin/OliveTin", + "version": "2025.3.28", + "date": "2025-03-29T00:18:56Z" + }, + { + "name": "homarr-labs/homarr", + "version": "v1.13.1", + "date": "2025-03-28T21:58:30Z" + }, + { + "name": "TasmoAdmin/TasmoAdmin", + "version": "v4.2.3", + "date": "2025-02-09T23:07:48Z" + }, + { + "name": "gristlabs/grist-core", + "version": "v1.5.0", + "date": "2025-03-28T20:43:51Z" + }, + { + "name": "grocy/grocy", + "version": "v4.5.0", + "date": "2025-03-28T19:02:22Z" + }, + { + "name": "Brandawg93/PeaNUT", + "version": "v5.6.1", + "date": "2025-03-28T18:40:22Z" + }, + { + "name": "louislam/uptime-kuma", + "version": "2.0.0-beta.2-temp", + "date": "2025-03-28T08:45:58Z" + }, + { + "name": "emqx/emqx", + "version": "e5.9.0-beta.2", + "date": "2025-03-28T15:06:27Z" + }, + { + "name": "goauthentik/authentik", + "version": "version/2025.2.3", + "date": "2025-03-28T14:28:34Z" + }, + { + "name": "hakimel/reveal.js", + "version": "5.2.1", + "date": "2025-03-28T13:00:23Z" + }, + { + "name": "cockpit-project/cockpit", + "version": "336.2", + "date": "2025-03-28T10:16:47Z" + }, + { + "name": "YunoHost/yunohost", + "version": "debian/12.0.12", + "date": "2025-03-16T11:59:24Z" + }, + { + "name": "gethomepage/homepage", + "version": "v1.1.1", + "date": "2025-03-28T04:12:31Z" + }, + { + "name": "Bubka/2FAuth", + "version": "v5.5.0", + "date": "2025-03-27T22:35:02Z" + }, + { + "name": "ellite/Wallos", + "version": "v2.48.1", + "date": "2025-03-27T22:02:16Z" + }, + { + "name": "hivemq/hivemq-community-edition", + "version": "2025.2", + "date": "2025-03-27T19:21:13Z" + }, + { + "name": "TandoorRecipes/recipes", + "version": "1.5.34", + "date": "2025-03-27T16:17:38Z" + }, + { + "name": "tailscale/tailscale", + "version": "v1.82.0", + "date": "2025-03-27T13:08:18Z" + }, + { + "name": "zabbix/zabbix", + "version": "7.2.5", + "date": "2025-03-27T11:06:48Z" + }, + { + "name": "evcc-io/evcc", + "version": "0.202.1", + "date": "2025-03-27T08:24:55Z" + }, + { + "name": "morpheus65535/bazarr", + "version": "v1.5.1", + "date": "2025-01-01T16:15:52Z" + }, + { + "name": "openobserve/openobserve", + "version": "v0.14.5-rc6", + "date": "2025-03-27T05:15:49Z" + }, + { + "name": "duplicati/duplicati", + "version": "v2.1.0.112-2.1.0.112_canary_2025-03-26", + "date": "2025-03-26T21:04:38Z" + }, + { + "name": "ollama/ollama", + "version": "v0.6.3-rc1", + "date": "2025-03-26T20:39:01Z" + }, + { + "name": "dgtlmoon/changedetection.io", + "version": "0.49.9", + "date": "2025-03-26T15:31:03Z" + }, + { + "name": "prometheus/prometheus", + "version": "v0.303.0-rc.0", + "date": "2025-03-26T12:48:46Z" + }, + { + "name": "jupyter/notebook", + "version": "@jupyter-notebook/ui-components@7.4.0-beta.3", + "date": "2025-03-26T10:07:53Z" + }, + { + "name": "forgejo/forgejo", + "version": "v12.0.0-dev", + "date": "2025-03-26T09:58:55Z" + }, + { + "name": "sct/overseerr", + "version": "v1.34.0", + "date": "2025-03-26T08:48:34Z" + }, + { + "name": "grafana/grafana", + "version": "v11.6.0", + "date": "2025-03-25T22:10:15Z" + }, + { + "name": "Stirling-Tools/Stirling-PDF", + "version": "v0.45.0", + "date": "2025-03-25T18:48:17Z" + }, + { + "name": "ipfs/kubo", + "version": "v0.34.1", + "date": "2025-03-25T18:11:12Z" + }, + { + "name": "dotnetfactory/fluid-calendar", + "version": "v1.3.0", + "date": "2025-03-25T15:55:02Z" + }, + { + "name": "hansmi/prometheus-paperless-exporter", + "version": "v0.0.7", + "date": "2025-03-25T15:11:18Z" + }, + { + "name": "jenkinsci/jenkins", + "version": "jenkins-2.503", + "date": "2025-03-25T14:01:20Z" + }, + { + "name": "crowdsecurity/crowdsec", + "version": "v1.6.8", + "date": "2025-03-25T13:33:10Z" + }, + { + "name": "VictoriaMetrics/VictoriaMetrics", + "version": "pmm-6401-v1.114.0", + "date": "2025-03-25T07:58:34Z" + }, + { + "name": "caddyserver/caddy", + "version": "v2.9.1", + "date": "2025-01-08T15:22:53Z" + }, + { + "name": "ZoeyVid/NPMplus", + "version": "2025-03-24-r2", + "date": "2025-03-24T20:52:35Z" + }, + { + "name": "HabitRPG/habitica", + "version": "v5.35.0", + "date": "2025-03-24T20:51:10Z" + }, + { + "name": "go-gitea/gitea", + "version": "v1.23.6", + "date": "2025-03-24T20:38:45Z" + }, + { + "name": "docmost/docmost", + "version": "v0.9.0", + "date": "2025-03-24T18:25:37Z" + }, + { + "name": "wavelog/wavelog", + "version": "2.0.2", + "date": "2025-03-24T12:02:08Z" + }, + { + "name": "nzbgetcom/nzbget", + "version": "v24.8", + "date": "2025-03-18T07:33:51Z" + }, + { + "name": "requarks/wiki", + "version": "v2.5.307", + "date": "2025-03-24T01:33:31Z" + }, + { + "name": "moghtech/komodo", + "version": "v1.17.0", + "date": "2025-03-24T00:46:32Z" + }, + { + "name": "nicolargo/glances", + "version": "v4.3.1", + "date": "2025-03-23T09:02:54Z" + }, + { + "name": "usememos/memos", + "version": "v0.24.2", + "date": "2025-03-23T04:01:50Z" + }, + { + "name": "hoarder-app/hoarder", + "version": "sdk/v0.23.0", + "date": "2025-03-22T17:26:10Z" + }, + { + "name": "netbox-community/netbox", + "version": "v4.2.6", + "date": "2025-03-21T21:20:29Z" + }, + { + "name": "leiweibau/Pi.Alert", + "version": "v2025-03-21", + "date": "2025-03-21T19:50:46Z" + }, + { + "name": "clusterzx/paperless-ai", + "version": "v2.7.6", + "date": "2025-03-21T19:24:53Z" + }, + { + "name": "photoprism/photoprism", + "version": "250321-57590c48b", + "date": "2025-03-21T11:48:16Z" + }, + { + "name": "AdguardTeam/AdGuardHome", + "version": "v0.107.59", + "date": "2025-03-21T11:11:39Z" + }, + { + "name": "jhuckaby/Cronicle", + "version": "v0.9.77", + "date": "2025-03-21T02:25:42Z" + }, + { + "name": "stonith404/pingvin-share", + "version": "v1.10.4", + "date": "2025-03-20T18:56:10Z" + }, + { + "name": "seanmorley15/AdventureLog", + "version": "v0.9.0", + "date": "2025-03-19T13:30:02Z" + }, + { + "name": "Donkie/Spoolman", + "version": "v0.22.1", + "date": "2025-03-18T21:01:22Z" + }, + { + "name": "apache/couchdb", + "version": "3.4.3.post1", + "date": "2025-03-18T09:44:59Z" + }, + { + "name": "authelia/authelia", + "version": "v4.39.1", + "date": "2025-03-18T03:57:41Z" + }, + { + "name": "advplyr/audiobookshelf", + "version": "v2.20.0", + "date": "2025-03-17T22:44:56Z" + }, + { + "name": "bastienwirtz/homer", + "version": "v25.03.3", + "date": "2025-03-17T20:55:37Z" + }, + { + "name": "Kareadita/Kavita", + "version": "v0.8.5.11", + "date": "2025-03-17T19:25:25Z" + }, + { + "name": "Sonarr/Sonarr", + "version": "v4.0.14.2939", + "date": "2025-03-17T19:12:37Z" + }, + { + "name": "inventree/InvenTree", + "version": "0.17.9", + "date": "2025-03-17T12:13:23Z" + }, + { + "name": "webmin/webmin", + "version": "2.303", + "date": "2025-03-17T04:54:50Z" + }, + { + "name": "autobrr/autobrr", + "version": "v1.60.0", + "date": "2025-03-16T18:39:49Z" + }, + { + "name": "BookStackApp/BookStack", + "version": "v25.02.1", + "date": "2025-03-16T12:51:00Z" + }, + { + "name": "Kozea/Radicale", + "version": "v3.5.0", + "date": "2025-03-16T06:05:55Z" + }, + { + "name": "pelican-dev/wings", + "version": "v1.0.0-beta10", + "date": "2025-03-15T20:24:34Z" + }, + { + "name": "pelican-dev/panel", + "version": "v1.0.0-beta18", + "date": "2025-03-15T20:24:04Z" + }, + { + "name": "henrygd/beszel", + "version": "v0.10.2", + "date": "2025-03-15T07:14:54Z" + }, + { + "name": "navidrome/navidrome", + "version": "v0.55.1", + "date": "2025-03-15T05:36:06Z" + }, + { + "name": "coder/code-server", + "version": "v4.98.2", + "date": "2025-03-15T02:11:28Z" + }, + { + "name": "Threadfin/Threadfin", + "version": "1.2.31", + "date": "2025-03-14T22:04:10Z" + }, + { + "name": "paperless-ngx/paperless-ngx", + "version": "v2.15.0-beta", + "date": "2025-03-14T18:05:28Z" + }, + { + "name": "FlowiseAI/Flowise", + "version": "flowise@2.2.7-patch.1", + "date": "2025-03-14T14:53:53Z" + }, + { + "name": "docker/compose", + "version": "v2.34.0", + "date": "2025-03-14T09:11:17Z" + }, + { + "name": "FreshRSS/FreshRSS", + "version": "1.26.1", + "date": "2025-03-13T21:34:25Z" + }, + { + "name": "kimai/kimai", + "version": "2.31.0", + "date": "2025-03-13T17:13:47Z" + }, + { + "name": "minio/minio", + "version": "RELEASE.2025-03-12T18-04-18Z", + "date": "2025-03-12T18:45:21Z" + }, + { + "name": "transmission/transmission", + "version": "4.0.1-beta.1", + "date": "2024-12-13T00:16:24Z" + }, + { + "name": "gotson/komga", + "version": "1.21.2", + "date": "2025-03-12T04:19:30Z" + }, + { + "name": "benjaminjonard/koillection", + "version": "1.6.12", + "date": "2025-03-11T15:04:43Z" + }, + { + "name": "excalidraw/excalidraw", + "version": "v0.18.0", + "date": "2025-03-11T12:47:22Z" + }, + { + "name": "Ombi-app/Ombi", + "version": "v4.47.1", + "date": "2025-01-05T21:14:23Z" + }, + { + "name": "mylar3/mylar3", + "version": "v0.8.2", + "date": "2025-03-11T05:20:22Z" + }, + { + "name": "stackblitz-labs/bolt.diy", + "version": "v0.0.7-hf1", + "date": "2025-03-10T20:49:39Z" + }, + { + "name": "AlexxIT/go2rtc", + "version": "v1.9.9", + "date": "2025-03-10T03:22:11Z" + }, + { + "name": "awawa-dev/HyperHDR", + "version": "v21.0.0.0", + "date": "2025-03-09T12:25:44Z" + }, + { + "name": "YuukanOO/seelf", + "version": "v2.4.2", + "date": "2025-03-08T10:49:04Z" + }, + { + "name": "umami-software/umami", + "version": "v2.17.0", + "date": "2025-03-08T06:08:04Z" + }, + { + "name": "rogerfar/rdt-client", + "version": "v2.0.102", + "date": "2025-03-07T20:48:46Z" + }, + { + "name": "prometheus/alertmanager", + "version": "v0.28.1", + "date": "2025-03-07T15:41:35Z" + }, + { + "name": "hargata/lubelog", + "version": "v1.4.5", + "date": "2025-03-06T19:43:48Z" + }, + { + "name": "eclipse-mosquitto/mosquitto", + "version": "v2.0.21", + "date": "2025-03-06T16:24:56Z" + }, + { + "name": "Dolibarr/dolibarr", + "version": "21.0.0", + "date": "2025-03-06T16:20:45Z" + }, + { + "name": "matze/wastebin", + "version": "3.0.0", + "date": "2025-03-05T21:41:29Z" + }, + { + "name": "snipe/snipe-it", + "version": "v8.0.4", + "date": "2025-03-05T17:12:03Z" + }, + { + "name": "toniebox-reverse-engineering/teddycloud", + "version": "tc_v0.6.4", + "date": "2025-03-05T15:43:40Z" + }, + { + "name": "sysadminsmedia/homebox", + "version": "v0.18.0", + "date": "2025-03-04T15:35:27Z" + }, + { + "name": "actualbudget/actual", + "version": "v25.3.1", + "date": "2025-03-03T02:05:36Z" + }, + { + "name": "heiher/hev-socks5-server", + "version": "2.8.0", + "date": "2025-03-02T04:30:50Z" + }, + { + "name": "jordan-dalby/ByteStash", + "version": "v1.5.7", + "date": "2025-02-27T20:04:08Z" + }, + { + "name": "cloudflare/cloudflared", + "version": "2025.2.1", + "date": "2025-02-27T11:36:11Z" + }, + { + "name": "cross-seed/cross-seed", + "version": "v6.11.2", + "date": "2025-02-26T14:54:49Z" + }, + { + "name": "silverbulletmd/silverbullet", + "version": "0.10.4", + "date": "2025-02-25T18:13:42Z" + }, + { + "name": "juanfont/headscale", + "version": "v0.25.1", + "date": "2025-02-25T17:30:48Z" + }, + { + "name": "benzino77/tasmocompiler", + "version": "v12.5.0", + "date": "2025-02-25T14:55:50Z" + }, + { + "name": "schlagmichdoch/PairDrop", + "version": "v1.11.2", + "date": "2025-02-24T19:47:06Z" + }, + { + "name": "drakkan/sftpgo", + "version": "v2.6.6", + "date": "2025-02-24T19:14:46Z" + }, + { + "name": "ioBroker/ioBroker", + "version": "2025-02-23", + "date": "2025-02-24T16:05:06Z" + }, + { + "name": "ventoy/Ventoy", + "version": "v1.1.05", + "date": "2025-02-24T11:53:12Z" + }, + { + "name": "Athou/commafeed", + "version": "5.6.1", + "date": "2025-02-23T20:39:48Z" + }, + { + "name": "TechnitiumSoftware/DnsServer", + "version": "v13.4.3", + "date": "2025-02-23T11:08:26Z" + }, + { + "name": "azukaar/Cosmos-Server", + "version": "v0.18.3", + "date": "2025-02-21T20:51:12Z" + }, + { + "name": "prometheus-pve/prometheus-pve-exporter", + "version": "v3.5.2", + "date": "2025-02-18T16:43:41Z" + }, + { + "name": "typesense/typesense", + "version": "v28.0", + "date": "2025-02-18T15:49:57Z" + }, + { + "name": "qbittorrent/qBittorrent", + "version": "release-5.0.4", + "date": "2025-02-18T14:14:11Z" + }, + { + "name": "postgres/postgres", + "version": "REL_13_20", + "date": "2025-02-17T21:17:13Z" + }, + { + "name": "jellyfin/jellyfin", + "version": "v10.10.6", + "date": "2025-02-16T21:55:45Z" + }, + { + "name": "sbondCo/Watcharr", + "version": "v2.0.2", + "date": "2025-02-16T21:34:29Z" + }, + { + "name": "recyclarr/recyclarr", + "version": "v7.4.1", + "date": "2025-02-15T20:54:00Z" + }, + { + "name": "node-red/node-red", + "version": "4.0.9", + "date": "2025-02-14T17:10:20Z" + }, + { + "name": "mayswind/AriaNg", + "version": "1.3.10", + "date": "2025-02-14T16:23:14Z" + }, + { + "name": "TryGhost/Ghost-CLI", + "version": "v1.27.0", + "date": "2025-02-13T15:55:36Z" + }, + { + "name": "MariaDB/server", + "version": "mariadb-11.7.2", + "date": "2025-02-13T04:13:46Z" + }, + { + "name": "glpi-project/glpi", + "version": "10.0.18", + "date": "2025-02-12T11:07:02Z" + }, + { + "name": "WordPress/WordPress", + "version": "6.7.2", + "date": "2025-02-11T16:13:18Z" + }, + { + "name": "homebridge/homebridge", + "version": "v1.9.0", + "date": "2025-02-11T13:26:42Z" + }, + { + "name": "dani-garcia/vaultwarden", + "version": "1.33.2", + "date": "2025-02-09T17:54:59Z" + }, + { + "name": "slskd/slskd", + "version": "0.22.2", + "date": "2025-02-09T00:00:04Z" + }, + { + "name": "blakeblackshear/frigate", + "version": "v0.15.0", + "date": "2025-02-08T18:45:30Z" + }, + { + "name": "bluenviron/mediamtx", + "version": "v1.11.3", + "date": "2025-02-07T19:29:19Z" + }, + { + "name": "apache/cassandra", + "version": "cassandra-4.0.17", + "date": "2025-02-07T10:38:54Z" + }, + { + "name": "apache/tika", + "version": "2.9.3", + "date": "2025-02-07T00:15:40Z" + }, + { + "name": "actualbudget/actual-server", + "version": "v25.2.1", + "date": "2025-02-06T20:41:28Z" + }, + { + "name": "NginxProxyManager/nginx-proxy-manager", + "version": "v2.12.3", + "date": "2025-02-06T11:07:07Z" + }, + { + "name": "mongodb/mongo", + "version": "r8.0.5-rc1", + "date": "2025-02-04T20:35:23Z" + }, + { + "name": "thomiceli/opengist", + "version": "v1.9.1", + "date": "2025-02-04T20:24:29Z" + }, + { + "name": "Forceu/Gokapi", + "version": "v1.9.6", + "date": "2024-12-18T14:35:37Z" + }, + { + "name": "PrivateBin/PrivateBin", + "version": "1.7.6", + "date": "2025-02-01T09:50:52Z" + }, + { + "name": "rustdesk/rustdesk-server", + "version": "1.1.14", + "date": "2025-01-25T12:48:28Z" + }, + { + "name": "crafty-controller/crafty-4", + "version": "v4.4.7", + "date": "2025-01-20T15:45:06Z" + }, + { + "name": "owncast/owncast", + "version": "v0.2.1", + "date": "2025-01-19T22:40:40Z" + }, + { + "name": "donaldzou/WGDashboard", + "version": "v4.1.4", + "date": "2025-01-19T13:14:19Z" + }, + { + "name": "0xERR0R/blocky", + "version": "v0.25", + "date": "2025-01-17T20:49:31Z" + }, + { + "name": "petio-team/petio", + "version": "v0.5.7", + "date": "2025-01-17T15:57:17Z" + }, + { + "name": "readeck/readeck", + "version": "0.17.1", + "date": "2025-01-15T19:13:33Z" + }, + { + "name": "linkwarden/linkwarden", + "version": "v2.9.3", + "date": "2025-01-13T16:19:53Z" + }, + { + "name": "Tautulli/Tautulli", + "version": "v2.15.1", + "date": "2025-01-11T23:38:33Z" + }, + { + "name": "traccar/traccar", + "version": "v6.6", + "date": "2025-01-11T17:26:49Z" + }, + { + "name": "ErsatzTV/ErsatzTV", + "version": "v25.1.0", + "date": "2025-01-10T18:14:54Z" + }, + { + "name": "go-vikunja/vikunja", + "version": "v0.24.6", + "date": "2024-12-22T20:24:35Z" + }, + { + "name": "IceWhaleTech/CasaOS", + "version": "v0.4.15", + "date": "2024-12-19T03:19:49Z" + }, + { + "name": "mysql/mysql-server", + "version": "mysql-cluster-7.6.33", + "date": "2024-12-16T11:55:50Z" + }, + { + "name": "ArchiveBox/ArchiveBox", + "version": "v0.7.3", + "date": "2024-12-15T10:18:06Z" + }, + { + "name": "pymedusa/Medusa", + "version": "v1.0.22", + "date": "2024-12-13T12:22:19Z" + }, + { + "name": "MDeLuise/plant-it", + "version": "0.10.0", + "date": "2024-12-10T09:35:26Z" + }, + { + "name": "phpipam/phpipam", + "version": "v1.7.3", + "date": "2024-11-27T21:26:11Z" + }, + { + "name": "lldap/lldap", + "version": "v0.6.1", + "date": "2024-11-22T21:48:41Z" + }, + { + "name": "gotify/server", + "version": "v2.6.1", + "date": "2024-11-16T08:44:53Z" + }, + { + "name": "janeczku/calibre-web", + "version": "0.6.24", + "date": "2024-11-16T06:47:56Z" + }, + { + "name": "pterodactyl/panel", + "version": "v1.11.10", + "date": "2024-11-15T02:29:18Z" + }, + { + "name": "sabre-io/Baikal", + "version": "0.10.1", + "date": "2024-11-10T10:25:45Z" + }, + { + "name": "nextcloud/nextcloudpi", + "version": "v1.55.3", + "date": "2024-11-08T22:21:10Z" + }, + { + "name": "caddyserver/xcaddy", + "version": "v0.4.4", + "date": "2024-11-05T23:06:11Z" + }, + { + "name": "linuxserver/Heimdall", + "version": "v2.6.3", + "date": "2024-11-05T11:00:43Z" + }, + { + "name": "zerotier/ZeroTierOne", + "version": "1.14.2", + "date": "2024-10-29T16:17:48Z" + }, + { + "name": "CorentinTh/it-tools", + "version": "v2024.10.22-7ca5933", + "date": "2024-10-22T09:58:03Z" + }, + { + "name": "NLnetLabs/unbound", + "version": "release-1.22.0", + "date": "2024-10-17T08:43:37Z" + }, + { + "name": "Notifiarr/notifiarr", + "version": "v0.8.3", + "date": "2024-10-04T23:49:07Z" + }, + { + "name": "FunkeyFlo/ps5-mqtt", + "version": "v1.4.0", + "date": "2024-08-06T19:57:33Z" + }, + { + "name": "projectsend/projectsend", + "version": "r1720", + "date": "2024-08-03T04:07:20Z" + }, + { + "name": "Pf2eToolsOrg/Pf2eTools", + "version": "v0.8.13", + "date": "2024-07-29T12:54:27Z" + }, + { + "name": "Paymenter/Paymenter", + "version": "v0.9.5", + "date": "2024-07-20T08:46:42Z" + }, + { + "name": "hywax/mafl", + "version": "v0.15.4", + "date": "2024-07-13T11:03:43Z" + }, + { + "name": "FlareSolverr/FlareSolverr", + "version": "v3.3.21", + "date": "2024-06-26T01:14:46Z" + }, + { + "name": "Suwayomi/Suwayomi-Server", + "version": "v1.1.1", + "date": "2024-06-15T17:23:48Z" + }, + { + "name": "Forceu/barcodebuddy", + "version": "v1.8.1.8", + "date": "2024-06-02T20:01:53Z" + }, + { + "name": "Lissy93/dashy", + "version": "3.1.1", + "date": "2024-05-30T17:20:53Z" + }, + { + "name": "motioneye-project/motioneye", + "version": "0.42.1", + "date": "2020-06-07T07:27:04Z" + }, + { + "name": "gnmyt/MySpeed", + "version": "v1.0.9", + "date": "2024-05-21T22:15:33Z" + }, + { + "name": "binwiederhier/ntfy", + "version": "v2.11.0", + "date": "2024-05-13T20:19:54Z" + }, + { + "name": "pterodactyl/wings", + "version": "v1.11.13", + "date": "2024-05-08T04:20:34Z" + }, + { + "name": "CrazyWolf13/web-check", + "version": "1.0.0", + "date": "2024-05-05T02:01:51Z" + }, + { + "name": "monicahq/monica", + "version": "v4.1.2", + "date": "2024-05-04T08:06:50Z" + }, + { + "name": "thelounge/thelounge-deb", + "version": "v4.4.3", + "date": "2024-04-06T12:24:35Z" + }, + { + "name": "hyperion-project/hyperion.ng", + "version": "2.0.16", + "date": "2024-01-18T16:11:07Z" + }, + { + "name": "wger-project/wger", + "version": "2.2", + "date": "2023-12-06T12:08:09Z" + }, + { + "name": "deepch/RTSPtoWeb", + "version": "v2.4.3", + "date": "2023-03-29T12:05:02Z" + }, + { + "name": "Shinobi-Systems/Shinobi", + "version": "furrykitten-3", + "date": "2022-07-15T05:20:17Z" + } +] From 0fed27dde049892a905910a7fb3ea87e1419966b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 13:05:33 +0200 Subject: [PATCH 0278/1614] test stable releases --- .github/workflows/get-versions-from-newreleases.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/get-versions-from-newreleases.yaml b/.github/workflows/get-versions-from-newreleases.yaml index 2eb23b0..fdec8e4 100644 --- a/.github/workflows/get-versions-from-newreleases.yaml +++ b/.github/workflows/get-versions-from-newreleases.yaml @@ -61,7 +61,7 @@ jobs: echo "$projects" > "$projects_file" jq -r '.projects[] | "\(.id) \(.name)"' "$projects_file" | while read -r id name; do - version=$(curl -s -H "X-Key: $token" "https://api.newreleases.io/v1/projects/$id/latest-release") + version=$(curl -s -H "X-Key: $token" "https://api.newreleases.io/v1/projects/$id/latest-release?stable=true") version_data=$(echo "$version" | jq -r '.version // empty') date=$(echo "$version" | jq -r '.date // empty') if [ -n "$version_data" ]; then From ce20f66351f6be033ce0e19cfc405541e36c6fa8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 13:09:14 +0200 Subject: [PATCH 0279/1614] Update get-versions-from-newreleases.yaml --- .github/workflows/get-versions-from-newreleases.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/get-versions-from-newreleases.yaml b/.github/workflows/get-versions-from-newreleases.yaml index fdec8e4..aa02812 100644 --- a/.github/workflows/get-versions-from-newreleases.yaml +++ b/.github/workflows/get-versions-from-newreleases.yaml @@ -61,7 +61,11 @@ jobs: echo "$projects" > "$projects_file" jq -r '.projects[] | "\(.id) \(.name)"' "$projects_file" | while read -r id name; do - version=$(curl -s -H "X-Key: $token" "https://api.newreleases.io/v1/projects/$id/latest-release?stable=true") + echo "Ensuring $name has exclude_prereleases=true" + curl -s -X POST -H "X-Key: $token" -H "Content-Type: application/json" \ + -d '{"exclude_prereleases": true}' \ + "https://api.newreleases.io/v1/projects/$id" > /dev/null + version=$(curl -s -H "X-Key: $token" "https://api.newreleases.io/v1/projects/$id/latest-release") version_data=$(echo "$version" | jq -r '.version // empty') date=$(echo "$version" | jq -r '.date // empty') if [ -n "$version_data" ]; then From dbf4295a0b4167e4ea81daba5b8f550f6e5bffdf Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Wed, 2 Apr 2025 12:37:13 +0000 Subject: [PATCH 0280/1614] Update versions.json --- frontend/public/json/versions.json | 784 +---------------------------- 1 file changed, 17 insertions(+), 767 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 861fd72..4ea9fc4 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,4 +1,19 @@ [ + { + "name": "Graylog2/graylog2-server", + "version": "6.1.9", + "date": "2025-04-02T11:18:59Z" + }, + { + "name": "syncthing/syncthing", + "version": "v1.29.4", + "date": "2025-04-01T08:45:07Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-02T10:34:08Z" + }, { "name": "home-assistant/core", "version": "2025.3.4", @@ -14,11 +29,6 @@ "version": "server/public/v0.1.11", "date": "2025-03-28T14:04:31Z" }, - { - "name": "syncthing/syncthing", - "version": "v1.29.4", - "date": "2025-04-01T08:45:07Z" - }, { "name": "Jackett/Jackett", "version": "v0.22.1719", @@ -29,11 +39,6 @@ "version": "v4.0.7", "date": "2025-02-26T19:07:11Z" }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-02T02:02:53Z" - }, { "name": "immich-app/immich", "version": "v1.131.3", @@ -46,8 +51,8 @@ }, { "name": "runtipi/runtipi", - "version": "nightly", - "date": "2025-04-01T19:30:29Z" + "version": "v3.10.0", + "date": "2025-03-15T14:38:16Z" }, { "name": "fallenbagel/jellyseerr", @@ -184,11 +189,6 @@ "version": "v2.63.9", "date": "2025-03-31T12:47:21Z" }, - { - "name": "Graylog2/graylog2-server", - "version": "6.2.0-beta.3", - "date": "2025-03-31T11:22:28Z" - }, { "name": "documenso/documenso", "version": "v1.10.0-rc.4", @@ -498,755 +498,5 @@ "name": "docmost/docmost", "version": "v0.9.0", "date": "2025-03-24T18:25:37Z" - }, - { - "name": "wavelog/wavelog", - "version": "2.0.2", - "date": "2025-03-24T12:02:08Z" - }, - { - "name": "nzbgetcom/nzbget", - "version": "v24.8", - "date": "2025-03-18T07:33:51Z" - }, - { - "name": "requarks/wiki", - "version": "v2.5.307", - "date": "2025-03-24T01:33:31Z" - }, - { - "name": "moghtech/komodo", - "version": "v1.17.0", - "date": "2025-03-24T00:46:32Z" - }, - { - "name": "nicolargo/glances", - "version": "v4.3.1", - "date": "2025-03-23T09:02:54Z" - }, - { - "name": "usememos/memos", - "version": "v0.24.2", - "date": "2025-03-23T04:01:50Z" - }, - { - "name": "hoarder-app/hoarder", - "version": "sdk/v0.23.0", - "date": "2025-03-22T17:26:10Z" - }, - { - "name": "netbox-community/netbox", - "version": "v4.2.6", - "date": "2025-03-21T21:20:29Z" - }, - { - "name": "leiweibau/Pi.Alert", - "version": "v2025-03-21", - "date": "2025-03-21T19:50:46Z" - }, - { - "name": "clusterzx/paperless-ai", - "version": "v2.7.6", - "date": "2025-03-21T19:24:53Z" - }, - { - "name": "photoprism/photoprism", - "version": "250321-57590c48b", - "date": "2025-03-21T11:48:16Z" - }, - { - "name": "AdguardTeam/AdGuardHome", - "version": "v0.107.59", - "date": "2025-03-21T11:11:39Z" - }, - { - "name": "jhuckaby/Cronicle", - "version": "v0.9.77", - "date": "2025-03-21T02:25:42Z" - }, - { - "name": "stonith404/pingvin-share", - "version": "v1.10.4", - "date": "2025-03-20T18:56:10Z" - }, - { - "name": "seanmorley15/AdventureLog", - "version": "v0.9.0", - "date": "2025-03-19T13:30:02Z" - }, - { - "name": "Donkie/Spoolman", - "version": "v0.22.1", - "date": "2025-03-18T21:01:22Z" - }, - { - "name": "apache/couchdb", - "version": "3.4.3.post1", - "date": "2025-03-18T09:44:59Z" - }, - { - "name": "authelia/authelia", - "version": "v4.39.1", - "date": "2025-03-18T03:57:41Z" - }, - { - "name": "advplyr/audiobookshelf", - "version": "v2.20.0", - "date": "2025-03-17T22:44:56Z" - }, - { - "name": "bastienwirtz/homer", - "version": "v25.03.3", - "date": "2025-03-17T20:55:37Z" - }, - { - "name": "Kareadita/Kavita", - "version": "v0.8.5.11", - "date": "2025-03-17T19:25:25Z" - }, - { - "name": "Sonarr/Sonarr", - "version": "v4.0.14.2939", - "date": "2025-03-17T19:12:37Z" - }, - { - "name": "inventree/InvenTree", - "version": "0.17.9", - "date": "2025-03-17T12:13:23Z" - }, - { - "name": "webmin/webmin", - "version": "2.303", - "date": "2025-03-17T04:54:50Z" - }, - { - "name": "autobrr/autobrr", - "version": "v1.60.0", - "date": "2025-03-16T18:39:49Z" - }, - { - "name": "BookStackApp/BookStack", - "version": "v25.02.1", - "date": "2025-03-16T12:51:00Z" - }, - { - "name": "Kozea/Radicale", - "version": "v3.5.0", - "date": "2025-03-16T06:05:55Z" - }, - { - "name": "pelican-dev/wings", - "version": "v1.0.0-beta10", - "date": "2025-03-15T20:24:34Z" - }, - { - "name": "pelican-dev/panel", - "version": "v1.0.0-beta18", - "date": "2025-03-15T20:24:04Z" - }, - { - "name": "henrygd/beszel", - "version": "v0.10.2", - "date": "2025-03-15T07:14:54Z" - }, - { - "name": "navidrome/navidrome", - "version": "v0.55.1", - "date": "2025-03-15T05:36:06Z" - }, - { - "name": "coder/code-server", - "version": "v4.98.2", - "date": "2025-03-15T02:11:28Z" - }, - { - "name": "Threadfin/Threadfin", - "version": "1.2.31", - "date": "2025-03-14T22:04:10Z" - }, - { - "name": "paperless-ngx/paperless-ngx", - "version": "v2.15.0-beta", - "date": "2025-03-14T18:05:28Z" - }, - { - "name": "FlowiseAI/Flowise", - "version": "flowise@2.2.7-patch.1", - "date": "2025-03-14T14:53:53Z" - }, - { - "name": "docker/compose", - "version": "v2.34.0", - "date": "2025-03-14T09:11:17Z" - }, - { - "name": "FreshRSS/FreshRSS", - "version": "1.26.1", - "date": "2025-03-13T21:34:25Z" - }, - { - "name": "kimai/kimai", - "version": "2.31.0", - "date": "2025-03-13T17:13:47Z" - }, - { - "name": "minio/minio", - "version": "RELEASE.2025-03-12T18-04-18Z", - "date": "2025-03-12T18:45:21Z" - }, - { - "name": "transmission/transmission", - "version": "4.0.1-beta.1", - "date": "2024-12-13T00:16:24Z" - }, - { - "name": "gotson/komga", - "version": "1.21.2", - "date": "2025-03-12T04:19:30Z" - }, - { - "name": "benjaminjonard/koillection", - "version": "1.6.12", - "date": "2025-03-11T15:04:43Z" - }, - { - "name": "excalidraw/excalidraw", - "version": "v0.18.0", - "date": "2025-03-11T12:47:22Z" - }, - { - "name": "Ombi-app/Ombi", - "version": "v4.47.1", - "date": "2025-01-05T21:14:23Z" - }, - { - "name": "mylar3/mylar3", - "version": "v0.8.2", - "date": "2025-03-11T05:20:22Z" - }, - { - "name": "stackblitz-labs/bolt.diy", - "version": "v0.0.7-hf1", - "date": "2025-03-10T20:49:39Z" - }, - { - "name": "AlexxIT/go2rtc", - "version": "v1.9.9", - "date": "2025-03-10T03:22:11Z" - }, - { - "name": "awawa-dev/HyperHDR", - "version": "v21.0.0.0", - "date": "2025-03-09T12:25:44Z" - }, - { - "name": "YuukanOO/seelf", - "version": "v2.4.2", - "date": "2025-03-08T10:49:04Z" - }, - { - "name": "umami-software/umami", - "version": "v2.17.0", - "date": "2025-03-08T06:08:04Z" - }, - { - "name": "rogerfar/rdt-client", - "version": "v2.0.102", - "date": "2025-03-07T20:48:46Z" - }, - { - "name": "prometheus/alertmanager", - "version": "v0.28.1", - "date": "2025-03-07T15:41:35Z" - }, - { - "name": "hargata/lubelog", - "version": "v1.4.5", - "date": "2025-03-06T19:43:48Z" - }, - { - "name": "eclipse-mosquitto/mosquitto", - "version": "v2.0.21", - "date": "2025-03-06T16:24:56Z" - }, - { - "name": "Dolibarr/dolibarr", - "version": "21.0.0", - "date": "2025-03-06T16:20:45Z" - }, - { - "name": "matze/wastebin", - "version": "3.0.0", - "date": "2025-03-05T21:41:29Z" - }, - { - "name": "snipe/snipe-it", - "version": "v8.0.4", - "date": "2025-03-05T17:12:03Z" - }, - { - "name": "toniebox-reverse-engineering/teddycloud", - "version": "tc_v0.6.4", - "date": "2025-03-05T15:43:40Z" - }, - { - "name": "sysadminsmedia/homebox", - "version": "v0.18.0", - "date": "2025-03-04T15:35:27Z" - }, - { - "name": "actualbudget/actual", - "version": "v25.3.1", - "date": "2025-03-03T02:05:36Z" - }, - { - "name": "heiher/hev-socks5-server", - "version": "2.8.0", - "date": "2025-03-02T04:30:50Z" - }, - { - "name": "jordan-dalby/ByteStash", - "version": "v1.5.7", - "date": "2025-02-27T20:04:08Z" - }, - { - "name": "cloudflare/cloudflared", - "version": "2025.2.1", - "date": "2025-02-27T11:36:11Z" - }, - { - "name": "cross-seed/cross-seed", - "version": "v6.11.2", - "date": "2025-02-26T14:54:49Z" - }, - { - "name": "silverbulletmd/silverbullet", - "version": "0.10.4", - "date": "2025-02-25T18:13:42Z" - }, - { - "name": "juanfont/headscale", - "version": "v0.25.1", - "date": "2025-02-25T17:30:48Z" - }, - { - "name": "benzino77/tasmocompiler", - "version": "v12.5.0", - "date": "2025-02-25T14:55:50Z" - }, - { - "name": "schlagmichdoch/PairDrop", - "version": "v1.11.2", - "date": "2025-02-24T19:47:06Z" - }, - { - "name": "drakkan/sftpgo", - "version": "v2.6.6", - "date": "2025-02-24T19:14:46Z" - }, - { - "name": "ioBroker/ioBroker", - "version": "2025-02-23", - "date": "2025-02-24T16:05:06Z" - }, - { - "name": "ventoy/Ventoy", - "version": "v1.1.05", - "date": "2025-02-24T11:53:12Z" - }, - { - "name": "Athou/commafeed", - "version": "5.6.1", - "date": "2025-02-23T20:39:48Z" - }, - { - "name": "TechnitiumSoftware/DnsServer", - "version": "v13.4.3", - "date": "2025-02-23T11:08:26Z" - }, - { - "name": "azukaar/Cosmos-Server", - "version": "v0.18.3", - "date": "2025-02-21T20:51:12Z" - }, - { - "name": "prometheus-pve/prometheus-pve-exporter", - "version": "v3.5.2", - "date": "2025-02-18T16:43:41Z" - }, - { - "name": "typesense/typesense", - "version": "v28.0", - "date": "2025-02-18T15:49:57Z" - }, - { - "name": "qbittorrent/qBittorrent", - "version": "release-5.0.4", - "date": "2025-02-18T14:14:11Z" - }, - { - "name": "postgres/postgres", - "version": "REL_13_20", - "date": "2025-02-17T21:17:13Z" - }, - { - "name": "jellyfin/jellyfin", - "version": "v10.10.6", - "date": "2025-02-16T21:55:45Z" - }, - { - "name": "sbondCo/Watcharr", - "version": "v2.0.2", - "date": "2025-02-16T21:34:29Z" - }, - { - "name": "recyclarr/recyclarr", - "version": "v7.4.1", - "date": "2025-02-15T20:54:00Z" - }, - { - "name": "node-red/node-red", - "version": "4.0.9", - "date": "2025-02-14T17:10:20Z" - }, - { - "name": "mayswind/AriaNg", - "version": "1.3.10", - "date": "2025-02-14T16:23:14Z" - }, - { - "name": "TryGhost/Ghost-CLI", - "version": "v1.27.0", - "date": "2025-02-13T15:55:36Z" - }, - { - "name": "MariaDB/server", - "version": "mariadb-11.7.2", - "date": "2025-02-13T04:13:46Z" - }, - { - "name": "glpi-project/glpi", - "version": "10.0.18", - "date": "2025-02-12T11:07:02Z" - }, - { - "name": "WordPress/WordPress", - "version": "6.7.2", - "date": "2025-02-11T16:13:18Z" - }, - { - "name": "homebridge/homebridge", - "version": "v1.9.0", - "date": "2025-02-11T13:26:42Z" - }, - { - "name": "dani-garcia/vaultwarden", - "version": "1.33.2", - "date": "2025-02-09T17:54:59Z" - }, - { - "name": "slskd/slskd", - "version": "0.22.2", - "date": "2025-02-09T00:00:04Z" - }, - { - "name": "blakeblackshear/frigate", - "version": "v0.15.0", - "date": "2025-02-08T18:45:30Z" - }, - { - "name": "bluenviron/mediamtx", - "version": "v1.11.3", - "date": "2025-02-07T19:29:19Z" - }, - { - "name": "apache/cassandra", - "version": "cassandra-4.0.17", - "date": "2025-02-07T10:38:54Z" - }, - { - "name": "apache/tika", - "version": "2.9.3", - "date": "2025-02-07T00:15:40Z" - }, - { - "name": "actualbudget/actual-server", - "version": "v25.2.1", - "date": "2025-02-06T20:41:28Z" - }, - { - "name": "NginxProxyManager/nginx-proxy-manager", - "version": "v2.12.3", - "date": "2025-02-06T11:07:07Z" - }, - { - "name": "mongodb/mongo", - "version": "r8.0.5-rc1", - "date": "2025-02-04T20:35:23Z" - }, - { - "name": "thomiceli/opengist", - "version": "v1.9.1", - "date": "2025-02-04T20:24:29Z" - }, - { - "name": "Forceu/Gokapi", - "version": "v1.9.6", - "date": "2024-12-18T14:35:37Z" - }, - { - "name": "PrivateBin/PrivateBin", - "version": "1.7.6", - "date": "2025-02-01T09:50:52Z" - }, - { - "name": "rustdesk/rustdesk-server", - "version": "1.1.14", - "date": "2025-01-25T12:48:28Z" - }, - { - "name": "crafty-controller/crafty-4", - "version": "v4.4.7", - "date": "2025-01-20T15:45:06Z" - }, - { - "name": "owncast/owncast", - "version": "v0.2.1", - "date": "2025-01-19T22:40:40Z" - }, - { - "name": "donaldzou/WGDashboard", - "version": "v4.1.4", - "date": "2025-01-19T13:14:19Z" - }, - { - "name": "0xERR0R/blocky", - "version": "v0.25", - "date": "2025-01-17T20:49:31Z" - }, - { - "name": "petio-team/petio", - "version": "v0.5.7", - "date": "2025-01-17T15:57:17Z" - }, - { - "name": "readeck/readeck", - "version": "0.17.1", - "date": "2025-01-15T19:13:33Z" - }, - { - "name": "linkwarden/linkwarden", - "version": "v2.9.3", - "date": "2025-01-13T16:19:53Z" - }, - { - "name": "Tautulli/Tautulli", - "version": "v2.15.1", - "date": "2025-01-11T23:38:33Z" - }, - { - "name": "traccar/traccar", - "version": "v6.6", - "date": "2025-01-11T17:26:49Z" - }, - { - "name": "ErsatzTV/ErsatzTV", - "version": "v25.1.0", - "date": "2025-01-10T18:14:54Z" - }, - { - "name": "go-vikunja/vikunja", - "version": "v0.24.6", - "date": "2024-12-22T20:24:35Z" - }, - { - "name": "IceWhaleTech/CasaOS", - "version": "v0.4.15", - "date": "2024-12-19T03:19:49Z" - }, - { - "name": "mysql/mysql-server", - "version": "mysql-cluster-7.6.33", - "date": "2024-12-16T11:55:50Z" - }, - { - "name": "ArchiveBox/ArchiveBox", - "version": "v0.7.3", - "date": "2024-12-15T10:18:06Z" - }, - { - "name": "pymedusa/Medusa", - "version": "v1.0.22", - "date": "2024-12-13T12:22:19Z" - }, - { - "name": "MDeLuise/plant-it", - "version": "0.10.0", - "date": "2024-12-10T09:35:26Z" - }, - { - "name": "phpipam/phpipam", - "version": "v1.7.3", - "date": "2024-11-27T21:26:11Z" - }, - { - "name": "lldap/lldap", - "version": "v0.6.1", - "date": "2024-11-22T21:48:41Z" - }, - { - "name": "gotify/server", - "version": "v2.6.1", - "date": "2024-11-16T08:44:53Z" - }, - { - "name": "janeczku/calibre-web", - "version": "0.6.24", - "date": "2024-11-16T06:47:56Z" - }, - { - "name": "pterodactyl/panel", - "version": "v1.11.10", - "date": "2024-11-15T02:29:18Z" - }, - { - "name": "sabre-io/Baikal", - "version": "0.10.1", - "date": "2024-11-10T10:25:45Z" - }, - { - "name": "nextcloud/nextcloudpi", - "version": "v1.55.3", - "date": "2024-11-08T22:21:10Z" - }, - { - "name": "caddyserver/xcaddy", - "version": "v0.4.4", - "date": "2024-11-05T23:06:11Z" - }, - { - "name": "linuxserver/Heimdall", - "version": "v2.6.3", - "date": "2024-11-05T11:00:43Z" - }, - { - "name": "zerotier/ZeroTierOne", - "version": "1.14.2", - "date": "2024-10-29T16:17:48Z" - }, - { - "name": "CorentinTh/it-tools", - "version": "v2024.10.22-7ca5933", - "date": "2024-10-22T09:58:03Z" - }, - { - "name": "NLnetLabs/unbound", - "version": "release-1.22.0", - "date": "2024-10-17T08:43:37Z" - }, - { - "name": "Notifiarr/notifiarr", - "version": "v0.8.3", - "date": "2024-10-04T23:49:07Z" - }, - { - "name": "FunkeyFlo/ps5-mqtt", - "version": "v1.4.0", - "date": "2024-08-06T19:57:33Z" - }, - { - "name": "projectsend/projectsend", - "version": "r1720", - "date": "2024-08-03T04:07:20Z" - }, - { - "name": "Pf2eToolsOrg/Pf2eTools", - "version": "v0.8.13", - "date": "2024-07-29T12:54:27Z" - }, - { - "name": "Paymenter/Paymenter", - "version": "v0.9.5", - "date": "2024-07-20T08:46:42Z" - }, - { - "name": "hywax/mafl", - "version": "v0.15.4", - "date": "2024-07-13T11:03:43Z" - }, - { - "name": "FlareSolverr/FlareSolverr", - "version": "v3.3.21", - "date": "2024-06-26T01:14:46Z" - }, - { - "name": "Suwayomi/Suwayomi-Server", - "version": "v1.1.1", - "date": "2024-06-15T17:23:48Z" - }, - { - "name": "Forceu/barcodebuddy", - "version": "v1.8.1.8", - "date": "2024-06-02T20:01:53Z" - }, - { - "name": "Lissy93/dashy", - "version": "3.1.1", - "date": "2024-05-30T17:20:53Z" - }, - { - "name": "motioneye-project/motioneye", - "version": "0.42.1", - "date": "2020-06-07T07:27:04Z" - }, - { - "name": "gnmyt/MySpeed", - "version": "v1.0.9", - "date": "2024-05-21T22:15:33Z" - }, - { - "name": "binwiederhier/ntfy", - "version": "v2.11.0", - "date": "2024-05-13T20:19:54Z" - }, - { - "name": "pterodactyl/wings", - "version": "v1.11.13", - "date": "2024-05-08T04:20:34Z" - }, - { - "name": "CrazyWolf13/web-check", - "version": "1.0.0", - "date": "2024-05-05T02:01:51Z" - }, - { - "name": "monicahq/monica", - "version": "v4.1.2", - "date": "2024-05-04T08:06:50Z" - }, - { - "name": "thelounge/thelounge-deb", - "version": "v4.4.3", - "date": "2024-04-06T12:24:35Z" - }, - { - "name": "hyperion-project/hyperion.ng", - "version": "2.0.16", - "date": "2024-01-18T16:11:07Z" - }, - { - "name": "wger-project/wger", - "version": "2.2", - "date": "2023-12-06T12:08:09Z" - }, - { - "name": "deepch/RTSPtoWeb", - "version": "v2.4.3", - "date": "2023-03-29T12:05:02Z" - }, - { - "name": "Shinobi-Systems/Shinobi", - "version": "furrykitten-3", - "date": "2022-07-15T05:20:17Z" } ] From fffb24eddf1f3e43a8e333898e3201efb096f937 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 16:01:30 +0200 Subject: [PATCH 0281/1614] Update alpine-wireguard.sh --- ct/alpine-wireguard.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/ct/alpine-wireguard.sh b/ct/alpine-wireguard.sh index 236e366..89e322d 100644 --- a/ct/alpine-wireguard.sh +++ b/ct/alpine-wireguard.sh @@ -20,14 +20,24 @@ color catch_errors function update_script() { - msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade - msg_ok "Updated Alpine Packages" + msg_info "Updating Alpine Packages" + $STD apk update + $STD apk upgrade + msg_ok "Updated Alpine Packages" - msg_info "Updating WireGuard" - $STD apk upgrade wireguard-tools - msg_ok "Updated WireGuard" + msg_info "update wireguard-tools" + $STD apk add --no-cache --upgrade wireguard-tools + msg_ok "wireguard-tools updated" + + if [[ -d /etc/wgdashboard/src ]]; then + msg_info "update WGDashboard" + cd /etc/wgdashboard/src || exit + $STD ./wgd.sh update + $STD ./wgd.sh start + msg_ok "WGDashboard updated" + fi + + exit 0 } start From 41e9a454c8e71a7c924e799c224964cc686999f4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 16:13:35 +0200 Subject: [PATCH 0282/1614] Update alpine-wireguard.sh --- ct/alpine-wireguard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-wireguard.sh b/ct/alpine-wireguard.sh index 89e322d..8291c9b 100644 --- a/ct/alpine-wireguard.sh +++ b/ct/alpine-wireguard.sh @@ -32,7 +32,7 @@ function update_script() { if [[ -d /etc/wgdashboard/src ]]; then msg_info "update WGDashboard" cd /etc/wgdashboard/src || exit - $STD ./wgd.sh update + $STD echo "y" | ./wgd.sh update $STD ./wgd.sh start msg_ok "WGDashboard updated" fi From 716c9d86c0cc82033312e09909a9d83f30a2efcb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 16:35:36 +0200 Subject: [PATCH 0283/1614] remove alpine wg --- ct/alpine-wireguard.sh | 50 ------------- install/alpine-wireguard-install.sh | 105 ---------------------------- 2 files changed, 155 deletions(-) delete mode 100644 ct/alpine-wireguard.sh delete mode 100644 install/alpine-wireguard-install.sh diff --git a/ct/alpine-wireguard.sh b/ct/alpine-wireguard.sh deleted file mode 100644 index 8291c9b..0000000 --- a/ct/alpine-wireguard.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/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://www.wireguard.com/ - -APP="Alpine-Wireguard" -var_tags="${var_tags:-alpine;vpn}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-256}" -var_disk="${var_disk:-1}" -var_os="${var_os:-alpine}" -var_version="${var_version:-3.21}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade - msg_ok "Updated Alpine Packages" - - msg_info "update wireguard-tools" - $STD apk add --no-cache --upgrade wireguard-tools - msg_ok "wireguard-tools updated" - - if [[ -d /etc/wgdashboard/src ]]; then - msg_info "update WGDashboard" - cd /etc/wgdashboard/src || exit - $STD echo "y" | ./wgd.sh update - $STD ./wgd.sh start - msg_ok "WGDashboard updated" - fi - - exit 0 -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" -echo -e "${INFO}${YW} WGDashboard Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:10086${CL}" diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh deleted file mode 100644 index 68a0d1d..0000000 --- a/install/alpine-wireguard-install.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.wireguard.com/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies" -$STD apk add \ - newt \ - curl \ - openssh \ - nano \ - mc \ - gpg \ - iptables \ - openrc -msg_ok "Installed Dependencies" - -msg_info "Installing WireGuard" -$STD apk add --no-cache wireguard-tools -if [[ ! -L /etc/init.d/wg-quick.wg0 ]]; then - ln -s /etc/init.d/wg-quick /etc/init.d/wg-quick.wg0 -fi - -private_key=$(wg genkey) -cat </etc/wireguard/wg0.conf -[Interface] -PrivateKey = ${private_key} -Address = 10.0.0.1/24 -SaveConfig = true -PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; -PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; -ListenPort = 51820 -EOF -msg_ok "Installed WireGuard" - -read -rp "Do you want to install WGDashboard? (y/N): " INSTALL_WGD -if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then - msg_info "Installing additional dependencies for WGDashboard" - $STD apk add --no-cache \ - python3 \ - py3-pip \ - git \ - sudo \ - musl-dev \ - linux-headers \ - gcc \ - python3-dev - msg_ok "Installed additional dependencies for WGDashboard" - msg_info "Installing WGDashboard" - git clone -q https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard - cd /etc/wgdashboard/src || exit - chmod u+x wgd.sh - $STD ./wgd.sh install - $STD echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf - sysctl -p /etc/sysctl.conf - msg_ok "Installed WGDashboard" - - msg_info "Creating Service for WGDashboard" - cat </etc/init.d/wg-dashboard -#!/sbin/openrc-run - -description="WireGuard Dashboard Service" - -depend() { - need net - after firewall -} - -start() { - ebegin "Starting WGDashboard" - cd /etc/wgdashboard/src/ || exit 1 - ./wgd.sh start & - eend $? -} - -stop() { - ebegin "Stopping WGDashboard" - pkill -f "wgd.sh" - eend $? -} -EOF - chmod +x /etc/init.d/wg-dashboard - $STD rc-update add wg-dashboard default - $STD rc-service wg-dashboard start - msg_ok "Created Service for WGDashboard" - -fi - -msg_info "Starting Services" -$STD rc-update add wg-quick.wg0 default -$STD rc-service wg-quick.wg0 start -msg_ok "Started Services" - -motd_ssh -customize From 5be18c6c7281488604d22b47633b91071f7509c5 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 2 Apr 2025 14:35:51 +0000 Subject: [PATCH 0284/1614] Update .app files --- ct/headers/alpine-wireguard | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/alpine-wireguard diff --git a/ct/headers/alpine-wireguard b/ct/headers/alpine-wireguard deleted file mode 100644 index 0d4c1bf..0000000 --- a/ct/headers/alpine-wireguard +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ _ _ ___ __ - / | / /___ (_)___ ___ | | / (_)_______ ____ ___ ______ __________/ / - / /| | / / __ \/ / __ \/ _ \_____| | /| / / / ___/ _ \/ __ `/ / / / __ `/ ___/ __ / - / ___ |/ / /_/ / / / / / __/_____/ |/ |/ / / / / __/ /_/ / /_/ / /_/ / / / /_/ / -/_/ |_/_/ .___/_/_/ /_/\___/ |__/|__/_/_/ \___/\__, /\__,_/\__,_/_/ \__,_/ - /_/ /____/ From 350b090fa66586f6d225b84393978b7ceabd6e46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 2 Apr 2025 16:59:10 +0000 Subject: [PATCH 0285/1614] Deleted files for issue: openziti-tunnel --- ct/openziti-tunnel.sh | 44 --------------------- frontend/public/json/openziti-tunnel.json | 43 -------------------- install/openziti-tunnel-install.sh | 48 ----------------------- 3 files changed, 135 deletions(-) delete mode 100644 ct/openziti-tunnel.sh delete mode 100644 frontend/public/json/openziti-tunnel.json delete mode 100644 install/openziti-tunnel-install.sh diff --git a/ct/openziti-tunnel.sh b/ct/openziti-tunnel.sh deleted file mode 100644 index 43e28fa..0000000 --- a/ct/openziti-tunnel.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: emoscardini -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/openziti/ziti - -APP="openziti-tunnel" -var_tags="${var_tags:-network;openziti-tunnel}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-512}" -var_disk="${var_disk:-2}" -var_os="${var_os:-ubuntu}" -var_version="${var_version:-24.04}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/openziti ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_info "Updating $APP LXC" - $STD apt-get update - $STD apt-get -y upgrade - msg_ok "Updated $APP LXC" - 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} Application was assigned the following IP:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}Address: ${IP}${CL}" \ No newline at end of file diff --git a/frontend/public/json/openziti-tunnel.json b/frontend/public/json/openziti-tunnel.json deleted file mode 100644 index 59fc450..0000000 --- a/frontend/public/json/openziti-tunnel.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "openziti-tunnel", - "slug": "openziti-tunnel", - "categories": [ - 4 - ], - "date_created": "2025-03-20", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": null, - "documentation": "https://openziti.io/docs/reference/tunnelers/docker/", - "website": "https://www.openziti.io/", - "logo": "https://raw.githubusercontent.com/openziti/ziti-doc/main/docusaurus/static/img/ziti-logo-dark.svg", - "description": "OpenZiti is an open-source, zero trust networking platform that enables secure connectivity between applications, services, and devices. It provides secure, encrypted connections between clients and services, and can be used to create secure, zero trust networks.", - "install_methods": [ - { - "type": "default", - "script": "ct/openziti-tunnel.sh", - "resources": { - "cpu": 1, - "ram": 512, - "hdd": 2, - "os": "Ubuntu", - "version": "24.04" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "The Openziti tunnel is installed in host mode; please see documentation for more information", - "type": "info" - }, - { - "text": "Openziti tunnel prompts for identity enrollment token during installation", - "type": "info" - } - ] -} diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh deleted file mode 100644 index 97d85e9..0000000 --- a/install/openziti-tunnel-install.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: emoscardini -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/openziti/ziti - -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 gpg -msg_ok "Installed Dependencies" - -msg_info "Installing openziti" -mkdir -p --mode=0755 /usr/share/keyrings -curl -sSLf https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg -echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable jammy main" >/etc/apt/sources.list.d/openziti.list -$STD apt-get update -$STD apt-get install -y ziti-edge-tunnel -sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openziti/bin/ziti-edge-tunnel run-host --verbose=${ZITI_VERBOSE} --identity-dir=${ZITI_IDENTITY_DIR}| } }' /usr/lib/systemd/system/ziti-edge-tunnel.service -systemctl daemon-reload -msg_ok "Installed openziti" - -read -r -p "Please paste an identity enrollment token(JTW)" prompt -if [[ ${prompt} ]]; then - msg_info "Adding identity" - echo "${prompt}" >/opt/openziti/etc/identities/identity.jwt - chown ziti:ziti /opt/openziti/etc/identities/identity.jwt - systemctl enable -q --now ziti-edge-tunnel - msg_ok "Service Started" -else - systemctl enable -q ziti-edge-tunnel - msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service" -fi - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" From df874c03c96b289590dbbab6278d923adb180b68 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 2 Apr 2025 17:23:29 +0000 Subject: [PATCH 0286/1614] Update .app files --- ct/headers/openziti-tunnel | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/openziti-tunnel diff --git a/ct/headers/openziti-tunnel b/ct/headers/openziti-tunnel deleted file mode 100644 index a908abd..0000000 --- a/ct/headers/openziti-tunnel +++ /dev/null @@ -1,6 +0,0 @@ - _ __ _ __ __ - ____ ____ ___ ____ ____ (_) /_(_) / /___ ______ ____ ___ / / - / __ \/ __ \/ _ \/ __ \/_ / / / __/ /_____/ __/ / / / __ \/ __ \/ _ \/ / -/ /_/ / /_/ / __/ / / / / /_/ / /_/ /_____/ /_/ /_/ / / / / / / / __/ / -\____/ .___/\___/_/ /_/ /___/_/\__/_/ \__/\__,_/_/ /_/_/ /_/\___/_/ - /_/ From 7404c6dda46f52fd590ea3bbe12cba0baac0287e Mon Sep 17 00:00:00 2001 From: Don Locke Date: Wed, 2 Apr 2025 14:04:27 -0600 Subject: [PATCH 0287/1614] Remove Header --- ct/headers/allstarlink | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 ct/headers/allstarlink diff --git a/ct/headers/allstarlink b/ct/headers/allstarlink deleted file mode 100644 index 9b97c4a..0000000 --- a/ct/headers/allstarlink +++ /dev/null @@ -1,5 +0,0 @@ - ___ ____ ____ __ __ _ __ - / | / / / ___// /_____ ______/ / (_)___ / /__ - / /| | / / /\__ \/ __/ __ `/ ___/ / / / __ \/ //_/ - / ___ |/ / /___/ / /_/ /_/ / / / /___/ / / / / ,< -/_/ |_/_/_/_____/\__/\__,_/_/ /_____/_/_/ /_/_/|_| From 53559fb0b7ba0ef7fdf35b021cfd4f007dc06498 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Apr 2025 23:24:38 +0200 Subject: [PATCH 0288/1614] Update VE -> VED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/allstarlink.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/allstarlink.sh b/ct/allstarlink.sh index b9e6106..b331818 100644 --- a/ct/allstarlink.sh +++ b/ct/allstarlink.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: Don Locke (DonLocke) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE From d51c61fcb9b40616ee9534d631db77fc45243596 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Apr 2025 22:44:04 +0000 Subject: [PATCH 0289/1614] Bump next in /frontend in the npm_and_yarn group across 1 directory Bumps the npm_and_yarn group with 1 update in the /frontend directory: [next](https://github.com/vercel/next.js). Updates `next` from 15.2.3 to 15.2.4 - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/compare/v15.2.3...v15.2.4) --- updated-dependencies: - dependency-name: next dependency-version: 15.2.4 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] --- frontend/package-lock.json | 80 +++++++++++++++++++------------------- frontend/package.json | 2 +- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 86899cd..b4bf3c3 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -33,7 +33,7 @@ "fuse.js": "^7.0.0", "lucide-react": "^0.453.0", "mini-svg-data-uri": "^1.4.4", - "next": "15.2.3", + "next": "15.2.4", "next-themes": "^0.3.0", "nuqs": "^2.1.1", "pocketbase": "^0.21.4", @@ -1583,9 +1583,9 @@ "license": "MIT" }, "node_modules/@next/env": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.2.3.tgz", - "integrity": "sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.2.4.tgz", + "integrity": "sha512-+SFtMgoiYP3WoSswuNmxJOCwi06TdWE733D+WPjpXIe4LXGULwEaofiiAy6kbS0+XjM5xF5n3lKuBwN2SnqD9g==", "license": "MIT" }, "node_modules/@next/eslint-plugin-next": { @@ -1629,9 +1629,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.2.3.tgz", - "integrity": "sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.2.4.tgz", + "integrity": "sha512-1AnMfs655ipJEDC/FHkSr0r3lXBgpqKo4K1kiwfUf3iE68rDFXZ1TtHdMvf7D0hMItgDZ7Vuq3JgNMbt/+3bYw==", "cpu": [ "arm64" ], @@ -1645,9 +1645,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.2.3.tgz", - "integrity": "sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.2.4.tgz", + "integrity": "sha512-3qK2zb5EwCwxnO2HeO+TRqCubeI/NgCe+kL5dTJlPldV/uwCnUgC7VbEzgmxbfrkbjehL4H9BPztWOEtsoMwew==", "cpu": [ "x64" ], @@ -1661,9 +1661,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.2.3.tgz", - "integrity": "sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.2.4.tgz", + "integrity": "sha512-HFN6GKUcrTWvem8AZN7tT95zPb0GUGv9v0d0iyuTb303vbXkkbHDp/DxufB04jNVD+IN9yHy7y/6Mqq0h0YVaQ==", "cpu": [ "arm64" ], @@ -1677,9 +1677,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.2.3.tgz", - "integrity": "sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.2.4.tgz", + "integrity": "sha512-Oioa0SORWLwi35/kVB8aCk5Uq+5/ZIumMK1kJV+jSdazFm2NzPDztsefzdmzzpx5oGCJ6FkUC7vkaUseNTStNA==", "cpu": [ "arm64" ], @@ -1693,9 +1693,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.2.3.tgz", - "integrity": "sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.2.4.tgz", + "integrity": "sha512-yb5WTRaHdkgOqFOZiu6rHV1fAEK0flVpaIN2HB6kxHVSy/dIajWbThS7qON3W9/SNOH2JWkVCyulgGYekMePuw==", "cpu": [ "x64" ], @@ -1709,9 +1709,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.2.3.tgz", - "integrity": "sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.2.4.tgz", + "integrity": "sha512-Dcdv/ix6srhkM25fgXiyOieFUkz+fOYkHlydWCtB0xMST6X9XYI3yPDKBZt1xuhOytONsIFJFB08xXYsxUwJLw==", "cpu": [ "x64" ], @@ -1725,9 +1725,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.2.3.tgz", - "integrity": "sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.2.4.tgz", + "integrity": "sha512-dW0i7eukvDxtIhCYkMrZNQfNicPDExt2jPb9AZPpL7cfyUo7QSNl1DjsHjmmKp6qNAqUESyT8YFl/Aw91cNJJg==", "cpu": [ "arm64" ], @@ -1741,9 +1741,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.2.3.tgz", - "integrity": "sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.2.4.tgz", + "integrity": "sha512-SbnWkJmkS7Xl3kre8SdMF6F/XDh1DTFEhp0jRTj/uB8iPKoU2bb2NDfcu+iifv1+mxQEd1g2vvSxcZbXSKyWiQ==", "cpu": [ "x64" ], @@ -7166,12 +7166,12 @@ "license": "MIT" }, "node_modules/next": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/next/-/next-15.2.3.tgz", - "integrity": "sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/next/-/next-15.2.4.tgz", + "integrity": "sha512-VwL+LAaPSxEkd3lU2xWbgEOtrM8oedmyhBqaVNmgKB+GvZlCy9rgaEc+y2on0wv+l0oSFqLtYD6dcC1eAedUaQ==", "license": "MIT", "dependencies": { - "@next/env": "15.2.3", + "@next/env": "15.2.4", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", @@ -7186,14 +7186,14 @@ "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "15.2.3", - "@next/swc-darwin-x64": "15.2.3", - "@next/swc-linux-arm64-gnu": "15.2.3", - "@next/swc-linux-arm64-musl": "15.2.3", - "@next/swc-linux-x64-gnu": "15.2.3", - "@next/swc-linux-x64-musl": "15.2.3", - "@next/swc-win32-arm64-msvc": "15.2.3", - "@next/swc-win32-x64-msvc": "15.2.3", + "@next/swc-darwin-arm64": "15.2.4", + "@next/swc-darwin-x64": "15.2.4", + "@next/swc-linux-arm64-gnu": "15.2.4", + "@next/swc-linux-arm64-musl": "15.2.4", + "@next/swc-linux-x64-gnu": "15.2.4", + "@next/swc-linux-x64-musl": "15.2.4", + "@next/swc-win32-arm64-msvc": "15.2.4", + "@next/swc-win32-x64-msvc": "15.2.4", "sharp": "^0.33.5" }, "peerDependencies": { diff --git a/frontend/package.json b/frontend/package.json index 923bb9c..78256a4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -44,7 +44,7 @@ "fuse.js": "^7.0.0", "lucide-react": "^0.453.0", "mini-svg-data-uri": "^1.4.4", - "next": "15.2.3", + "next": "15.2.4", "next-themes": "^0.3.0", "nuqs": "^2.1.1", "pocketbase": "^0.21.4", From f71d8fd666f70b93866c80fd0be2dc87f767064f Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Thu, 3 Apr 2025 01:22:56 +0000 Subject: [PATCH 0290/1614] Update versions.json --- frontend/public/json/versions.json | 139 ++++++++++++++--------------- 1 file changed, 67 insertions(+), 72 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 4ea9fc4..52c28cf 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,4 +1,69 @@ [ + { + "name": "ollama/ollama", + "version": "v0.6.3-rc1", + "date": "2025-03-26T20:39:01Z" + }, + { + "name": "HabitRPG/habitica", + "version": "v5.35.1", + "date": "2025-04-02T21:49:00Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-02T20:29:57Z" + }, + { + "name": "redis/redis", + "version": "8.0-rc1-int2", + "date": "2025-04-02T19:05:08Z" + }, + { + "name": "zitadel/zitadel", + "version": "v2.63.9", + "date": "2025-03-31T12:47:21Z" + }, + { + "name": "home-assistant/core", + "version": "2025.4.0", + "date": "2025-04-02T17:01:41Z" + }, + { + "name": "BookStackApp/BookStack", + "version": "v25.02.2", + "date": "2025-04-02T16:39:50Z" + }, + { + "name": "cloudflare/cloudflared", + "version": "2025.4.0", + "date": "2025-04-02T15:38:53Z" + }, + { + "name": "jenkinsci/jenkins", + "version": "jenkins-2.503", + "date": "2025-04-02T15:12:13Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.4.0b3", + "date": "2025-04-02T14:39:56Z" + }, + { + "name": "hargata/lubelog", + "version": "v1.4.6", + "date": "2025-04-02T14:07:12Z" + }, + { + "name": "firefly-iii/firefly-iii", + "version": "v6.2.10", + "date": "2025-03-22T13:02:26Z" + }, + { + "name": "wazuh/wazuh", + "version": "v4.11.2", + "date": "2025-04-02T13:40:18Z" + }, { "name": "Graylog2/graylog2-server", "version": "6.1.9", @@ -9,16 +74,6 @@ "version": "v1.29.4", "date": "2025-04-01T08:45:07Z" }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-02T10:34:08Z" - }, - { - "name": "home-assistant/core", - "version": "2025.3.4", - "date": "2025-03-21T20:22:46Z" - }, { "name": "zwave-js/zwave-js-ui", "version": "v10.1.4", @@ -51,8 +106,8 @@ }, { "name": "runtipi/runtipi", - "version": "v3.10.0", - "date": "2025-03-15T14:38:16Z" + "version": "nightly", + "date": "2025-04-01T19:30:29Z" }, { "name": "fallenbagel/jellyseerr", @@ -119,21 +174,6 @@ "version": "5.26.5", "date": "2025-04-01T09:32:48Z" }, - { - "name": "Checkmk/checkmk", - "version": "v2.4.0b3-rc1", - "date": "2025-04-01T09:22:44Z" - }, - { - "name": "wazuh/wazuh", - "version": "v4.11.2", - "date": "2025-04-01T07:07:35Z" - }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.10", - "date": "2025-03-22T13:02:26Z" - }, { "name": "diced/zipline", "version": "v4.0.2", @@ -164,11 +204,6 @@ "version": "v4.2.0", "date": "2025-03-19T18:34:01Z" }, - { - "name": "redis/redis", - "version": "8.0-rc1-int", - "date": "2025-03-31T18:26:40Z" - }, { "name": "traefik/traefik", "version": "v3.3.5", @@ -184,11 +219,6 @@ "version": "n8n@1.84.3", "date": "2025-03-27T11:54:33Z" }, - { - "name": "zitadel/zitadel", - "version": "v2.63.9", - "date": "2025-03-31T12:47:21Z" - }, { "name": "documenso/documenso", "version": "v1.10.0-rc.4", @@ -404,11 +434,6 @@ "version": "v2.1.0.112-2.1.0.112_canary_2025-03-26", "date": "2025-03-26T21:04:38Z" }, - { - "name": "ollama/ollama", - "version": "v0.6.3-rc1", - "date": "2025-03-26T20:39:01Z" - }, { "name": "dgtlmoon/changedetection.io", "version": "0.49.9", @@ -459,44 +484,14 @@ "version": "v0.0.7", "date": "2025-03-25T15:11:18Z" }, - { - "name": "jenkinsci/jenkins", - "version": "jenkins-2.503", - "date": "2025-03-25T14:01:20Z" - }, { "name": "crowdsecurity/crowdsec", "version": "v1.6.8", "date": "2025-03-25T13:33:10Z" }, - { - "name": "VictoriaMetrics/VictoriaMetrics", - "version": "pmm-6401-v1.114.0", - "date": "2025-03-25T07:58:34Z" - }, { "name": "caddyserver/caddy", "version": "v2.9.1", "date": "2025-01-08T15:22:53Z" - }, - { - "name": "ZoeyVid/NPMplus", - "version": "2025-03-24-r2", - "date": "2025-03-24T20:52:35Z" - }, - { - "name": "HabitRPG/habitica", - "version": "v5.35.0", - "date": "2025-03-24T20:51:10Z" - }, - { - "name": "go-gitea/gitea", - "version": "v1.23.6", - "date": "2025-03-24T20:38:45Z" - }, - { - "name": "docmost/docmost", - "version": "v0.9.0", - "date": "2025-03-24T18:25:37Z" } ] From 17a55f8f3c6b828784ccf4bf92985ef3f765f7bf Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 09:32:38 +0200 Subject: [PATCH 0291/1614] Update meilisearch.sh --- ct/meilisearch.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/meilisearch.sh b/ct/meilisearch.sh index 64c15dc..a6cbf89 100644 --- a/ct/meilisearch.sh +++ b/ct/meilisearch.sh @@ -9,7 +9,7 @@ APP="Meilisearch" var_tags="${var_tags:-full-text-search}" var_cpu="${var_cpu:-2}" var_ram="${var_ram:-4096}" -var_disk="${var_disk:-5}" +var_disk="${var_disk:-7}" var_os="${var_os:-debian}" var_version="${var_version:-12}" var_unprivileged="${var_unprivileged:-1}" @@ -24,7 +24,7 @@ function update_script() { check_container_storage check_container_resources - if [[ ! -f /opt/meilisearch_version.txt ]]; then + if [[ ! -f /opt/Meilisearch_version.txt ]]; then msg_error "No Meilisearch Installation Found!" exit fi @@ -53,7 +53,7 @@ function update_script() { fi if [ "$UPD" == "2" ]; then - if [[ ! -f /opt/meilisearch-ui_version.txt ]]; then + if [[ ! -f /opt/Meilisearch-ui_version.txt ]]; then msg_error "No Meilisearch-UI Installation Found!" exit fi From facf694d69192b48a06cca3419339b5683c5d324 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 09:34:31 +0200 Subject: [PATCH 0292/1614] Update meillisearch.json --- frontend/public/json/meillisearch.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/public/json/meillisearch.json b/frontend/public/json/meillisearch.json index f943b5a..0d27d92 100644 --- a/frontend/public/json/meillisearch.json +++ b/frontend/public/json/meillisearch.json @@ -4,7 +4,7 @@ "categories": [ 8 ], - "date_created": "2025-03-21", + "date_created": "2025-04-03", "type": "ct", "updateable": true, "privileged": false, @@ -20,8 +20,8 @@ "resources": { "cpu": 2, "ram": 4096, - "hdd": 5, - "os": "debian", + "hdd": 7, + "os": "Debian", "version": "12" } } @@ -34,6 +34,10 @@ { "text": "Meilisearch-UI can optionally be installed for a web-based search interface", "type": "info" + }, + { + "text": "Meilisearch-UI has early development status and can caused performance issues", + "type": "warn" } ] } From 1df9ea73d4c8718d527b01d13d8ec90964bce6ba Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 09:51:05 +0200 Subject: [PATCH 0293/1614] fix naming --- frontend/public/json/{meillisearch.json => meilisearch.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename frontend/public/json/{meillisearch.json => meilisearch.json} (100%) diff --git a/frontend/public/json/meillisearch.json b/frontend/public/json/meilisearch.json similarity index 100% rename from frontend/public/json/meillisearch.json rename to frontend/public/json/meilisearch.json From f24ee4378aab041214e684a4bb7fff76c20d4ae7 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 09:54:20 +0200 Subject: [PATCH 0294/1614] fix openproject update --- ct/openproject.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ct/openproject.sh b/ct/openproject.sh index ce3fda3..4f1896b 100644 --- a/ct/openproject.sh +++ b/ct/openproject.sh @@ -2,7 +2,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: michelroegl-brunner -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/opf/openproject APP="OpenProject" @@ -29,9 +29,8 @@ function update_script() { fi msg_info "Updating ${APP}" $STD apt-get update - $STD apt-get apt-get install --only-upgrade -y openproject + $STD apt-get install --only-upgrade -y openproject msg_ok "Updated ${APP}" - exit } start From a7f461b500a9dc31b96d6761fc04cf6f59fa59cd Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 09:56:01 +0200 Subject: [PATCH 0295/1614] fix openproject --- frontend/public/json/openproject.json | 2 +- install/openproject-install.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/public/json/openproject.json b/frontend/public/json/openproject.json index b376669..b697b13 100644 --- a/frontend/public/json/openproject.json +++ b/frontend/public/json/openproject.json @@ -4,7 +4,7 @@ "categories": [ 25 ], - "date_created": "2025-03-21", + "date_created": "2025-04-03", "type": "ct", "updateable": true, "privileged": false, diff --git a/install/openproject-install.sh b/install/openproject-install.sh index 20c6c0e..de1bb15 100644 --- a/install/openproject-install.sh +++ b/install/openproject-install.sh @@ -45,10 +45,10 @@ $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PAS $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" { echo "OpenProject-Credentials" - echo -e "OpenProject Database User: \e[32m$DB_USER\e[0m" - echo -e "OpenProject Database Password: \e[32m$DB_PASS\e[0m" - echo -e "OpenProject Database Name: \e[32m$DB_NAME\e[0m" - echo -e "OpenProject API Key: \e[32m$API_KEY\e[0m" + echo -e "OpenProject Database User: $DB_USER" + echo -e "OpenProject Database Password: $DB_PASS" + echo -e "OpenProject Database Name: $DB_NAME" + echo -e "OpenProject API Key: $API_KEY" } >>~/openproject.creds msg_ok "Set up PostgreSQL" From e199f78009cd4245936ee9d2bfb190d948ad67d7 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 09:56:56 +0200 Subject: [PATCH 0296/1614] Update openproject.sh --- ct/openproject.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/openproject.sh b/ct/openproject.sh index 4f1896b..ce445a9 100644 --- a/ct/openproject.sh +++ b/ct/openproject.sh @@ -31,6 +31,7 @@ function update_script() { $STD apt-get update $STD apt-get install --only-upgrade -y openproject msg_ok "Updated ${APP}" + exit 0 } start From c6d4597dca2f29d35ebd3f14c8b4f578e8326d36 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 09:59:10 +0200 Subject: [PATCH 0297/1614] Update build.func --- misc/build.func | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/misc/build.func b/misc/build.func index b587291..d834922 100644 --- a/misc/build.func +++ b/misc/build.func @@ -2232,7 +2232,7 @@ check_container_storage() { } start() { - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) + #source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" @@ -2258,18 +2258,18 @@ start() { 1) VERB="no" set_std_mode - log_message "INFO" "Update started (Silent Mode)" + #log_message "INFO" "Update started (Silent Mode)" ;; 2) VERB="yes" set_std_mode - log_message "INFO" "Update started (Verbose Mode)" + #log_message "INFO" "Update started (Verbose Mode)" ;; 3) clear - log_message "INFO" "Update aborted." + #log_message "INFO" "Update aborted." exit_script - exit + exit 0 ;; esac From f731b57f35752e9dd762ba6e41938eec58bf5921 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 10:01:52 +0200 Subject: [PATCH 0298/1614] ressource check for alpine --- ct/alpine.sh | 3 +++ misc/build.func | 61 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/ct/alpine.sh b/ct/alpine.sh index 341e0b5..214e4d5 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -20,6 +20,9 @@ color catch_errors function update_script() { + header_info + check_container_storage + check_container_resources UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \ "1" "Check for Alpine Updates" ON \ 3>&1 1>&2 2>&3) diff --git a/misc/build.func b/misc/build.func index d834922..8705ad1 100644 --- a/misc/build.func +++ b/misc/build.func @@ -2193,41 +2193,68 @@ install_script() { } check_container_resources() { - # Check actual RAM & Cores - current_ram=$(free -m | awk 'NR==2{print $2}') - current_cpu=$(nproc) + # Determine current RAM in MB (Debian uses free, Alpine reads from /proc/meminfo) + if command -v free >/dev/null 2>&1; then + current_ram=$(free -m | awk '/^Mem:/{print $2}') + elif [ -f /proc/meminfo ]; then + current_ram=$(awk '/MemTotal/{printf "%.0f", $2 / 1024}' /proc/meminfo) + else + echo "${CROSS}${HOLD} Unable to determine RAM on this system.${CL}" + exit 1 + fi - # Check whether the current RAM is less than the required RAM or the CPU cores are less than required - if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then + # Determine number of CPU cores (POSIX-safe) + if command -v nproc >/dev/null 2>&1; then + current_cpu=$(nproc) + else + current_cpu=$(grep -c ^processor /proc/cpuinfo) + fi + # Check if RAM or CPU is below requirement + if [ "$current_ram" -lt "$var_ram" ] || [ "$current_cpu" -lt "$var_cpu" ]; then echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}" echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n" echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " read -r prompt - # Check if the input is 'yes', otherwise exit with status 1 - if [[ ! ${prompt,,} =~ ^(yes)$ ]]; then + + case "$(printf "%s" "$prompt" | tr '[:upper:]' '[:lower:]')" in + yes) ;; + *) echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}" exit 1 - fi + ;; + esac else echo -e "" fi } check_container_storage() { - # Check if the /boot partition is more than 80% full - total_size=$(df /boot --output=size | tail -n 1) - local used_size=$(df /boot --output=used | tail -n 1) + # Check if /boot is mounted and retrieve total and used blocks + if df /boot >/dev/null 2>&1; then + total_size=$(df /boot | awk 'NR==2 {print $2}') + used_size=$(df /boot | awk 'NR==2 {print $3}') + else + echo -e "${CROSS}${HOLD} ${RD}/boot partition not found or cannot be checked.${CL}" + exit 1 + fi + # Fallback in case of invalid data + if [ -z "$total_size" ] || [ -z "$used_size" ]; then + echo -e "${CROSS}${HOLD} ${RD}Unable to determine storage usage.${CL}" + exit 1 + fi + # Calculate disk usage percentage (integer) usage=$((100 * used_size / total_size)) - if ((usage > 80)); then - # Prompt the user for confirmation to continue - echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}" + if [ "$usage" -gt 80 ]; then + echo -e "${INFO}${HOLD} ${YWB}Warning: /boot storage is critically low (${usage}%).${CL}" echo -ne "Continue anyway? " read -r prompt - # Check if the input is 'y' or 'yes', otherwise exit with status 1 - if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then + case "$(printf "%s" "$prompt" | tr '[:upper:]' '[:lower:]')" in + y | yes) ;; + *) echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}" exit 1 - fi + ;; + esac fi } From b50d019d9653d247a3742a575539e80f8dc5a00d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 11:02:01 +0200 Subject: [PATCH 0299/1614] Update maxun-install.sh --- install/maxun-install.sh | 110 ++++++++++++++++++++++++++++----------- 1 file changed, 80 insertions(+), 30 deletions(-) diff --git a/install/maxun-install.sh b/install/maxun-install.sh index df7bb1a..dcae475 100644 --- a/install/maxun-install.sh +++ b/install/maxun-install.sh @@ -15,26 +15,32 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gpg \ - openssl \ - redis \ - libgbm1 \ - libnss3 \ - libatk1.0-0 \ - libatk-bridge2.0-0 \ - libdrm2 \ - libxkbcommon0 \ - libglib2.0-0 \ - libdbus-1-3 \ - libx11-xcb1 \ - libxcb1 \ - libxcomposite1 \ - libxcursor1 \ - libxdamage1 \ - libxext6 \ - libxi6 \ - libxtst6 \ - netcat + gpg \ + openssl \ + redis \ + libgbm1 \ + libnss3 \ + libatk1.0-0 \ + libatk-bridge2.0-0 \ + libdrm2 \ + libxkbcommon0 \ + libglib2.0-0 \ + libdbus-1-3 \ + libx11-xcb1 \ + libxcb1 \ + libxcomposite1 \ + libxcursor1 \ + libxdamage1 \ + libxext6 \ + libxi6 \ + libxtst6 \ + netcat \ + ca-certificates \ + libxrandr2 \ + libasound2 \ + libxss1 \ + libxinerama1 \ + nginx msg_ok "Installed Dependencies" #configure_lxc "Semantic Search requires a dedicated GPU and at least 16GB RAM. Would you like to install it?" 100 "memory" "16000" @@ -74,12 +80,12 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8' $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" { - echo "Maxun-Credentials" - echo "Maxun Database User: $DB_USER" - echo "Maxun Database Password: $DB_PASS" - echo "Maxun Database Name: $DB_NAME" - echo "Maxun JWT Secret: $JWT_SECRET" - echo "Maxun Encryption Key: $ENCRYPTION_KEY" + echo "Maxun-Credentials" + echo "Maxun Database User: $DB_USER" + echo "Maxun Database Password: $DB_PASS" + echo "Maxun Database Name: $DB_NAME" + echo "Maxun JWT Secret: $JWT_SECRET" + echo "Maxun Encryption Key: $ENCRYPTION_KEY" } >>~/maxun.creds msg_ok "Set up Database" @@ -108,9 +114,9 @@ LimitNOFILE=65536 WantedBy=multi-user.target EOF { - echo "__________________" - echo "MinIO Admin User: $MINIO_USER" - echo "MinIO Admin Password: $MINIO_PASS" + echo "__________________" + echo "MinIO Admin User: $MINIO_USER" + echo "MinIO Admin Password: $MINIO_PASS" } >>~/maxun.creds cat </etc/default/minio MINIO_ROOT_USER=${MINIO_USER} @@ -167,6 +173,49 @@ cd /opt/maxun node -e "require('./server/src/db/migrate')().then(() => { console.log('Migrations completed'); })" msg_ok "DB Migrations completed" +msg_info "Setting up nginx with CORS Proxy" + +$STD apt-get install -y nginx + +cat <<'EOF' >/etc/nginx/sites-available/maxun +server { + listen 80; + + location / { + root /usr/share/nginx/html; + try_files $uri $uri/ /index.html; + } + + location ~ ^/(api|record|workflow|storage|auth|integration|proxy|api-docs) { + proxy_pass http://localhost:8080; + proxy_set_header Host $host; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_http_version 1.1; + + add_header Access-Control-Allow-Origin "$http_origin" always; + add_header Access-Control-Allow-Credentials true always; + add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS always; + add_header Access-Control-Allow-Headers Authorization,Content-Type,X-Requested-With always; + + if ($request_method = OPTIONS) { + return 204; + } + + proxy_connect_timeout 60s; + proxy_read_timeout 60s; + proxy_send_timeout 60s; + + proxy_intercept_errors on; + error_page 502 503 504 /50x.html; + } +} +EOF + +ln -sf /etc/nginx/sites-available/maxun /etc/nginx/sites-enabled/maxun +rm -f /etc/nginx/sites-enabled/default +msg_ok "nginx with CORS Proxy set up" + msg_info "Creating Service" cat </etc/systemd/system/maxun.service [Unit] @@ -175,7 +224,7 @@ After=network.target postgresql.service redis.service minio.service [Service] WorkingDirectory=/opt/maxun -ExecStart=/usr/bin/npm run server +ExecStart=/usr/bin/npm run start:server -- --host 0.0.0.0 Restart=always EnvironmentFile=/opt/maxun/.env @@ -183,6 +232,7 @@ EnvironmentFile=/opt/maxun/.env WantedBy=multi-user.target EOF systemctl enable -q --now maxun +systemctl enable -q --now nginx msg_ok "Created Service" motd_ssh From db84ff2c625b213e3fb02d2f49bb112d4de04c15 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 11:10:36 +0200 Subject: [PATCH 0300/1614] remove netcat --- install/maxun-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/maxun-install.sh b/install/maxun-install.sh index dcae475..73f43d9 100644 --- a/install/maxun-install.sh +++ b/install/maxun-install.sh @@ -34,7 +34,6 @@ $STD apt-get install -y \ libxext6 \ libxi6 \ libxtst6 \ - netcat \ ca-certificates \ libxrandr2 \ libasound2 \ From 5af30c6af826cfca019ba231ad7e711f91d1bc4e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 11:16:34 +0200 Subject: [PATCH 0301/1614] Update build.func --- misc/build.func | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/misc/build.func b/misc/build.func index 8705ad1..63d4db7 100644 --- a/misc/build.func +++ b/misc/build.func @@ -2258,6 +2258,57 @@ check_container_storage() { fi } +get_gh_release() { + local repo="$1" + local app="${repo##*/}" + local api_url="https://api.github.com/repos/$repo/releases/latest" + local header=() + local attempt=0 + local max_attempts=3 + local api_response tag + + echo "🔍 Checking latest release for: $repo" + + [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") + + until [[ $attempt -ge $max_attempts ]]; do + ((attempt++)) + $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" + + if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then + $STD msg_info "Request failed, retrying...\n" + sleep 2 + continue + fi + + if echo "$api_response" | grep -q "API rate limit exceeded"; then + msg_error "GitHub API rate limit exceeded." + return 1 + fi + + if echo "$api_response" | jq -e '.message == "Not Found"' &>/dev/null; then + msg_error "Repository not found: $repo" + return 1 + fi + + tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + + if [[ -z "$tag" ]]; then + $STD msg_info "Empty tag received, retrying...\n" + sleep 2 + continue + fi + + $STD msg_ok "Found release: $tag for $repo" + echo "$tag" + return 0 + done + + msg_error "Failed to fetch release for $repo after $max_attempts attempts." + return 1 +} + start() { #source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) LOGDIR="/usr/local/community-scripts/logs" From 2ca3030df0c909a9bc43bc33ab0c338cbbe8895d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 11:16:50 +0200 Subject: [PATCH 0302/1614] Update ubuntu-install.sh --- install/ubuntu-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index cee1f77..c705e25 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -14,8 +14,6 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo $STD apt-get install -y jq msg_ok "Installed Dependencies" From d3c801241ed658c93a861a056a54dfd45badb3aa Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 11:23:44 +0200 Subject: [PATCH 0303/1614] Update maxun-install.sh --- install/maxun-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/maxun-install.sh b/install/maxun-install.sh index 73f43d9..846dee1 100644 --- a/install/maxun-install.sh +++ b/install/maxun-install.sh @@ -167,10 +167,10 @@ $STD npx playwright install-deps echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Maxun" -msg_info "Running DB Migrations" -cd /opt/maxun -node -e "require('./server/src/db/migrate')().then(() => { console.log('Migrations completed'); })" -msg_ok "DB Migrations completed" +#msg_info "Running DB Migrations" +#cd /opt/maxun +#node -e "require('./server/src/db/migrate')().then(() => { console.log('Migrations completed'); })" +#msg_ok "DB Migrations completed" msg_info "Setting up nginx with CORS Proxy" From f5ee6a1613dba5eccb45299f699d7afe15d35057 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 11:27:53 +0200 Subject: [PATCH 0304/1614] testing --- ct/ubuntu.sh | 2 +- install/ubuntu-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index 28266e3..1cd61f1 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) +# source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index c705e25..82e3d93 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT From a08507ab516ab5b7c90d1ccd7c3bad86a604d9d8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 13:35:33 +0200 Subject: [PATCH 0305/1614] Update maxun-install.sh --- install/maxun-install.sh | 47 ++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/install/maxun-install.sh b/install/maxun-install.sh index 846dee1..2705dca 100644 --- a/install/maxun-install.sh +++ b/install/maxun-install.sh @@ -70,6 +70,7 @@ MINIO_USER=minio_usr MINIO_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) JWT_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32) ENCRYPTION_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32) +LOCAL_IP=$(hostname -I | awk '{print $1}') msg_ok "Set up Variables" msg_info "Setup Database" @@ -139,7 +140,7 @@ DB_PASSWORD=${DB_PASS} DB_HOST=localhost DB_PORT=5432 ENCRYPTION_KEY=${ENCRYPTION_KEY} -MINIO_ENDPOINT=minio +MINIO_ENDPOINT=localhost MINIO_PORT=9000 MINIO_CONSOLE_PORT=9001 MINIO_ACCESS_KEY=${MINIO_USER} @@ -149,18 +150,29 @@ REDIS_PORT=6379 BACKEND_PORT=8080 FRONTEND_PORT=5173 -BACKEND_URL=http://localhost:8080 -PUBLIC_URL=http://localhost:5173 -VITE_BACKEND_URL=http://localhost:8080 -VITE_PUBLIC_URL=http://localhost:5173 +BACKEND_URL=http://${LOCAL_IP}:8080 +PUBLIC_URL=http://${LOCAL_IP}:5173 +VITE_BACKEND_URL=http://${LOCAL_IP}:8080 +VITE_PUBLIC_URL=http://${LOCAL_IP}:5173 MAXUN_TELEMETRY=false EOF +cat </usr/local/bin/update-env-ip.sh +env_file="/opt/maxun/.env" +ip=$(hostname -I | awk '{print $1}') + +sed -i "s|^BACKEND_URL=.*|BACKEND_URL=http://${ip}:8080|" "$env_file" +sed -i "s|^PUBLIC_URL=.*|PUBLIC_URL=http://${ip}:5173|" "$env_file" +sed -i "s|^VITE_BACKEND_URL=.*|VITE_BACKEND_URL=http://${ip}:8080|" "$env_file" +sed -i "s|^VITE_PUBLIC_URL=.*|VITE_PUBLIC_URL=http://${ip}:5173|" "$env_file" +EOF +chmod +x /usr/local/bin/update-env-ip.sh cd /opt/maxun $STD npm install --legacy-peer-deps cd /opt/maxun/maxun-core $STD npm install --legacy-peer-deps +$STD npm run build cd /opt/maxun $STD npx playwright install --with-deps chromium $STD npx playwright install-deps @@ -173,9 +185,6 @@ msg_ok "Installed Maxun" #msg_ok "DB Migrations completed" msg_info "Setting up nginx with CORS Proxy" - -$STD apt-get install -y nginx - cat <<'EOF' >/etc/nginx/sites-available/maxun server { listen 80; @@ -215,15 +224,28 @@ ln -sf /etc/nginx/sites-available/maxun /etc/nginx/sites-enabled/maxun rm -f /etc/nginx/sites-enabled/default msg_ok "nginx with CORS Proxy set up" -msg_info "Creating Service" -cat </etc/systemd/system/maxun.service +msg_info "Creating Services" +cat </etc/systemd/system/maxun-update-env.service +[Unit] +Description=Update .env with dynamic LXC IP +After=network-online.target + +[Service] +Type=oneshot +ExecStart=/usr/local/bin/update-env-ip.sh + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/maxun-server.service [Unit] Description=Maxun Service -After=network.target postgresql.service redis.service minio.service +After=network.target postgresql.service redis.service minio.service maxun-update-env.service [Service] WorkingDirectory=/opt/maxun -ExecStart=/usr/bin/npm run start:server -- --host 0.0.0.0 +ExecStart=/usr/bin/npm run start:server Restart=always EnvironmentFile=/opt/maxun/.env @@ -232,6 +254,7 @@ WantedBy=multi-user.target EOF systemctl enable -q --now maxun systemctl enable -q --now nginx +systemctl enable -q --now maxun-update-env msg_ok "Created Service" motd_ssh From ba39bcee7ea70c5fa4afd863089094ce6679008a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 13:50:15 +0200 Subject: [PATCH 0306/1614] Update maxun-install.sh --- install/maxun-install.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/install/maxun-install.sh b/install/maxun-install.sh index 2705dca..b0e83fc 100644 --- a/install/maxun-install.sh +++ b/install/maxun-install.sh @@ -160,12 +160,11 @@ EOF cat </usr/local/bin/update-env-ip.sh env_file="/opt/maxun/.env" -ip=$(hostname -I | awk '{print $1}') -sed -i "s|^BACKEND_URL=.*|BACKEND_URL=http://${ip}:8080|" "$env_file" -sed -i "s|^PUBLIC_URL=.*|PUBLIC_URL=http://${ip}:5173|" "$env_file" -sed -i "s|^VITE_BACKEND_URL=.*|VITE_BACKEND_URL=http://${ip}:8080|" "$env_file" -sed -i "s|^VITE_PUBLIC_URL=.*|VITE_PUBLIC_URL=http://${ip}:5173|" "$env_file" +sed -i "s|^BACKEND_URL=.*|BACKEND_URL=http://${LOCAL_IP}:8080|" "$env_file" +sed -i "s|^PUBLIC_URL=.*|PUBLIC_URL=http://${LOCAL_IP}:5173|" "$env_file" +sed -i "s|^VITE_BACKEND_URL=.*|VITE_BACKEND_URL=http://${LOCAL_IP}:8080|" "$env_file" +sed -i "s|^VITE_PUBLIC_URL=.*|VITE_PUBLIC_URL=http://${LOCAL_IP}:5173|" "$env_file" EOF chmod +x /usr/local/bin/update-env-ip.sh cd /opt/maxun From 9204e6bf0bbb449c0aec55aecdc206454e9c5cfe Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 13:56:19 +0200 Subject: [PATCH 0307/1614] fix escaping EOF --- install/maxun-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/maxun-install.sh b/install/maxun-install.sh index b0e83fc..f4bcb6b 100644 --- a/install/maxun-install.sh +++ b/install/maxun-install.sh @@ -158,7 +158,7 @@ VITE_PUBLIC_URL=http://${LOCAL_IP}:5173 MAXUN_TELEMETRY=false EOF -cat </usr/local/bin/update-env-ip.sh +cat <<'EOF' >/usr/local/bin/update-env-ip.sh env_file="/opt/maxun/.env" sed -i "s|^BACKEND_URL=.*|BACKEND_URL=http://${LOCAL_IP}:8080|" "$env_file" From 874fde4b0f805426ec1ad8f88224d46d37e0fb38 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 14:31:22 +0200 Subject: [PATCH 0308/1614] Update maxun-install.sh --- install/maxun-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/maxun-install.sh b/install/maxun-install.sh index f4bcb6b..2382f67 100644 --- a/install/maxun-install.sh +++ b/install/maxun-install.sh @@ -236,15 +236,14 @@ ExecStart=/usr/local/bin/update-env-ip.sh [Install] WantedBy=multi-user.target EOF - -cat </etc/systemd/system/maxun-server.service +cat </etc/systemd/system/maxun.service [Unit] Description=Maxun Service After=network.target postgresql.service redis.service minio.service maxun-update-env.service [Service] WorkingDirectory=/opt/maxun -ExecStart=/usr/bin/npm run start:server +ExecStart=/usr/bin/npm run start Restart=always EnvironmentFile=/opt/maxun/.env From 6d959bd9e8c8955317eca804c2b89754e6de9b97 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Thu, 3 Apr 2025 12:36:17 +0000 Subject: [PATCH 0309/1614] Update versions.json --- frontend/public/json/versions.json | 127 ++++++++++++----------------- 1 file changed, 51 insertions(+), 76 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 52c28cf..3c04b35 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,4 +1,49 @@ [ + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-03T10:34:03Z" + }, + { + "name": "dgtlmoon/changedetection.io", + "version": "0.49.10", + "date": "2025-04-03T09:17:54Z" + }, + { + "name": "syncthing/syncthing", + "version": "v1.29.4", + "date": "2025-04-01T08:45:07Z" + }, + { + "name": "firefly-iii/firefly-iii", + "version": "v6.2.10", + "date": "2025-03-22T13:02:26Z" + }, + { + "name": "Graylog2/graylog2-server", + "version": "6.0.14", + "date": "2025-04-03T07:52:24Z" + }, + { + "name": "jupyter/notebook", + "version": "@jupyter-notebook/ui-components@7.4.0-rc.0", + "date": "2025-04-03T06:49:38Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1722", + "date": "2025-04-03T05:51:10Z" + }, + { + "name": "mattermost/mattermost", + "version": "server/public/v0.1.11", + "date": "2025-03-28T14:04:31Z" + }, + { + "name": "rabbitmq/rabbitmq-server", + "version": "v4.0.8", + "date": "2025-04-03T05:11:15Z" + }, { "name": "ollama/ollama", "version": "v0.6.3-rc1", @@ -10,9 +55,9 @@ "date": "2025-04-02T21:49:00Z" }, { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-02T20:29:57Z" + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" }, { "name": "redis/redis", @@ -54,45 +99,20 @@ "version": "v1.4.6", "date": "2025-04-02T14:07:12Z" }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.10", - "date": "2025-03-22T13:02:26Z" - }, { "name": "wazuh/wazuh", "version": "v4.11.2", "date": "2025-04-02T13:40:18Z" }, - { - "name": "Graylog2/graylog2-server", - "version": "6.1.9", - "date": "2025-04-02T11:18:59Z" - }, - { - "name": "syncthing/syncthing", - "version": "v1.29.4", - "date": "2025-04-01T08:45:07Z" - }, { "name": "zwave-js/zwave-js-ui", "version": "v10.1.4", "date": "2025-04-02T09:38:52Z" }, { - "name": "mattermost/mattermost", - "version": "server/public/v0.1.11", - "date": "2025-03-28T14:04:31Z" - }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1719", - "date": "2025-04-02T05:50:17Z" - }, - { - "name": "rabbitmq/rabbitmq-server", - "version": "v4.0.7", - "date": "2025-02-26T19:07:11Z" + "name": "runtipi/runtipi", + "version": "v3.10.0", + "date": "2025-03-15T14:38:16Z" }, { "name": "immich-app/immich", @@ -104,11 +124,6 @@ "version": "v0.14.3", "date": "2025-04-01T19:53:18Z" }, - { - "name": "runtipi/runtipi", - "version": "nightly", - "date": "2025-04-01T19:30:29Z" - }, { "name": "fallenbagel/jellyseerr", "version": "preview-music-support", @@ -144,11 +159,6 @@ "version": "v1.127.1", "date": "2025-03-26T21:44:28Z" }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, { "name": "Luligu/matterbridge", "version": "2.2.6", @@ -434,21 +444,11 @@ "version": "v2.1.0.112-2.1.0.112_canary_2025-03-26", "date": "2025-03-26T21:04:38Z" }, - { - "name": "dgtlmoon/changedetection.io", - "version": "0.49.9", - "date": "2025-03-26T15:31:03Z" - }, { "name": "prometheus/prometheus", "version": "v0.303.0-rc.0", "date": "2025-03-26T12:48:46Z" }, - { - "name": "jupyter/notebook", - "version": "@jupyter-notebook/ui-components@7.4.0-beta.3", - "date": "2025-03-26T10:07:53Z" - }, { "name": "forgejo/forgejo", "version": "v12.0.0-dev", @@ -468,30 +468,5 @@ "name": "Stirling-Tools/Stirling-PDF", "version": "v0.45.0", "date": "2025-03-25T18:48:17Z" - }, - { - "name": "ipfs/kubo", - "version": "v0.34.1", - "date": "2025-03-25T18:11:12Z" - }, - { - "name": "dotnetfactory/fluid-calendar", - "version": "v1.3.0", - "date": "2025-03-25T15:55:02Z" - }, - { - "name": "hansmi/prometheus-paperless-exporter", - "version": "v0.0.7", - "date": "2025-03-25T15:11:18Z" - }, - { - "name": "crowdsecurity/crowdsec", - "version": "v1.6.8", - "date": "2025-03-25T13:33:10Z" - }, - { - "name": "caddyserver/caddy", - "version": "v2.9.1", - "date": "2025-01-08T15:22:53Z" } ] From be3fde61aad4037fa4067c59ca06f21ade6cfd5e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Apr 2025 15:17:50 +0200 Subject: [PATCH 0310/1614] Update maxun-install.sh --- install/maxun-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/maxun-install.sh b/install/maxun-install.sh index 2382f67..bb3d23c 100644 --- a/install/maxun-install.sh +++ b/install/maxun-install.sh @@ -250,9 +250,9 @@ EnvironmentFile=/opt/maxun/.env [Install] WantedBy=multi-user.target EOF +systemctl enable -q --now maxun-update-env systemctl enable -q --now maxun systemctl enable -q --now nginx -systemctl enable -q --now maxun-update-env msg_ok "Created Service" motd_ssh From bb598f86219374865185533b5389a1303fa68967 Mon Sep 17 00:00:00 2001 From: Don Locke <75755573+DonLocke@users.noreply.github.com> Date: Thu, 3 Apr 2025 11:17:02 -0600 Subject: [PATCH 0311/1614] change wget to curl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/allstarlink-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/allstarlink-install.sh b/install/allstarlink-install.sh index 38d327e..1393033 100644 --- a/install/allstarlink-install.sh +++ b/install/allstarlink-install.sh @@ -14,7 +14,7 @@ network_check update_os msg_info "Adding ASL Package Repository" -wget -q -P /tmp https://repo.allstarlink.org/public/asl-apt-repos.deb12_all.deb +curl -fsSL "https://repo.allstarlink.org/public/asl-apt-repos.deb12_all.deb" -o /tmp/asl-apt-repos.deb12_all.deb $STD dpkg -i /tmp/asl-apt-repos.deb12_all.deb $STD apt-get update msg_ok "Added ASL Package Repository" From b9957988601d95be8f8ac01270af27eae6ff1e01 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Thu, 3 Apr 2025 21:08:01 +0200 Subject: [PATCH 0312/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 2c46120..65aabba 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -34,8 +34,8 @@ msg_ok "Added PHP8.3 Repository" msg_info "Installing PHP" $STD apt-get remove -y php8.2* $STD apt-get install -y \ - php8.3 \ - php8.3-{ffi,opcache,redis,zip,pdo-sqlite,bcmath,pdo,curl,dom,fpm} + php8.4 \ + php8.4-{ffi,opcache,redis,zip,pdo-sqlite,bcmath,pdo,curl,dom,fpm} msg_info "Installed PHP" msg_info "Installing MeiliSearch" @@ -175,7 +175,7 @@ server { error_page 404 /index.php; location ~ ^/index\.php(/|$) { - fastcgi_pass unix:/var/run/php/php8.3-fpm.sock; + fastcgi_pass unix:/var/run/php/php8.4-fpm.sock; fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name; include fastcgi_params; fastcgi_hide_header X-Powered-By; From 4fee8856a2d842a3203cba6b42b02221696dd558 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Thu, 3 Apr 2025 21:20:23 +0200 Subject: [PATCH 0313/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 65aabba..bacec12 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -24,12 +24,12 @@ $STD apt-get install -y \ lsb-release msg_ok "Installed Dependencies" -msg_info "Adding PHP8.3 Repository" +msg_info "Adding PHP8.4 Repository" $STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb $STD dpkg -i /tmp/debsuryorg-archive-keyring.deb $STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' $STD apt-get update -msg_ok "Added PHP8.3 Repository" +msg_ok "Added PHP8.4 Repository" msg_info "Installing PHP" $STD apt-get remove -y php8.2* From 6e7cc765c2763bf565c0d1de2bb2796a5b072c05 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Fri, 4 Apr 2025 01:46:57 -0400 Subject: [PATCH 0314/1614] Reactive-Resume: Browserless fix to only install Chromium; remove Python/playwright dep If we simply delete the unneeded browser dirs in `src/routes` then we don't need to install them. This will save compiling time and a lot of disk space. It's late for me so I haven't tested fully. --- ct/reactive-resume.sh | 41 ++++++++++++++---------------- install/reactive-resume-install.sh | 15 +++++------ 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/ct/reactive-resume.sh b/ct/reactive-resume.sh index 1091a1d..8ebcb84 100644 --- a/ct/reactive-resume.sh +++ b/ct/reactive-resume.sh @@ -37,15 +37,14 @@ function update_script() { msg_info "Updating $APP to v${RELEASE}" cp /opt/${APP}/.env /opt/rxresume.env - cd /tmp - wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" - unzip -q v${RELEASE}.zip - cp -r ${APP}-${RELEASE}/* /opt/${APP} + res_tmp=$(mktemp) + rm -rf /opt/${APP} + wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -O $res_tmp + unzip -q $res_tmp + mv ${APP}-${RELEASE}/ /opt/${APP} cd /opt/${APP} - corepack enable export PUPPETEER_SKIP_DOWNLOAD="true" export NEXT_TELEMETRY_DISABLED=1 - export CI="true" $STD pnpm install --frozen-lockfile $STD pnpm run build $STD pnpm run prisma:generate @@ -59,35 +58,33 @@ function update_script() { $STD dpkg -i minio.deb msg_ok "Updated Minio" - msg_info "Updating Playwright" - $STD python3 -m pip install playwright --upgrade - msg_ok "Updated Playwright" - msg_info "Updating Browserless (Patience)" systemctl stop browserless + cp /opt/browserless/.env /opt/browserless.env + rm -rf browserless + brwsr_tmp=$(mktemp) TAG=$(curl -s https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') - wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip - unzip -q v${TAG}.zip - cp -r browserless-${TAG}/* /opt/browserless + wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -O $brwsr_tmp + unzip -q $brwsr_tmp + mv browserless-${TAG}/ /opt/browserless cd /opt/browserless - $STD npm update - $STD node_modules/playwright-core/cli.js install --with-deps chromium firefox webkit - $STD node_modules/playwright-core/cli.js install --force chrome msedge + $STD npm install + rm -rf src/routes/{chrome,edge,firefox,webkit} + $STD node_modules/playwright-core/cli.js install --with-deps chromium $STD npm run build $STD npm run build:function $STD npm prune production + mv /opt/browserless.env /opt/browserless/.env msg_ok "Updated Browserless" - msg_info "Starting services" + msg_info "Restarting services" systemctl start minio Reactive-Resume browserless - msg_ok "Started services" + msg_ok "Restarted services" msg_info "Cleaning Up" rm -f /tmp/minio.deb - rm -f /tmp/v${RELEASE}.zip - rm -f /tmp/v${TAG}.zip - rm -rf /tmp/${APP}-${RELEASE} - rm -rf /tmp/browserless-${TAG} + rm -f $brwsr_tmp + rm -f $res_tmp msg_ok "Cleanup Completed" echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh index f9a25eb..0aa6262 100644 --- a/install/reactive-resume-install.sh +++ b/install/reactive-resume-install.sh @@ -21,9 +21,7 @@ $STD apt-get install -y \ gnupg \ unzip \ postgresql-common \ - python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -msg_ok "Installed Dependencies" + msg_ok "Installed Dependencies" msg_info "Installing Additional Dependencies" mkdir -p /etc/apt/keyrings @@ -58,24 +56,25 @@ unzip -q v${RELEASE}.zip mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION} cd /opt/${APPLICATION} corepack enable -export PUPPETEER_SKIP_DOWNLOAD="true" -export NEXT_TELEMETRY_DISABLED=1 export CI="true" +export PUPPETEER_SKIP_DOWNLOAD="true" +export NODE_ENV="production" +export NEXT_TELEMETRY_DISABLED=1 $STD pnpm install --frozen-lockfile $STD pnpm run build +$STD pnpm install --prod --frozen-lockfile $STD pnpm run prisma:generate msg_ok "Installed ${APPLICATION}" msg_info "Installing Browserless (Patience)" cd /tmp -$STD python3 -m pip install playwright wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip unzip -q v${TAG}.zip mv browserless-${TAG} /opt/browserless cd /opt/browserless $STD npm install -$STD node_modules/playwright-core/cli.js install --with-deps chromium firefox webkit -$STD node_modules/playwright-core/cli.js install --force chrome msedge +rm -rf src/routes/{chrome,edge,firefox,webkit} +$STD node_modules/playwright-core/cli.js install --with-deps chromium $STD npm run build $STD npm run build:function $STD npm prune production From 57c0468070e3a4180be594d6493f8b434fb9833f Mon Sep 17 00:00:00 2001 From: vhsdream Date: Fri, 4 Apr 2025 01:46:57 -0400 Subject: [PATCH 0315/1614] Reactive-Resume: Browserless fix to only install Chromium; remove Python/playwright dep If we simply delete the unneeded browser dirs in `src/routes` then we don't need to install them. This will save compiling time and a lot of disk space. It's late for me so I haven't tested fully. --- ct/reactive-resume.sh | 41 ++++++++++++++---------------- install/reactive-resume-install.sh | 15 +++++------ 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/ct/reactive-resume.sh b/ct/reactive-resume.sh index 1091a1d..8ebcb84 100644 --- a/ct/reactive-resume.sh +++ b/ct/reactive-resume.sh @@ -37,15 +37,14 @@ function update_script() { msg_info "Updating $APP to v${RELEASE}" cp /opt/${APP}/.env /opt/rxresume.env - cd /tmp - wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" - unzip -q v${RELEASE}.zip - cp -r ${APP}-${RELEASE}/* /opt/${APP} + res_tmp=$(mktemp) + rm -rf /opt/${APP} + wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -O $res_tmp + unzip -q $res_tmp + mv ${APP}-${RELEASE}/ /opt/${APP} cd /opt/${APP} - corepack enable export PUPPETEER_SKIP_DOWNLOAD="true" export NEXT_TELEMETRY_DISABLED=1 - export CI="true" $STD pnpm install --frozen-lockfile $STD pnpm run build $STD pnpm run prisma:generate @@ -59,35 +58,33 @@ function update_script() { $STD dpkg -i minio.deb msg_ok "Updated Minio" - msg_info "Updating Playwright" - $STD python3 -m pip install playwright --upgrade - msg_ok "Updated Playwright" - msg_info "Updating Browserless (Patience)" systemctl stop browserless + cp /opt/browserless/.env /opt/browserless.env + rm -rf browserless + brwsr_tmp=$(mktemp) TAG=$(curl -s https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') - wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip - unzip -q v${TAG}.zip - cp -r browserless-${TAG}/* /opt/browserless + wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -O $brwsr_tmp + unzip -q $brwsr_tmp + mv browserless-${TAG}/ /opt/browserless cd /opt/browserless - $STD npm update - $STD node_modules/playwright-core/cli.js install --with-deps chromium firefox webkit - $STD node_modules/playwright-core/cli.js install --force chrome msedge + $STD npm install + rm -rf src/routes/{chrome,edge,firefox,webkit} + $STD node_modules/playwright-core/cli.js install --with-deps chromium $STD npm run build $STD npm run build:function $STD npm prune production + mv /opt/browserless.env /opt/browserless/.env msg_ok "Updated Browserless" - msg_info "Starting services" + msg_info "Restarting services" systemctl start minio Reactive-Resume browserless - msg_ok "Started services" + msg_ok "Restarted services" msg_info "Cleaning Up" rm -f /tmp/minio.deb - rm -f /tmp/v${RELEASE}.zip - rm -f /tmp/v${TAG}.zip - rm -rf /tmp/${APP}-${RELEASE} - rm -rf /tmp/browserless-${TAG} + rm -f $brwsr_tmp + rm -f $res_tmp msg_ok "Cleanup Completed" echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh index f9a25eb..5210cf4 100644 --- a/install/reactive-resume-install.sh +++ b/install/reactive-resume-install.sh @@ -20,9 +20,7 @@ $STD apt-get install -y \ mc \ gnupg \ unzip \ - postgresql-common \ - python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + postgresql-common msg_ok "Installed Dependencies" msg_info "Installing Additional Dependencies" @@ -58,24 +56,25 @@ unzip -q v${RELEASE}.zip mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION} cd /opt/${APPLICATION} corepack enable -export PUPPETEER_SKIP_DOWNLOAD="true" -export NEXT_TELEMETRY_DISABLED=1 export CI="true" +export PUPPETEER_SKIP_DOWNLOAD="true" +export NODE_ENV="production" +export NEXT_TELEMETRY_DISABLED=1 $STD pnpm install --frozen-lockfile $STD pnpm run build +$STD pnpm install --prod --frozen-lockfile $STD pnpm run prisma:generate msg_ok "Installed ${APPLICATION}" msg_info "Installing Browserless (Patience)" cd /tmp -$STD python3 -m pip install playwright wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip unzip -q v${TAG}.zip mv browserless-${TAG} /opt/browserless cd /opt/browserless $STD npm install -$STD node_modules/playwright-core/cli.js install --with-deps chromium firefox webkit -$STD node_modules/playwright-core/cli.js install --force chrome msedge +rm -rf src/routes/{chrome,edge,firefox,webkit} +$STD node_modules/playwright-core/cli.js install --with-deps chromium $STD npm run build $STD npm run build:function $STD npm prune production From d1fba475c4db3d88d65a09b39ac261671c4a0b4f Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Fri, 4 Apr 2025 12:35:38 +0000 Subject: [PATCH 0316/1614] Update versions.json --- frontend/public/json/versions.json | 80 +++++++++++++++--------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 3c04b35..6d6e5c7 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -2,12 +2,47 @@ { "name": "fhem/fhem-mirror", "version": "6.2", - "date": "2025-04-03T10:34:03Z" + "date": "2025-04-04T10:34:30Z" }, { "name": "dgtlmoon/changedetection.io", - "version": "0.49.10", - "date": "2025-04-03T09:17:54Z" + "version": "0.49.12", + "date": "2025-04-04T07:31:08Z" + }, + { + "name": "morpheus65535/bazarr", + "version": "v1.5.1", + "date": "2025-01-01T16:15:52Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1726", + "date": "2025-04-04T05:59:26Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" + }, + { + "name": "minio/minio", + "version": "RELEASE.2025-04-03T14-56-28Z", + "date": "2025-04-03T19:08:18Z" + }, + { + "name": "fallenbagel/jellyseerr", + "version": "v2.5.2", + "date": "2025-04-03T17:40:17Z" + }, + { + "name": "wazuh/wazuh", + "version": "v4.11.2", + "date": "2025-04-02T13:40:18Z" + }, + { + "name": "OctoPrint/OctoPrint", + "version": "1.10.3", + "date": "2024-11-05T09:20:50Z" }, { "name": "syncthing/syncthing", @@ -29,11 +64,6 @@ "version": "@jupyter-notebook/ui-components@7.4.0-rc.0", "date": "2025-04-03T06:49:38Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1722", - "date": "2025-04-03T05:51:10Z" - }, { "name": "mattermost/mattermost", "version": "server/public/v0.1.11", @@ -46,19 +76,14 @@ }, { "name": "ollama/ollama", - "version": "v0.6.3-rc1", - "date": "2025-03-26T20:39:01Z" + "version": "v0.6.4", + "date": "2025-04-02T22:14:24Z" }, { "name": "HabitRPG/habitica", "version": "v5.35.1", "date": "2025-04-02T21:49:00Z" }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, { "name": "redis/redis", "version": "8.0-rc1-int2", @@ -99,11 +124,6 @@ "version": "v1.4.6", "date": "2025-04-02T14:07:12Z" }, - { - "name": "wazuh/wazuh", - "version": "v4.11.2", - "date": "2025-04-02T13:40:18Z" - }, { "name": "zwave-js/zwave-js-ui", "version": "v10.1.4", @@ -124,11 +144,6 @@ "version": "v0.14.3", "date": "2025-04-01T19:53:18Z" }, - { - "name": "fallenbagel/jellyseerr", - "version": "preview-music-support", - "date": "2025-04-01T19:04:25Z" - }, { "name": "Koenkk/zigbee2mqtt", "version": "2.2.0", @@ -169,11 +184,6 @@ "version": "v11.8.6", "date": "2025-04-01T13:52:03Z" }, - { - "name": "OctoPrint/OctoPrint", - "version": "1.10.3", - "date": "2024-11-05T09:20:50Z" - }, { "name": "semaphoreui/semaphore", "version": "v2.13.7", @@ -429,11 +439,6 @@ "version": "0.202.1", "date": "2025-03-27T08:24:55Z" }, - { - "name": "morpheus65535/bazarr", - "version": "v1.5.1", - "date": "2025-01-01T16:15:52Z" - }, { "name": "openobserve/openobserve", "version": "v0.14.5-rc6", @@ -463,10 +468,5 @@ "name": "grafana/grafana", "version": "v11.6.0", "date": "2025-03-25T22:10:15Z" - }, - { - "name": "Stirling-Tools/Stirling-PDF", - "version": "v0.45.0", - "date": "2025-03-25T18:48:17Z" } ] From 794939d205e2362ad1f1cb18e982130d971632d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 16:16:15 +0000 Subject: [PATCH 0317/1614] Bump vite in /frontend in the npm_and_yarn group across 1 directory Bumps the npm_and_yarn group with 1 update in the /frontend directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). Updates `vite` from 6.2.4 to 6.2.5 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 6.2.5 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] --- frontend/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index b4bf3c3..1125ea9 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -9665,9 +9665,9 @@ "license": "MIT" }, "node_modules/vite": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.4.tgz", - "integrity": "sha512-veHMSew8CcRzhL5o8ONjy8gkfmFJAd5Ac16oxBUjlwgX3Gq2Wqr+qNC3TjPIpy7TPV/KporLga5GT9HqdrCizw==", + "version": "6.2.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.5.tgz", + "integrity": "sha512-j023J/hCAa4pRIUH6J9HemwYfjB5llR2Ps0CWeikOtdR8+pAURAk0DoJC5/mm9kd+UgdnIy7d6HE4EAvlYhPhA==", "dev": true, "license": "MIT", "dependencies": { From 341a285de10ec87620a98f0044df3182559b1a46 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Fri, 4 Apr 2025 01:46:57 -0400 Subject: [PATCH 0318/1614] Reactive-Resume: Browserless fix to only install Chromium; remove Python/playwright dep If we simply delete the unneeded browser dirs in `src/routes` then we don't need to install them. This will save compiling time and a lot of disk space. It's late for me so I haven't tested fully. --- ct/reactive-resume.sh | 39 +++++++++++++++--------------- install/reactive-resume-install.sh | 16 ++++++------ 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/ct/reactive-resume.sh b/ct/reactive-resume.sh index 1091a1d..300aa5e 100644 --- a/ct/reactive-resume.sh +++ b/ct/reactive-resume.sh @@ -37,10 +37,11 @@ function update_script() { msg_info "Updating $APP to v${RELEASE}" cp /opt/${APP}/.env /opt/rxresume.env - cd /tmp - wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" - unzip -q v${RELEASE}.zip - cp -r ${APP}-${RELEASE}/* /opt/${APP} + res_tmp=$(mktemp) + rm -rf /opt/${APP} + wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -O $res_tmp + unzip -q $res_tmp + mv ${APP}-${RELEASE}/ /opt/${APP} cd /opt/${APP} corepack enable export PUPPETEER_SKIP_DOWNLOAD="true" @@ -59,35 +60,33 @@ function update_script() { $STD dpkg -i minio.deb msg_ok "Updated Minio" - msg_info "Updating Playwright" - $STD python3 -m pip install playwright --upgrade - msg_ok "Updated Playwright" - msg_info "Updating Browserless (Patience)" systemctl stop browserless + cp /opt/browserless/.env /opt/browserless.env + rm -rf browserless + brwsr_tmp=$(mktemp) TAG=$(curl -s https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') - wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip - unzip -q v${TAG}.zip - cp -r browserless-${TAG}/* /opt/browserless + wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -O $brwsr_tmp + unzip -q $brwsr_tmp + mv browserless-${TAG}/ /opt/browserless cd /opt/browserless - $STD npm update - $STD node_modules/playwright-core/cli.js install --with-deps chromium firefox webkit - $STD node_modules/playwright-core/cli.js install --force chrome msedge + $STD npm install + rm -rf src/routes/{chrome,edge,firefox,webkit} + $STD node_modules/playwright-core/cli.js install --with-deps chromium $STD npm run build $STD npm run build:function $STD npm prune production + mv /opt/browserless.env /opt/browserless/.env msg_ok "Updated Browserless" - msg_info "Starting services" + msg_info "Restarting services" systemctl start minio Reactive-Resume browserless - msg_ok "Started services" + msg_ok "Restarted services" msg_info "Cleaning Up" rm -f /tmp/minio.deb - rm -f /tmp/v${RELEASE}.zip - rm -f /tmp/v${TAG}.zip - rm -rf /tmp/${APP}-${RELEASE} - rm -rf /tmp/browserless-${TAG} + rm -f $brwsr_tmp + rm -f $res_tmp msg_ok "Cleanup Completed" echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh index f9a25eb..e3bd1e4 100644 --- a/install/reactive-resume-install.sh +++ b/install/reactive-resume-install.sh @@ -20,9 +20,7 @@ $STD apt-get install -y \ mc \ gnupg \ unzip \ - postgresql-common \ - python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + postgresql-common msg_ok "Installed Dependencies" msg_info "Installing Additional Dependencies" @@ -58,24 +56,25 @@ unzip -q v${RELEASE}.zip mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION} cd /opt/${APPLICATION} corepack enable -export PUPPETEER_SKIP_DOWNLOAD="true" -export NEXT_TELEMETRY_DISABLED=1 export CI="true" +export PUPPETEER_SKIP_DOWNLOAD="true" +export NODE_ENV="production" +export NEXT_TELEMETRY_DISABLED=1 $STD pnpm install --frozen-lockfile $STD pnpm run build +$STD pnpm install --prod --frozen-lockfile $STD pnpm run prisma:generate msg_ok "Installed ${APPLICATION}" msg_info "Installing Browserless (Patience)" cd /tmp -$STD python3 -m pip install playwright wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip unzip -q v${TAG}.zip mv browserless-${TAG} /opt/browserless cd /opt/browserless $STD npm install -$STD node_modules/playwright-core/cli.js install --with-deps chromium firefox webkit -$STD node_modules/playwright-core/cli.js install --force chrome msedge +rm -rf src/routes/{chrome,edge,firefox,webkit} +$STD node_modules/playwright-core/cli.js install --with-deps chromium $STD npm run build $STD npm run build:function $STD npm prune production @@ -187,6 +186,7 @@ customize msg_info "Cleaning up" rm -f /tmp/v${RELEASE}.zip +rm -f /tmp/v${TAG}.zip rm -f /tmp/minio.deb $STD apt-get -y autoremove $STD apt-get -y autoclean From 32f4f97bf1ac18ad2d565fa66709563322db91ab Mon Sep 17 00:00:00 2001 From: vhsdream Date: Fri, 4 Apr 2025 14:16:03 -0400 Subject: [PATCH 0319/1614] add missing exports to Reactive-Resume update --- ct/reactive-resume.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/reactive-resume.sh b/ct/reactive-resume.sh index 8ebcb84..6dc6665 100644 --- a/ct/reactive-resume.sh +++ b/ct/reactive-resume.sh @@ -45,6 +45,8 @@ function update_script() { cd /opt/${APP} export PUPPETEER_SKIP_DOWNLOAD="true" export NEXT_TELEMETRY_DISABLED=1 + export CI="true" + export NODE_ENV="production" $STD pnpm install --frozen-lockfile $STD pnpm run build $STD pnpm run prisma:generate From 4111f1865ad6a39d985defe42eae44a1f47b02b8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 4 Apr 2025 22:23:09 +0000 Subject: [PATCH 0320/1614] Deleted files for issue: Meilisearch --- ct/meilisearch.sh | 95 -------------------- frontend/public/json/meilisearch.json | 43 --------- install/meilisearch-install.sh | 125 -------------------------- 3 files changed, 263 deletions(-) delete mode 100644 ct/meilisearch.sh delete mode 100644 frontend/public/json/meilisearch.json delete mode 100644 install/meilisearch-install.sh diff --git a/ct/meilisearch.sh b/ct/meilisearch.sh deleted file mode 100644 index a6cbf89..0000000 --- a/ct/meilisearch.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://www.meilisearch.com/ - -APP="Meilisearch" -var_tags="${var_tags:-full-text-search}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-4096}" -var_disk="${var_disk:-7}" -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 /opt/Meilisearch_version.txt ]]; then - msg_error "No Meilisearch Installation Found!" - exit - fi - UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Meilisearch Update" --radiolist --cancel-button Exit-Script "Spacebar = Select" 10 58 2 \ - "1" "Update Meilisearch" ON \ - "2" "Update Meilisearch-UI" OFF \ - 3>&1 1>&2 2>&3) - - if [ "$UPD" == "1" ]; then - msg_info "Stopping Meilisearch" - systemctl stop meilisearch - msg_ok "Stopped Meilisearch" - - msg_info "Updating Meilisearch" - tmp_file=$(mktemp) - RELEASE=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -o $tmp_file - $STD dpkg -i $tmp_file - echo "$RELEASE" >/opt/meilisearch_version.txt - msg_ok "Updated Meilisearch" - - msg_info "Starting Meilisearch" - systemctl start meilisearch - msg_ok "Started Meilisearch" - exit - fi - - if [ "$UPD" == "2" ]; then - if [[ ! -f /opt/Meilisearch-ui_version.txt ]]; then - msg_error "No Meilisearch-UI Installation Found!" - exit - fi - msg_info "Stopping Meilisearch-UI" - systemctl stop meilisearch-ui - msg_ok "Stopped Meilisearch-UI" - - msg_info "Updating Meilisearch-UI" - tmp_file=$(mktemp) - tmp_dir=$(mktemp -d) - RELEASE_UI=$(curl -s https://api.github.com/repos/riccox/meilisearch-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - cp /opt/meilisearch-ui/.env.local /tmp/.env.local.bak - rm -rf /opt/meilisearch-ui - mkdir -p /opt/meilisearch-ui - curl -fsSL "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -o $tmp_file - unzip -q "$tmp_file" -d "$tmp_dir" - mv "$tmp_dir"/*/* /opt/meilisearch-ui/ - cd /opt/meilisearch-ui - sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts - mv /tmp/.env.local.bak /opt/meilisearch-ui/.env.local - $STD pnpm install - echo "$RELEASE_UI" >/opt/meilisearch-ui_version.txt - msg_ok "Updated Meilisearch-UI" - - msg_info "Starting Meilisearch-UI" - systemctl start meilisearch-ui - msg_ok "Started Meilisearch-UI" - exit - fi -} - -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}meilisearch: http://${IP}:7700$ | meilisearch-ui: http://${IP}:24900${CL}" diff --git a/frontend/public/json/meilisearch.json b/frontend/public/json/meilisearch.json deleted file mode 100644 index 0d27d92..0000000 --- a/frontend/public/json/meilisearch.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "Meilisearch", - "slug": "meilisearch", - "categories": [ - 8 - ], - "date_created": "2025-04-03", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 7700, - "documentation": "https://www.meilisearch.com/docs", - "website": "https://www.meilisearch.com/", - "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/meilisearch.svg", - "description": "Meilisearch is a fast, open-source search engine designed for instant, full-text search with typo tolerance. It provides an API that allows developers to integrate powerful search features into applications. Meilisearch-UI is an optional web-based interface that provides a simple way to interact with Meilisearch, visualize indexed data, and test queries without needing to use the API directly.", - "install_methods": [ - { - "type": "default", - "script": "ct/meilisearch.sh", - "resources": { - "cpu": 2, - "ram": 4096, - "hdd": 7, - "os": "Debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "Meilisearch-UI can optionally be installed for a web-based search interface", - "type": "info" - }, - { - "text": "Meilisearch-UI has early development status and can caused performance issues", - "type": "warn" - } - ] -} diff --git a/install/meilisearch-install.sh b/install/meilisearch-install.sh deleted file mode 100644 index 258ff10..0000000 --- a/install/meilisearch-install.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://www.meilisearch.com/ - -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 \ - curl \ - sudo \ - gnupg \ - mc -msg_ok "Installed Dependencies" - -msg_info "Setup ${APPLICATION}" -tmp_file=$(mktemp) -RELEASE=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -o $tmp_file -$STD dpkg -i $tmp_file -curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml -o /etc/meilisearch.toml -MASTER_KEY=$(openssl rand -base64 12) -LOCAL_IP="$(hostname -I | awk '{print $1}')" -sed -i \ - -e 's|^env =.*|env = "production"|' \ - -e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \ - -e 's|^db_path =.*|db_path = "/var/lib/meilisearch/data"|' \ - -e 's|^dump_dir =.*|dump_dir = "/var/lib/meilisearch/dumps"|' \ - -e 's|^snapshot_dir =.*|snapshot_dir = "/var/lib/meilisearch/snapshots"|' \ - -e 's|^# no_analytics = true|no_analytics = true|' \ - -e 's|^http_addr =.*|http_addr = "0.0.0.0:7700"|' \ - /etc/meilisearch.toml -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -msg_ok "Setup ${APPLICATION}" - -read -r -p "Do you want add meilisearch-ui? [y/n]: " prompt -if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - msg_info "Setting up Node.js Repository" - mkdir -p /etc/apt/keyrings - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list - msg_ok "Set up Node.js Repository" - - msg_info "Installing Node.js" - $STD apt-get update - $STD apt-get install -y nodejs - $STD npm install -g pnpm - msg_ok "Installed Node.js" - - msg_info "Setup ${APPLICATION}-ui" - tmp_file=$(mktemp) - tmp_dir=$(mktemp -d) - mkdir -p /opt/meilisearch-ui - RELEASE_UI=$(curl -s https://api.github.com/repos/riccox/meilisearch-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - curl -fsSL "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -o $tmp_file - unzip -q "$tmp_file" -d "$tmp_dir" - mv "$tmp_dir"/*/* /opt/meilisearch-ui/ - cd /opt/meilisearch-ui - sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts - $STD pnpm install - cat < /opt/meilisearch-ui/.env.local -VITE_SINGLETON_MODE=true -VITE_SINGLETON_HOST=http://${LOCAL_IP}:7700 -VITE_SINGLETON_API_KEY=${MASTER_KEY} -EOF - echo "${RELEASE_UI}" >/opt/${APPLICATION}-ui_version.txt - msg_ok "Setup ${APPLICATION}-ui" -fi - -msg_info "Setting up Services" -cat </etc/systemd/system/meilisearch.service -[Unit] -Description=Meilisearch -After=network.target - -[Service] -ExecStart=/usr/bin/meilisearch --config-file-path /etc/meilisearch.toml -Restart=always - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now meilisearch - -if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then -cat < /etc/systemd/system/meilisearch-ui.service -[Unit] -Description=Meilisearch UI Service -After=network.target meilisearch.service -Requires=meilisearch.service - -[Service] -User=root -WorkingDirectory=/opt/meilisearch-ui -ExecStart=/usr/bin/pnpm start -Restart=always -RestartSec=5 -StandardOutput=syslog -StandardError=syslog -SyslogIdentifier=meilisearch-ui - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now meilisearch-ui -fi - -msg_ok "Set up Services" - - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" From 9b0eb9c08b5c3772ec4f5556ac60d216f6699093 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Sat, 5 Apr 2025 01:21:13 +0000 Subject: [PATCH 0321/1614] Update versions.json --- frontend/public/json/versions.json | 137 ++++++++++++++++------------- 1 file changed, 76 insertions(+), 61 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 6d6e5c7..f6bd006 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,8 +1,78 @@ [ + { + "name": "ollama/ollama", + "version": "v0.6.5-rc1", + "date": "2025-04-05T00:04:24Z" + }, + { + "name": "home-assistant/core", + "version": "2025.4.1", + "date": "2025-04-04T20:59:57Z" + }, { "name": "fhem/fhem-mirror", "version": "6.2", - "date": "2025-04-04T10:34:30Z" + "date": "2025-04-04T20:31:04Z" + }, + { + "name": "Koenkk/zigbee2mqtt", + "version": "2.2.1", + "date": "2025-04-04T20:15:48Z" + }, + { + "name": "YunoHost/yunohost", + "version": "debian/12.0.13", + "date": "2025-04-04T20:05:45Z" + }, + { + "name": "coder/code-server", + "version": "v4.98.2", + "date": "2025-03-15T02:11:28Z" + }, + { + "name": "homarr-labs/homarr", + "version": "v1.14.0", + "date": "2025-04-04T19:15:59Z" + }, + { + "name": "Athou/commafeed", + "version": "5.7.0", + "date": "2025-04-04T18:10:16Z" + }, + { + "name": "syncthing/syncthing", + "version": "v1.29.4", + "date": "2025-04-01T08:45:07Z" + }, + { + "name": "icereed/paperless-gpt", + "version": "v0.14.4", + "date": "2025-04-04T14:18:53Z" + }, + { + "name": "fallenbagel/jellyseerr", + "version": "preview-back-to-axios", + "date": "2025-04-04T13:26:23Z" + }, + { + "name": "nzbgetcom/nzbget", + "version": "v24.8", + "date": "2025-03-18T07:33:51Z" + }, + { + "name": "apache/tomcat", + "version": "9.0.104", + "date": "2025-04-04T12:58:11Z" + }, + { + "name": "Dolibarr/dolibarr", + "version": "21.0.1", + "date": "2025-04-04T12:56:35Z" + }, + { + "name": "sabnzbd/sabnzbd", + "version": "4.5.0", + "date": "2025-03-30T16:17:11Z" }, { "name": "dgtlmoon/changedetection.io", @@ -19,6 +89,11 @@ "version": "v0.22.1726", "date": "2025-04-04T05:59:26Z" }, + { + "name": "wazuh/wazuh", + "version": "coverity-w14-4.12.0", + "date": "2025-04-04T00:03:06Z" + }, { "name": "keycloak/keycloak", "version": "26.1.4", @@ -29,26 +104,11 @@ "version": "RELEASE.2025-04-03T14-56-28Z", "date": "2025-04-03T19:08:18Z" }, - { - "name": "fallenbagel/jellyseerr", - "version": "v2.5.2", - "date": "2025-04-03T17:40:17Z" - }, - { - "name": "wazuh/wazuh", - "version": "v4.11.2", - "date": "2025-04-02T13:40:18Z" - }, { "name": "OctoPrint/OctoPrint", "version": "1.10.3", "date": "2024-11-05T09:20:50Z" }, - { - "name": "syncthing/syncthing", - "version": "v1.29.4", - "date": "2025-04-01T08:45:07Z" - }, { "name": "firefly-iii/firefly-iii", "version": "v6.2.10", @@ -74,11 +134,6 @@ "version": "v4.0.8", "date": "2025-04-03T05:11:15Z" }, - { - "name": "ollama/ollama", - "version": "v0.6.4", - "date": "2025-04-02T22:14:24Z" - }, { "name": "HabitRPG/habitica", "version": "v5.35.1", @@ -94,11 +149,6 @@ "version": "v2.63.9", "date": "2025-03-31T12:47:21Z" }, - { - "name": "home-assistant/core", - "version": "2025.4.0", - "date": "2025-04-02T17:01:41Z" - }, { "name": "BookStackApp/BookStack", "version": "v25.02.2", @@ -139,21 +189,6 @@ "version": "v1.131.3", "date": "2025-04-01T22:48:22Z" }, - { - "name": "icereed/paperless-gpt", - "version": "v0.14.3", - "date": "2025-04-01T19:53:18Z" - }, - { - "name": "Koenkk/zigbee2mqtt", - "version": "2.2.0", - "date": "2025-04-01T18:50:44Z" - }, - { - "name": "apache/tomcat", - "version": "9.0.103", - "date": "2025-04-01T18:39:51Z" - }, { "name": "MagicMirrorOrg/MagicMirror", "version": "v2.31.0", @@ -269,11 +304,6 @@ "version": "v6.0.6", "date": "2025-03-30T16:59:06Z" }, - { - "name": "sabnzbd/sabnzbd", - "version": "4.5.0", - "date": "2025-03-30T16:17:11Z" - }, { "name": "Part-DB/Part-DB-server", "version": "v1.17.0", @@ -344,11 +374,6 @@ "version": "2025.3.28", "date": "2025-03-29T00:18:56Z" }, - { - "name": "homarr-labs/homarr", - "version": "v1.13.1", - "date": "2025-03-28T21:58:30Z" - }, { "name": "TasmoAdmin/TasmoAdmin", "version": "v4.2.3", @@ -394,11 +419,6 @@ "version": "336.2", "date": "2025-03-28T10:16:47Z" }, - { - "name": "YunoHost/yunohost", - "version": "debian/12.0.12", - "date": "2025-03-16T11:59:24Z" - }, { "name": "gethomepage/homepage", "version": "v1.1.1", @@ -463,10 +483,5 @@ "name": "sct/overseerr", "version": "v1.34.0", "date": "2025-03-26T08:48:34Z" - }, - { - "name": "grafana/grafana", - "version": "v11.6.0", - "date": "2025-03-25T22:10:15Z" } ] From 7fd7f602184c7dd6de25420ec062ef9840d24327 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 5 Apr 2025 06:49:04 +0000 Subject: [PATCH 0322/1614] Update .app files --- ct/headers/meilisearch | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/meilisearch diff --git a/ct/headers/meilisearch b/ct/headers/meilisearch deleted file mode 100644 index 955aaae..0000000 --- a/ct/headers/meilisearch +++ /dev/null @@ -1,6 +0,0 @@ - __ ___ _ ___ __ - / |/ /__ (_) (_)_______ ____ ___________/ /_ - / /|_/ / _ \/ / / / ___/ _ \/ __ `/ ___/ ___/ __ \ - / / / / __/ / / (__ ) __/ /_/ / / / /__/ / / / -/_/ /_/\___/_/_/_/____/\___/\__,_/_/ \___/_/ /_/ - From 19c6317fe1b80ed042ad5e78da1d21b03abdef27 Mon Sep 17 00:00:00 2001 From: Don Locke Date: Sat, 5 Apr 2025 17:34:26 -0600 Subject: [PATCH 0323/1614] Switch to VM --- ct/allstarlink.sh | 44 --- frontend/public/json/allstarlink.json | 20 +- install/allstarlink-install.sh | 62 ---- vm/allstarlink-vm.sh | 509 ++++++++++++++++++++++++++ vm/update/allstarlink.sh | 20 + 5 files changed, 539 insertions(+), 116 deletions(-) delete mode 100644 ct/allstarlink.sh delete mode 100644 install/allstarlink-install.sh create mode 100644 vm/allstarlink-vm.sh create mode 100644 vm/update/allstarlink.sh diff --git a/ct/allstarlink.sh b/ct/allstarlink.sh deleted file mode 100644 index b331818..0000000 --- a/ct/allstarlink.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: Don Locke (DonLocke) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/AllStarLink - -APP="AllStarLink" -var_tags="radio" -var_cpu="1" -var_ram="512" -var_disk="8" -var_os="debian" -var_version="12" -var_unprivileged="1" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /etc/asterisk ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_info "Updating $APP LXC" - $STD apt-get update - $STD DEBIAN_FRONTEND=noninteractive apt-get -y upgrade - msg_ok "Updated $APP LXC" - 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}/allmon3${CL}" diff --git a/frontend/public/json/allstarlink.json b/frontend/public/json/allstarlink.json index 515c463..b16e02c 100644 --- a/frontend/public/json/allstarlink.json +++ b/frontend/public/json/allstarlink.json @@ -1,14 +1,14 @@ { "name": "AllStarLink", - "slug": "allstarlink", + "slug": "allstarlink-vm", "categories": [ 24 ], "date_created": "2025-3-30", - "type": "ct", + "type": "vm", "updateable": true, "privileged": false, - "interface_port": 80, + "interface_port": null, "documentation": "https://allstarlink.github.io/", "website": "https://www.allstarlink.org/", "logo": "https://raw.githubusercontent.com/AllStarLink/ASL3-Manual/blob/main/docs/assets/allstar-logo-small.png", @@ -16,10 +16,10 @@ "install_methods": [ { "type": "default", - "script": "ct/allstarlink.sh", + "script": "vm/allstarlink-vm.sh", "resources": { - "cpu": 1, - "ram": 512, + "cpu": 2, + "ram": 2048, "hdd": 8, "os": "debian", "version": "12" @@ -31,9 +31,9 @@ "password": null }, "notes": [ - { - "text": "Options to Install Allmon3", - "type": "info" - } + { + "text": "Options to Install Allmon3", + "type": "info" + } ] } diff --git a/install/allstarlink-install.sh b/install/allstarlink-install.sh deleted file mode 100644 index 1393033..0000000 --- a/install/allstarlink-install.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: Don Locke (DonLocke) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/AllStarLink - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Adding ASL Package Repository" -curl -fsSL "https://repo.allstarlink.org/public/asl-apt-repos.deb12_all.deb" -o /tmp/asl-apt-repos.deb12_all.deb -$STD dpkg -i /tmp/asl-apt-repos.deb12_all.deb -$STD apt-get update -msg_ok "Added ASL Package Repository" - -msg_info "Installing AllStarLink" -$STD apt-get install -y asl3 -msg_ok "Installed AllStarLink" - -msg_info "Configuring AllStarLink" -sed -i "/secret /s/= .*/= $(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)/" /etc/asterisk/manager.conf -msg_ok "Configured AllStarLink" - -read -r -p "Would you like to set up AllStarLink Node now? " prompt -if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - node-setup -else - msg_warn "You will need to run \`node-setup\` before you can connect to the AllStarLink Network." -fi - -read -r -p "Would you like to add Allmon3? " prompt -if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - msg_info "Installing Allmon3" - $STD apt-get install -y allmon3 - msg_ok "Installed Allmon3" - - NODE=$(grep -oP '^\[\d+\]\(node-main\)' /etc/asterisk/rpt.conf | grep -oP '\d+') - if [[ -n $NODE ]]; then - msg_info "Configuring Allmon3" - sed -i "s/;\[1999\]/\[$NODE\]/" /etc/allmon3/allmon3.ini - sed -i "s/;host/host/" /etc/allmon3/allmon3.ini - sed -i "s/;user/user/" /etc/allmon3/allmon3.ini - sed -i "s/;pass=.*/pass=$(sed -ne 's/^secret = //p' /etc/asterisk/manager.conf)/" /etc/allmon3/allmon3.ini - systemctl restart allmon3 - msg_ok "Configured Allmon3" - fi -fi - -motd_ssh -customize - -msg_info "Cleaning up" -rm -f /tmp/asl-apt-repos.deb12_all.deb -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" diff --git a/vm/allstarlink-vm.sh b/vm/allstarlink-vm.sh new file mode 100644 index 0000000..9d7675e --- /dev/null +++ b/vm/allstarlink-vm.sh @@ -0,0 +1,509 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Don Locke (DonLocke) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/AllStarLink + +source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + +function header_info { + clear + cat <<"EOF" + ___ ____ ____ __ __ _ __ _ ____ ___ + / | / / / ___// /_____ ______/ / (_)___ / /__ | | / / |/ / + / /| | / / /\__ \/ __/ __ `/ ___/ / / / __ \/ //_/ | | / / /|_/ / + / ___ |/ / /___/ / /_/ /_/ / / / /___/ / / / / ,< | |/ / / / / +/_/ |_/_/_/_____/\__/\__,_/_/ /_____/_/_/ /_/_/|_| |___/_/ /_/ + +EOF +} +header_info +echo -e "\n Loading..." +GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') +NEXTID=$(pvesh get /cluster/nextid) +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="debian12vm" +var_os="debian" +var_version="12" +DISK_SIZE="8G" + +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +THIN="discard=on,ssd=1," +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + post_update_to_api "failed" "${command}" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" + cleanup_vmid +} + +function cleanup_vmid() { + if qm status $VMID &>/dev/null; then + qm stop $VMID &>/dev/null + qm destroy $VMID &>/dev/null + fi +} + +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if whiptail --backtitle "Proxmox VE Helper Scripts" --title "AllStarLink VM" --yesno "This will create a New AllStarLink VM. Proceed?" 10 58; then + : +else + header_info && echo -e "⚠ User exited script \n" && exit +fi + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function check_root() { + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi +} + +function pve_check() { + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + if [ "$(dpkg --print-architecture)" != "arm64" ]; then + msg_error "This script will not work with your CPU Architekture \n" + echo -e "Exiting..." + sleep 2 + exit + fi + fi +} + +function ssh_check() { + if command -v pveversion >/dev/null 2>&1; then + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi + fi + fi +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function default_settings() { + VMID="$NEXTID" + FORMAT=",efitype=4m" + MACHINE="" + DISK_CACHE="" + HN="allstarlink" + CPU_TYPE="" + CORE_COUNT="2" + RAM_SIZE="2048" + BRG="vmbr0" + MAC="$GEN_MAC" + VLAN="" + MTU="" + START_VM="yes" + METHOD="default" + echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" + echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" + echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}${MAC}${CL}" + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + echo -e "${BL}Creating a AllStarLink VM using the above default settings${CL}" +} + +function advanced_settings() { + METHOD="advanced" + while true; do + if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z "$VMID" ]; then + VMID="$NEXTID" + fi + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + exit-script + fi + done + + if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "i440fx" "Machine i440fx" ON \ + "q35" "Machine q35" OFF \ + 3>&1 1>&2 2>&3); then + if [ $MACH = q35 ]; then + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT="" + MACHINE=" -machine q35" + else + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" + fi + else + exit-script + fi + + if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "None (Default)" ON \ + "1" "Write Through" OFF \ + 3>&1 1>&2 2>&3); then + if [ $DISK_CACHE = "1" ]; then + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" + DISK_CACHE="cache=writethrough," + else + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + DISK_CACHE="" + fi + else + exit-script + fi + + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 allstarlink --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VM_NAME ]; then + HN="allstarlink" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + else + exit-script + fi + + if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "KVM64 (Default)" ON \ + "1" "Host" OFF \ + 3>&1 1>&2 2>&3); then + if [ $CPU_TYPE1 = "1" ]; then + echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" + CPU_TYPE=" -cpu host" + else + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + CPU_TYPE="" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 2048 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $RAM_SIZE ]; then + RAM_SIZE="4096" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" + else + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + else + exit-script + fi + + if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + else + exit-script + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + else + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a AllStarLink VM?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a AllStarLink VM using the above advanced settings${CL}" + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function start_script() { + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +check_root +arch_check +pve_check +ssh_check +start_script +post_to_api_vm + +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + msg_error "Unable to detect a valid storage location." + exit +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Retrieving the URL for the Debian 12 Qcow2 Disk Image" +URL="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-nocloud-$(dpkg --print-architecture).qcow2" +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +curl -fsSL -o "$(basename "$URL")" "$URL" +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}${FILE}${CL}" + +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in +nfs | dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + THIN="" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + FORMAT=",efitype=4m" + THIN="" + ;; +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done + +#TODO Custom stuff + +msg_info "Installing Pre-Requisite libguestfs-tools onto Host" +apt-get -qq update && apt-get -qq install libguestfs-tools lsb-release -y >/dev/null +msg_ok "Installed libguestfs-tools successfully" + +msg_info "Adding ASL Package Repository" +virt-customize -q -a "${FILE}" \ + --run-command "curl -fsSL https://repo.allstarlink.org/public/asl-apt-repos.deb12_all.deb -o /tmp/asl-apt-repos.deb12_all.deb" \ + --run-command "dpkg -i /tmp/asl-apt-repos.deb12_all.deb" \ + --update \ + --run-command "rm -f /tmp/asl-apt-repos.deb12_all.deb" >/dev/null +msg_ok "Added ASL Package Repository" + +msg_info "Installing AllStarLink" +virt-customize -q -a "${FILE}" \ + --install asl3 \ + --run-command "sed -i \"/secret /s/= .*/= $(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)/\" /etc/asterisk/manager.conf" \ + --firstboot-command "node-setup" >/dev/null +msg_ok "Installed AllStarLink" + +if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Would you like to add Allmon3?" --no-button Advanced 10 58); then + msg_info "Installing Allmon3" + virt-customize -q -a "${FILE}" \ + --install allmon3 \ + --firstboot-command "sed -i \"s/;\[1999\]/\[$(grep -oP '^\[\d+\]\(node-main\)' /etc/asterisk/rpt.conf | grep -oP '\d+')\]/\" /etc/allmon3/allmon3.ini" \ + --firstboot-command "sed -i \"s/;host/host/\" /etc/allmon3/allmon3.ini" \ + --firstboot-command "sed -i \"s/;user/user/\" /etc/allmon3/allmon3.ini" \ + --firstboot-command "sed -i \"s/;pass=.*/pass=$(sed -ne 's/^secret = //p' /etc/asterisk/manager.conf)/\" /etc/allmon3/allmon3.ini" \ + --firstboot-command "systemctl restart allmon3" >/dev/null + msg_ok "Installed Allmon3" +fi + +virt-customize -q -a "${FILE}" \ + --touch /usr/bin/update \ + --write "bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/vm/update/allstarlink.sh)\"":/usr/bin/update \ + --chmod 755:/usr/bin/update + +msg_info "Creating a AllStarLink VM" +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ + -name $HN -tags community-script,debian12,allstarlink -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF}${FORMAT} \ + -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \ + -boot order=scsi0 \ + -serial0 socket >/dev/null +qm resize $VMID scsi0 8G >/dev/null +qm set $VMID --agent enabled=1 >/dev/null + +DESCRIPTION=$( + cat < + + Logo + + +

AllStarLink VM

+ +

+ + spend Coffee + +

+ + + + GitHub + + + + Discussions + + + + Issues + + +EOF +) +qm set "$VMID" -description "$DESCRIPTION" >/dev/null + +msg_ok "Created a AllStarLink VM ${CL}${BL}(${HN})" +if [ "$START_VM" == "yes" ]; then + msg_info "Starting AllStarLink VM" + qm start $VMID + msg_ok "Started AllStarLink VM" +fi +post_update_to_api "done" "none" +msg_ok "Completed Successfully!\n" diff --git a/vm/update/allstarlink.sh b/vm/update/allstarlink.sh new file mode 100644 index 0000000..dd369a4 --- /dev/null +++ b/vm/update/allstarlink.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Don Locke (DonLocke) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/AllStarLink + +APP="AllStarLink" + +header_info + +if [[ ! -d /etc/asterisk ]]; then +msg_error "No ${APP} Installation Found!" +exit +fi +msg_info "Updating $APP VM" +$STD apt-get update +$STD DEBIAN_FRONTEND=noninteractive apt-get -y upgrade +msg_ok "Updated $APP VM" +exit From 4d3ff9a02574bb2bea3da10aa06729b333f3ca3c Mon Sep 17 00:00:00 2001 From: Don Locke Date: Sat, 5 Apr 2025 18:24:35 -0600 Subject: [PATCH 0324/1614] Update Script --- vm/allstarlink-vm.sh | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/vm/allstarlink-vm.sh b/vm/allstarlink-vm.sh index 9d7675e..b74cf05 100644 --- a/vm/allstarlink-vm.sh +++ b/vm/allstarlink-vm.sh @@ -416,8 +416,6 @@ for i in {0,1}; do eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} done -#TODO Custom stuff - msg_info "Installing Pre-Requisite libguestfs-tools onto Host" apt-get -qq update && apt-get -qq install libguestfs-tools lsb-release -y >/dev/null msg_ok "Installed libguestfs-tools successfully" @@ -430,29 +428,26 @@ virt-customize -q -a "${FILE}" \ --run-command "rm -f /tmp/asl-apt-repos.deb12_all.deb" >/dev/null msg_ok "Added ASL Package Repository" -msg_info "Installing AllStarLink" +msg_info "Installing AllStarLink (patience)" virt-customize -q -a "${FILE}" \ --install asl3 \ - --run-command "sed -i \"/secret /s/= .*/= $(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)/\" /etc/asterisk/manager.conf" \ - --firstboot-command "node-setup" >/dev/null + --run-command "sed -i \"/secret /s/= .*/= $(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)/\" /etc/asterisk/manager.conf" >/dev/null msg_ok "Installed AllStarLink" -if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Would you like to add Allmon3?" --no-button Advanced 10 58); then +if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Would you like to add Allmon3?" 10 58); then msg_info "Installing Allmon3" virt-customize -q -a "${FILE}" \ --install allmon3 \ - --firstboot-command "sed -i \"s/;\[1999\]/\[$(grep -oP '^\[\d+\]\(node-main\)' /etc/asterisk/rpt.conf | grep -oP '\d+')\]/\" /etc/allmon3/allmon3.ini" \ - --firstboot-command "sed -i \"s/;host/host/\" /etc/allmon3/allmon3.ini" \ - --firstboot-command "sed -i \"s/;user/user/\" /etc/allmon3/allmon3.ini" \ - --firstboot-command "sed -i \"s/;pass=.*/pass=$(sed -ne 's/^secret = //p' /etc/asterisk/manager.conf)/\" /etc/allmon3/allmon3.ini" \ - --firstboot-command "systemctl restart allmon3" >/dev/null + --run-command "sed -i \"s/;pass=.*/;pass=\$(sed -ne 's/^secret = //p' /etc/asterisk/manager.conf)/\" /etc/allmon3/allmon3.ini" >/dev/null msg_ok "Installed Allmon3" fi +msg_info "Installing Update Script" virt-customize -q -a "${FILE}" \ --touch /usr/bin/update \ - --write "bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/vm/update/allstarlink.sh)\"":/usr/bin/update \ - --chmod 755:/usr/bin/update + --write /usr/bin/update:"bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/vm/update/allstarlink.sh)\"" \ + --chmod 755:/usr/bin/update >/dev/null +msg_ok "Installed Update Script" msg_info "Creating a AllStarLink VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ From 17a602dc54358adc70bdd33c3e52506897f4e1ff Mon Sep 17 00:00:00 2001 From: Don Locke Date: Sat, 5 Apr 2025 18:32:16 -0600 Subject: [PATCH 0325/1614] Remove Update script --- frontend/public/json/allstarlink.json | 2 +- vm/allstarlink-vm.sh | 7 ------- vm/update/allstarlink.sh | 20 -------------------- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 vm/update/allstarlink.sh diff --git a/frontend/public/json/allstarlink.json b/frontend/public/json/allstarlink.json index b16e02c..c5d336e 100644 --- a/frontend/public/json/allstarlink.json +++ b/frontend/public/json/allstarlink.json @@ -6,7 +6,7 @@ ], "date_created": "2025-3-30", "type": "vm", - "updateable": true, + "updateable": false, "privileged": false, "interface_port": null, "documentation": "https://allstarlink.github.io/", diff --git a/vm/allstarlink-vm.sh b/vm/allstarlink-vm.sh index b74cf05..99d037e 100644 --- a/vm/allstarlink-vm.sh +++ b/vm/allstarlink-vm.sh @@ -442,13 +442,6 @@ if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno msg_ok "Installed Allmon3" fi -msg_info "Installing Update Script" -virt-customize -q -a "${FILE}" \ - --touch /usr/bin/update \ - --write /usr/bin/update:"bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/vm/update/allstarlink.sh)\"" \ - --chmod 755:/usr/bin/update >/dev/null -msg_ok "Installed Update Script" - msg_info "Creating a AllStarLink VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ -name $HN -tags community-script,debian12,allstarlink -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci diff --git a/vm/update/allstarlink.sh b/vm/update/allstarlink.sh deleted file mode 100644 index dd369a4..0000000 --- a/vm/update/allstarlink.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: Don Locke (DonLocke) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/AllStarLink - -APP="AllStarLink" - -header_info - -if [[ ! -d /etc/asterisk ]]; then -msg_error "No ${APP} Installation Found!" -exit -fi -msg_info "Updating $APP VM" -$STD apt-get update -$STD DEBIAN_FRONTEND=noninteractive apt-get -y upgrade -msg_ok "Updated $APP VM" -exit From 17b6f21a45905d6ad9a648e7bf667c6b336e9b07 Mon Sep 17 00:00:00 2001 From: Don Locke Date: Sat, 5 Apr 2025 18:34:25 -0600 Subject: [PATCH 0326/1614] Update tag --- vm/allstarlink-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/allstarlink-vm.sh b/vm/allstarlink-vm.sh index 99d037e..a0cbaf9 100644 --- a/vm/allstarlink-vm.sh +++ b/vm/allstarlink-vm.sh @@ -444,7 +444,7 @@ fi msg_info "Creating a AllStarLink VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ - -name $HN -tags community-script,debian12,allstarlink -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci + -name $HN -tags community-script,debian12,radio -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ From ff4d4a3d6773fbd9fd5cfc79fe1755c30e290baa Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Sun, 6 Apr 2025 12:32:00 +0000 Subject: [PATCH 0327/1614] Update versions.json --- frontend/public/json/versions.json | 219 ++++++++++++++--------------- 1 file changed, 102 insertions(+), 117 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index f6bd006..1b3c455 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,19 +1,114 @@ [ + { + "name": "semaphoreui/semaphore", + "version": "v2.13.8-beta2", + "date": "2025-04-06T06:36:42Z" + }, + { + "name": "karakeep-app/karakeep", + "version": "ios/v1.6.9-1", + "date": "2025-04-06T10:51:57Z" + }, + { + "name": "fallenbagel/jellyseerr", + "version": "preview-back-to-axios", + "date": "2025-04-06T10:39:06Z" + }, + { + "name": "TriliumNext/Notes", + "version": "v0.92.6", + "date": "2025-04-06T10:38:54Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-06T10:31:42Z" + }, + { + "name": "kimai/kimai", + "version": "2.32.0", + "date": "2025-04-06T09:43:51Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1733", + "date": "2025-04-06T06:00:36Z" + }, + { + "name": "inventree/InvenTree", + "version": "0.17.10", + "date": "2025-04-06T05:31:49Z" + }, + { + "name": "firefly-iii/firefly-iii", + "version": "v6.2.10", + "date": "2025-03-22T13:02:26Z" + }, { "name": "ollama/ollama", - "version": "v0.6.5-rc1", - "date": "2025-04-05T00:04:24Z" + "version": "v0.6.5-rc0", + "date": "2025-04-03T23:57:36Z" + }, + { + "name": "jellyfin/jellyfin", + "version": "v10.10.7", + "date": "2025-04-05T19:14:59Z" + }, + { + "name": "azukaar/Cosmos-Server", + "version": "v0.18.4", + "date": "2025-04-05T19:12:57Z" + }, + { + "name": "wger-project/wger", + "version": "2.3", + "date": "2025-04-05T18:05:36Z" + }, + { + "name": "Paymenter/Paymenter", + "version": "v1.0.2", + "date": "2025-04-05T17:40:25Z" + }, + { + "name": "open-webui/open-webui", + "version": "v0.6.1", + "date": "2025-04-05T17:15:47Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" + }, + { + "name": "stonith404/pingvin-share", + "version": "v1.11.0", + "date": "2025-04-05T14:56:47Z" + }, + { + "name": "bastienwirtz/homer", + "version": "v25.04.1", + "date": "2025-04-05T12:39:18Z" + }, + { + "name": "navidrome/navidrome", + "version": "v0.55.2", + "date": "2025-04-05T12:07:32Z" + }, + { + "name": "Kozea/Radicale", + "version": "v3.5.1", + "date": "2025-04-05T06:20:18Z" + }, + { + "name": "actualbudget/actual", + "version": "v25.4.0", + "date": "2025-04-05T04:14:57Z" }, { "name": "home-assistant/core", "version": "2025.4.1", "date": "2025-04-04T20:59:57Z" }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-04T20:31:04Z" - }, { "name": "Koenkk/zigbee2mqtt", "version": "2.2.1", @@ -49,11 +144,6 @@ "version": "v0.14.4", "date": "2025-04-04T14:18:53Z" }, - { - "name": "fallenbagel/jellyseerr", - "version": "preview-back-to-axios", - "date": "2025-04-04T13:26:23Z" - }, { "name": "nzbgetcom/nzbget", "version": "v24.8", @@ -84,21 +174,11 @@ "version": "v1.5.1", "date": "2025-01-01T16:15:52Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1726", - "date": "2025-04-04T05:59:26Z" - }, { "name": "wazuh/wazuh", "version": "coverity-w14-4.12.0", "date": "2025-04-04T00:03:06Z" }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, { "name": "minio/minio", "version": "RELEASE.2025-04-03T14-56-28Z", @@ -109,11 +189,6 @@ "version": "1.10.3", "date": "2024-11-05T09:20:50Z" }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.10", - "date": "2025-03-22T13:02:26Z" - }, { "name": "Graylog2/graylog2-server", "version": "6.0.14", @@ -219,11 +294,6 @@ "version": "v11.8.6", "date": "2025-04-01T13:52:03Z" }, - { - "name": "semaphoreui/semaphore", - "version": "v2.13.7", - "date": "2025-04-01T09:41:55Z" - }, { "name": "neo4j/neo4j", "version": "5.26.5", @@ -234,11 +304,6 @@ "version": "v4.0.2", "date": "2025-04-01T04:51:05Z" }, - { - "name": "open-webui/open-webui", - "version": "v0.6.0", - "date": "2025-04-01T01:47:32Z" - }, { "name": "outline/outline", "version": "v0.82.1-18", @@ -284,11 +349,6 @@ "version": "4.8.11.0", "date": "2025-03-10T06:39:11Z" }, - { - "name": "TriliumNext/Notes", - "version": "v0.92.5", - "date": "2025-03-30T12:32:43Z" - }, { "name": "StarFleetCPTN/GoMFT", "version": "v0.2.4", @@ -408,80 +468,5 @@ "name": "goauthentik/authentik", "version": "version/2025.2.3", "date": "2025-03-28T14:28:34Z" - }, - { - "name": "hakimel/reveal.js", - "version": "5.2.1", - "date": "2025-03-28T13:00:23Z" - }, - { - "name": "cockpit-project/cockpit", - "version": "336.2", - "date": "2025-03-28T10:16:47Z" - }, - { - "name": "gethomepage/homepage", - "version": "v1.1.1", - "date": "2025-03-28T04:12:31Z" - }, - { - "name": "Bubka/2FAuth", - "version": "v5.5.0", - "date": "2025-03-27T22:35:02Z" - }, - { - "name": "ellite/Wallos", - "version": "v2.48.1", - "date": "2025-03-27T22:02:16Z" - }, - { - "name": "hivemq/hivemq-community-edition", - "version": "2025.2", - "date": "2025-03-27T19:21:13Z" - }, - { - "name": "TandoorRecipes/recipes", - "version": "1.5.34", - "date": "2025-03-27T16:17:38Z" - }, - { - "name": "tailscale/tailscale", - "version": "v1.82.0", - "date": "2025-03-27T13:08:18Z" - }, - { - "name": "zabbix/zabbix", - "version": "7.2.5", - "date": "2025-03-27T11:06:48Z" - }, - { - "name": "evcc-io/evcc", - "version": "0.202.1", - "date": "2025-03-27T08:24:55Z" - }, - { - "name": "openobserve/openobserve", - "version": "v0.14.5-rc6", - "date": "2025-03-27T05:15:49Z" - }, - { - "name": "duplicati/duplicati", - "version": "v2.1.0.112-2.1.0.112_canary_2025-03-26", - "date": "2025-03-26T21:04:38Z" - }, - { - "name": "prometheus/prometheus", - "version": "v0.303.0-rc.0", - "date": "2025-03-26T12:48:46Z" - }, - { - "name": "forgejo/forgejo", - "version": "v12.0.0-dev", - "date": "2025-03-26T09:58:55Z" - }, - { - "name": "sct/overseerr", - "version": "v1.34.0", - "date": "2025-03-26T08:48:34Z" } ] From 39362c76c3c842affa3dbeca2fe8180f2b7a5707 Mon Sep 17 00:00:00 2001 From: Desert Gamer <44316028+DesertGamer@users.noreply.github.com> Date: Sun, 6 Apr 2025 16:35:04 +0300 Subject: [PATCH 0328/1614] fix(script): resolve parameter verification errors - Add new update_all_tags() function to properly handle container/VM lists - Fix missing vmid parameter error that was causing "type check ('integer') failed" - Replace direct update_tags calls with update_all_tags calls in check() function - Ensure proper iteration over all containers and VMs during tag updates - Simplify conditional logic for force updates --- scripts/tools/add-iptag.sh | 47 +++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/scripts/tools/add-iptag.sh b/scripts/tools/add-iptag.sh index c9f7ae8..ac39e55 100644 --- a/scripts/tools/add-iptag.sh +++ b/scripts/tools/add-iptag.sh @@ -119,6 +119,11 @@ update_installation() { msg_info "Updating IP-Tag Scripts" systemctl stop iptag.service &>/dev/null + # Create directory if it doesn't exist + if [[ ! -d "/opt/iptag" ]]; then + mkdir -p /opt/iptag + fi + # Migrate config if needed migrate_config @@ -287,6 +292,22 @@ check_status_changed() { return 0 } +# Update tags for all containers/VMs of specified type +update_all_tags() { + local type="$1" + local vmid_list="" + + if [[ "$type" == "lxc" ]]; then + vmid_list=$(pct list 2>/dev/null | grep -v VMID | awk '{print $1}') + else + vmid_list=$(qm list 2>/dev/null | grep -v VMID | awk '{print $1}') + fi + + for vmid in $vmid_list; do + update_tags "$type" "$vmid" + done +} + check() { current_time=$(date +%s) @@ -297,7 +318,7 @@ check() { echo "Checking lxc status..." last_lxc_status_check_time=${current_time} if check_status_changed "lxc"; then - update_tags "lxc" "${vmid}" + update_all_tags "lxc" last_update_lxc_time=${current_time} fi fi @@ -309,7 +330,7 @@ check() { echo "Checking vm status..." last_vm_status_check_time=${current_time} if check_status_changed "vm"; then - update_tags "vm" "${vmid}" + update_all_tags "vm" last_update_vm_time=${current_time} fi fi @@ -321,8 +342,8 @@ check() { echo "Checking fw net interface..." last_fw_net_interface_check_time=${current_time} if check_status_changed "fw"; then - update_tags "lxc" "${vmid}" - update_tags "vm" "${vmid}" + update_all_tags "lxc" + update_all_tags "vm" last_update_lxc_time=${current_time} last_update_vm_time=${current_time} fi @@ -334,10 +355,7 @@ check() { local time_since_last_update=$((current_time - ${!last_update_var})) if [ ${time_since_last_update} -ge ${FORCE_UPDATE_INTERVAL} ]; then echo "Force updating ${type} iptags..." - case "$type" in - "lxc") update_tags "lxc" "${vmid}" ;; - "vm") update_tags "vm" "${vmid}" ;; - esac + update_all_tags "$type" eval "${last_update_var}=${current_time}" fi done @@ -614,7 +632,7 @@ check() { echo "Checking lxc status..." last_lxc_status_check_time=${current_time} if check_status_changed "lxc"; then - update_tags "lxc" "${vmid}" + update_all_tags "lxc" last_update_lxc_time=${current_time} fi fi @@ -626,7 +644,7 @@ check() { echo "Checking vm status..." last_vm_status_check_time=${current_time} if check_status_changed "vm"; then - update_tags "vm" "${vmid}" + update_all_tags "vm" last_update_vm_time=${current_time} fi fi @@ -638,8 +656,8 @@ check() { echo "Checking fw net interface..." last_fw_net_interface_check_time=${current_time} if check_status_changed "fw"; then - update_tags "lxc" "${vmid}" - update_tags "vm" "${vmid}" + update_all_tags "lxc" + update_all_tags "vm" last_update_lxc_time=${current_time} last_update_vm_time=${current_time} fi @@ -651,10 +669,7 @@ check() { local time_since_last_update=$((current_time - ${!last_update_var})) if [ ${time_since_last_update} -ge ${FORCE_UPDATE_INTERVAL} ]; then echo "Force updating ${type} iptags..." - case "$type" in - "lxc") update_tags "lxc" "${vmid}" ;; - "vm") update_tags "vm" "${vmid}" ;; - esac + update_all_tags "$type" eval "${last_update_var}=${current_time}" fi done From 1b10014eb8d5fe4a986fa440556698528002c5ac Mon Sep 17 00:00:00 2001 From: Desert Gamer <44316028+DesertGamer@users.noreply.github.com> Date: Sun, 6 Apr 2025 17:14:28 +0300 Subject: [PATCH 0329/1614] feat: optimize script and add tag formatting options - Add configurable IP tag format (full, last_octet, last_two_octets) - Fix IP CIDR matching to respect network mask correctly - Suppress AppArmor warnings by redirecting error outputs - Optimize status check functions with unified check_status_changed() function - Fix handling of containers and VMs with update_all_tags() function - Improve tag filtering to handle both full and partial IP formats - Add support for directory creation during updates - Convert all comments to English for better maintainability - Implement more robust error handling for system commands This update makes the script more efficient, customizable, and eliminates error output from AppArmor warnings while ensuring proper CIDR validation. --- scripts/tools/add-iptag.sh | 296 ++++++++++++++++++++++++++++++------- 1 file changed, 240 insertions(+), 56 deletions(-) diff --git a/scripts/tools/add-iptag.sh b/scripts/tools/add-iptag.sh index ac39e55..55f23d2 100644 --- a/scripts/tools/add-iptag.sh +++ b/scripts/tools/add-iptag.sh @@ -6,8 +6,8 @@ # Source: https://github.com/gitsang/iptag function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ___ ____ _____ |_ _| _ \ _ |_ _|_ _ __ _ | || |_) (_) | |/ _` |/ _` | @@ -40,7 +40,9 @@ 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() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then + kill $SPINNER_PID >/dev/null + fi printf "\e[?25h" local exit_code="$?" local line_number="$1" @@ -59,9 +61,9 @@ spinner() { local color="${YWB}" while true; do - printf "\r ${color}%s${CL}" "${frames[spin_i]}" - spin_i=$(((spin_i + 1) % ${#frames[@]})) - sleep "$interval" + printf "\r ${color}%s${CL}" "${frames[spin_i]}" + spin_i=$(((spin_i + 1) % ${#frames[@]})) + sleep "$interval" done } @@ -75,7 +77,9 @@ msg_info() { # This function displays a success message with a green color. msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then + kill $SPINNER_PID >/dev/null + fi printf "\e[?25h" local msg="$1" echo -e "${BFR}${CM}${GN}${msg}${CL}" @@ -83,7 +87,9 @@ msg_ok() { # This function displays a error message with a red color. msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then + kill $SPINNER_PID >/dev/null + fi printf "\e[?25h" local msg="$1" echo -e "${BFR}${CROSS}${RD}${msg}${CL}" @@ -151,17 +157,65 @@ ip_to_int() { ip_in_cidr() { local ip="$1" local cidr="$2" - local ip_int=$(ip_to_int "$ip") - local netmask_int=$(ip_to_int "$(ipcalc -b "$cidr" | grep Broadcast | awk '{print $2}')") - [[ $((ip_int & netmask_int)) -eq $((ip_int & netmask_int)) ]] && return 0 || return 1 + + # Use ipcalc with the -c option (check), which returns 0 if the IP is in the network + if ipcalc -c "$ip" "$cidr" >/dev/null 2>&1; then + # Get network address and mask from CIDR + local network prefix + network=$(echo "$cidr" | cut -d/ -f1) + prefix=$(echo "$cidr" | cut -d/ -f2) + + # Check if IP is in the network + local ip_a ip_b ip_c ip_d net_a net_b net_c net_d + IFS=. read -r ip_a ip_b ip_c ip_d <<< "$ip" + IFS=. read -r net_a net_b net_c net_d <<< "$network" + + # Check octets match based on prefix length + local result=0 + if (( prefix >= 8 )); then + [[ "$ip_a" != "$net_a" ]] && result=1 + fi + if (( prefix >= 16 )); then + [[ "$ip_b" != "$net_b" ]] && result=1 + fi + if (( prefix >= 24 )); then + [[ "$ip_c" != "$net_c" ]] && result=1 + fi + + return $result + fi + + return 1 +} + +# Format IP address according to the configuration +format_ip_tag() { + local ip="$1" + local format="${TAG_FORMAT:-full}" + + case "$format" in + "last_octet") + echo "${ip##*.}" + ;; + "last_two_octets") + echo "${ip#*.*.}" + ;; + *) + echo "$ip" + ;; + esac } # Check if IP is in any CIDRs ip_in_cidrs() { local ip="$1" - local cidrs=() - mapfile -t cidrs < <(echo "$2" | tr ' ' '\n') - for cidr in "${cidrs[@]}"; do + local cidrs="$2" + + # Check that cidrs is not empty + [[ -z "$cidrs" ]] && return 1 + + local IFS=' ' + for cidr in $cidrs; do ip_in_cidr "$ip" "$cidr" && return 0 done return 1 @@ -215,16 +269,16 @@ get_vm_ips() { local ips="" # Check if VM is running - qm status "$vmid" | grep -q "status: running" || return + qm status "$vmid" 2>/dev/null | grep -q "status: running" || return # Get MAC addresses from VM configuration local macs - macs=$(qm config "$vmid" | grep -E 'net[0-9]+' | grep -o -E '[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}') + macs=$(qm config "$vmid" 2>/dev/null | grep -E 'net[0-9]+' | grep -o -E '[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}') # Look up IPs from ARP table using MAC addresses for mac in $macs; do local ip - ip=$(arp -an | grep -i "$mac" | grep -o -E '([0-9]{1,3}\.){3}[0-9]{1,3}') + ip=$(arp -an 2>/dev/null | grep -i "$mac" | grep -o -E '([0-9]{1,3}\.){3}[0-9]{1,3}') if [ -n "$ip" ]; then ips+="$ip " fi @@ -243,7 +297,8 @@ update_tags() { # Get current IPs local current_ips_full if [[ "$type" == "lxc" ]]; then - current_ips_full=$(lxc-info -n "${vmid}" -i | awk '{print $2}') + # Redirect error output to suppress AppArmor warnings + current_ips_full=$(lxc-info -n "${vmid}" -i 2>/dev/null | grep -E "^IP:" | awk '{print $2}') else current_ips_full=$(get_vm_ips "${vmid}") fi @@ -251,20 +306,40 @@ update_tags() { # Parse current tags and get valid IPs local current_tags=() local next_tags=() - mapfile -t current_tags < <($config_cmd config "${vmid}" | grep tags | awk '{print $2}' | sed 's/;/\n/g') + mapfile -t current_tags < <($config_cmd config "${vmid}" 2>/dev/null | grep tags | awk '{print $2}' | sed 's/;/\n/g') for tag in "${current_tags[@]}"; do - is_valid_ipv4 "${tag}" || next_tags+=("${tag}") + # Skip tag if it looks like an IP (full or partial) + if ! is_valid_ipv4 "${tag}" && ! [[ "$tag" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + next_tags+=("${tag}") + fi done # Add valid IPs to tags + local added_ips=() + local skipped_ips=() + for ip in ${current_ips_full}; do - is_valid_ipv4 "${ip}" && ip_in_cidrs "${ip}" "${CIDR_LIST[*]}" && next_tags+=("${ip}") + if is_valid_ipv4 "${ip}"; then + if ip_in_cidrs "${ip}" "${CIDR_LIST[*]}"; then + local formatted_ip=$(format_ip_tag "$ip") + next_tags+=("${formatted_ip}") + added_ips+=("${formatted_ip}") + else + skipped_ips+=("${ip}") + fi + fi done + # Log only if there are changes + if [ ${#added_ips[@]} -gt 0 ]; then + echo "${type^} ${vmid}: added IP tags: ${added_ips[*]}" + fi + # Update if changed - [[ "$(IFS=';'; echo "${current_tags[*]}")" != "$(IFS=';'; echo "${next_tags[*]}")" ]] && \ - $config_cmd set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" + if [[ "$(IFS=';'; echo "${current_tags[*]}")" != "$(IFS=';'; echo "${next_tags[*]}")" ]]; then + $config_cmd set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" &>/dev/null + fi } # Check if status changed @@ -274,17 +349,17 @@ check_status_changed() { case "$type" in "lxc") - current_status=$(pct list 2>/dev/null) + current_status=$(pct list 2>/dev/null | grep -v VMID) [[ "${last_lxc_status}" == "${current_status}" ]] && return 1 last_lxc_status="${current_status}" ;; "vm") - current_status=$(qm list 2>/dev/null) + current_status=$(qm list 2>/dev/null | grep -v VMID) [[ "${last_vm_status}" == "${current_status}" ]] && return 1 last_vm_status="${current_status}" ;; "fw") - current_status=$(ifconfig | grep "^fw") + current_status=$(ifconfig 2>/dev/null | grep "^fw") [[ "${last_net_interface}" == "${current_status}" ]] && return 1 last_net_interface="${current_status}" ;; @@ -298,9 +373,12 @@ update_all_tags() { local vmid_list="" if [[ "$type" == "lxc" ]]; then + # Redirect stderr to /dev/null to suppress AppArmor messages vmid_list=$(pct list 2>/dev/null | grep -v VMID | awk '{print $1}') + echo "Found $(echo "$vmid_list" | wc -w) LXC containers" else vmid_list=$(qm list 2>/dev/null | grep -v VMID | awk '{print $1}') + echo "Found $(echo "$vmid_list" | wc -w) virtual machines" fi for vmid in $vmid_list; do @@ -315,7 +393,7 @@ check() { time_since_last_lxc_status_check=$((current_time - last_lxc_status_check_time)) if [[ "${LXC_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ && [[ "${time_since_last_lxc_status_check}" -ge "${LXC_STATUS_CHECK_INTERVAL}" ]]; then - echo "Checking lxc status..." + echo "Checking LXC status..." last_lxc_status_check_time=${current_time} if check_status_changed "lxc"; then update_all_tags "lxc" @@ -327,7 +405,7 @@ check() { time_since_last_vm_status_check=$((current_time - last_vm_status_check_time)) if [[ "${VM_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ && [[ "${time_since_last_vm_status_check}" -ge "${VM_STATUS_CHECK_INTERVAL}" ]]; then - echo "Checking vm status..." + echo "Checking VM status..." last_vm_status_check_time=${current_time} if check_status_changed "vm"; then update_all_tags "vm" @@ -339,7 +417,7 @@ check() { time_since_last_fw_net_interface_check=$((current_time - last_fw_net_interface_check_time)) if [[ "${FW_NET_INTERFACE_CHECK_INTERVAL}" -gt 0 ]] \ && [[ "${time_since_last_fw_net_interface_check}" -ge "${FW_NET_INTERFACE_CHECK_INTERVAL}" ]]; then - echo "Checking fw net interface..." + echo "Checking network interfaces..." last_fw_net_interface_check_time=${current_time} if check_status_changed "fw"; then update_all_tags "lxc" @@ -354,7 +432,7 @@ check() { local last_update_var="last_update_${type}_time" local time_since_last_update=$((current_time - ${!last_update_var})) if [ ${time_since_last_update} -ge ${FORCE_UPDATE_INTERVAL} ]; then - echo "Force updating ${type} iptags..." + echo "Force updating ${type} tags..." update_all_tags "$type" eval "${last_update_var}=${current_time}" fi @@ -413,7 +491,9 @@ if check_service_exists; then msg_error "Installation cancelled." exit 0 ;; - *) msg_error "Please answer yes or no." ;; + *) + msg_error "Please answer yes or no." + ;; esac done fi @@ -421,12 +501,16 @@ fi while true; do read -p "This will install ${APP} on ${hostname}. Proceed? (y/n): " yn case $yn in - [Yy]*) break ;; - [Nn]*) - msg_error "Installation cancelled." - exit - ;; - *) msg_error "Please answer yes or no." ;; + [Yy]*) + break + ;; + [Nn]*) + msg_error "Installation cancelled." + exit + ;; + *) + msg_error "Please answer yes or no." + ;; esac done @@ -469,6 +553,12 @@ CIDR_LIST=( 100.64.0.0/10 ) +# Tag format options: +# - "full": full IP address (e.g., 192.168.0.100) +# - "last_octet": only the last octet (e.g., 100) +# - "last_two_octets": last two octets (e.g., 0.100) +TAG_FORMAT="full" + # Interval settings (in seconds) LOOP_INTERVAL=60 VM_STATUS_CHECK_INTERVAL=60 @@ -506,17 +596,65 @@ ip_to_int() { ip_in_cidr() { local ip="$1" local cidr="$2" - local ip_int=$(ip_to_int "$ip") - local netmask_int=$(ip_to_int "$(ipcalc -b "$cidr" | grep Broadcast | awk '{print $2}')") - [[ $((ip_int & netmask_int)) -eq $((ip_int & netmask_int)) ]] && return 0 || return 1 + + # Use ipcalc with the -c option (check), which returns 0 if the IP is in the network + if ipcalc -c "$ip" "$cidr" >/dev/null 2>&1; then + # Get network address and mask from CIDR + local network prefix + network=$(echo "$cidr" | cut -d/ -f1) + prefix=$(echo "$cidr" | cut -d/ -f2) + + # Check if IP is in the network + local ip_a ip_b ip_c ip_d net_a net_b net_c net_d + IFS=. read -r ip_a ip_b ip_c ip_d <<< "$ip" + IFS=. read -r net_a net_b net_c net_d <<< "$network" + + # Check octets match based on prefix length + local result=0 + if (( prefix >= 8 )); then + [[ "$ip_a" != "$net_a" ]] && result=1 + fi + if (( prefix >= 16 )); then + [[ "$ip_b" != "$net_b" ]] && result=1 + fi + if (( prefix >= 24 )); then + [[ "$ip_c" != "$net_c" ]] && result=1 + fi + + return $result + fi + + return 1 +} + +# Format IP address according to the configuration +format_ip_tag() { + local ip="$1" + local format="${TAG_FORMAT:-full}" + + case "$format" in + "last_octet") + echo "${ip##*.}" + ;; + "last_two_octets") + echo "${ip#*.*.}" + ;; + *) + echo "$ip" + ;; + esac } # Check if IP is in any CIDRs ip_in_cidrs() { local ip="$1" - local cidrs=() - mapfile -t cidrs < <(echo "$2" | tr ' ' '\n') - for cidr in "${cidrs[@]}"; do + local cidrs="$2" + + # Check that cidrs is not empty + [[ -z "$cidrs" ]] && return 1 + + local IFS=' ' + for cidr in $cidrs; do ip_in_cidr "$ip" "$cidr" && return 0 done return 1 @@ -570,16 +708,16 @@ get_vm_ips() { local ips="" # Check if VM is running - qm status "$vmid" | grep -q "status: running" || return + qm status "$vmid" 2>/dev/null | grep -q "status: running" || return # Get MAC addresses from VM configuration local macs - macs=$(qm config "$vmid" | grep -E 'net[0-9]+' | grep -o -E '[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}') + macs=$(qm config "$vmid" 2>/dev/null | grep -E 'net[0-9]+' | grep -o -E '[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}') # Look up IPs from ARP table using MAC addresses for mac in $macs; do local ip - ip=$(arp -an | grep -i "$mac" | grep -o -E '([0-9]{1,3}\.){3}[0-9]{1,3}') + ip=$(arp -an 2>/dev/null | grep -i "$mac" | grep -o -E '([0-9]{1,3}\.){3}[0-9]{1,3}') if [ -n "$ip" ]; then ips+="$ip " fi @@ -598,7 +736,8 @@ update_tags() { # Get current IPs local current_ips_full if [[ "$type" == "lxc" ]]; then - current_ips_full=$(lxc-info -n "${vmid}" -i | awk '{print $2}') + # Redirect error output to suppress AppArmor warnings + current_ips_full=$(lxc-info -n "${vmid}" -i 2>/dev/null | grep -E "^IP:" | awk '{print $2}') else current_ips_full=$(get_vm_ips "${vmid}") fi @@ -606,20 +745,65 @@ update_tags() { # Parse current tags and get valid IPs local current_tags=() local next_tags=() - mapfile -t current_tags < <($config_cmd config "${vmid}" | grep tags | awk '{print $2}' | sed 's/;/\n/g') + mapfile -t current_tags < <($config_cmd config "${vmid}" 2>/dev/null | grep tags | awk '{print $2}' | sed 's/;/\n/g') for tag in "${current_tags[@]}"; do - is_valid_ipv4 "${tag}" || next_tags+=("${tag}") + # Skip tag if it looks like an IP (full or partial) + if ! is_valid_ipv4 "${tag}" && ! [[ "$tag" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + next_tags+=("${tag}") + fi done # Add valid IPs to tags + local added_ips=() + local skipped_ips=() + for ip in ${current_ips_full}; do - is_valid_ipv4 "${ip}" && ip_in_cidrs "${ip}" "${CIDR_LIST[*]}" && next_tags+=("${ip}") + if is_valid_ipv4 "${ip}"; then + if ip_in_cidrs "${ip}" "${CIDR_LIST[*]}"; then + local formatted_ip=$(format_ip_tag "$ip") + next_tags+=("${formatted_ip}") + added_ips+=("${formatted_ip}") + else + skipped_ips+=("${ip}") + fi + fi done + # Log only if there are changes + if [ ${#added_ips[@]} -gt 0 ]; then + echo "${type^} ${vmid}: added IP tags: ${added_ips[*]}" + fi + # Update if changed - [[ "$(IFS=';'; echo "${current_tags[*]}")" != "$(IFS=';'; echo "${next_tags[*]}")" ]] && \ - $config_cmd set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" + if [[ "$(IFS=';'; echo "${current_tags[*]}")" != "$(IFS=';'; echo "${next_tags[*]}")" ]]; then + $config_cmd set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" &>/dev/null + fi +} + +# Check if status changed +check_status_changed() { + local type="$1" + local current_status + + case "$type" in + "lxc") + current_status=$(pct list 2>/dev/null | grep -v VMID) + [[ "${last_lxc_status}" == "${current_status}" ]] && return 1 + last_lxc_status="${current_status}" + ;; + "vm") + current_status=$(qm list 2>/dev/null | grep -v VMID) + [[ "${last_vm_status}" == "${current_status}" ]] && return 1 + last_vm_status="${current_status}" + ;; + "fw") + current_status=$(ifconfig 2>/dev/null | grep "^fw") + [[ "${last_net_interface}" == "${current_status}" ]] && return 1 + last_net_interface="${current_status}" + ;; + esac + return 0 } check() { @@ -629,7 +813,7 @@ check() { time_since_last_lxc_status_check=$((current_time - last_lxc_status_check_time)) if [[ "${LXC_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ && [[ "${time_since_last_lxc_status_check}" -ge "${LXC_STATUS_CHECK_INTERVAL}" ]]; then - echo "Checking lxc status..." + echo "Checking LXC status..." last_lxc_status_check_time=${current_time} if check_status_changed "lxc"; then update_all_tags "lxc" @@ -641,7 +825,7 @@ check() { time_since_last_vm_status_check=$((current_time - last_vm_status_check_time)) if [[ "${VM_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ && [[ "${time_since_last_vm_status_check}" -ge "${VM_STATUS_CHECK_INTERVAL}" ]]; then - echo "Checking vm status..." + echo "Checking VM status..." last_vm_status_check_time=${current_time} if check_status_changed "vm"; then update_all_tags "vm" @@ -653,7 +837,7 @@ check() { time_since_last_fw_net_interface_check=$((current_time - last_fw_net_interface_check_time)) if [[ "${FW_NET_INTERFACE_CHECK_INTERVAL}" -gt 0 ]] \ && [[ "${time_since_last_fw_net_interface_check}" -ge "${FW_NET_INTERFACE_CHECK_INTERVAL}" ]]; then - echo "Checking fw net interface..." + echo "Checking network interfaces..." last_fw_net_interface_check_time=${current_time} if check_status_changed "fw"; then update_all_tags "lxc" @@ -668,7 +852,7 @@ check() { local last_update_var="last_update_${type}_time" local time_since_last_update=$((current_time - ${!last_update_var})) if [ ${time_since_last_update} -ge ${FORCE_UPDATE_INTERVAL} ]; then - echo "Force updating ${type} iptags..." + echo "Force updating ${type} tags..." update_all_tags "$type" eval "${last_update_var}=${current_time}" fi From 343b266b4f27ab9f510c95db3b2e79d9deae7782 Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Sun, 6 Apr 2025 22:08:45 +0200 Subject: [PATCH 0330/1614] Update bar-assistant-install.sh --- install/bar-assistant-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index bacec12..a89c395 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -113,8 +113,8 @@ mv /opt/vue-salt-rim-${RELEASE_SALTRIM}/ /opt/vue-salt-rim cd /opt/vue-salt-rim cat </opt/vue-salt-rim/public/config.js window.srConfig = {} -window.srConfig.API_URL = "http://${LOCAL_IP}/bar/" -window.srConfig.MEILISEARCH_URL = "http://${LOCAL_IP}/search/" +window.srConfig.API_URL = "http://${LOCAL_IP}/bar" +window.srConfig.MEILISEARCH_URL = "http://${LOCAL_IP}/search" EOF $STD npm install $STD npm run build From d63931fb211f5c2193cccd9c03b75649bc6dbab0 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Mon, 7 Apr 2025 01:24:37 +0000 Subject: [PATCH 0331/1614] Update versions.json --- frontend/public/json/versions.json | 133 ++++++++++++++--------------- 1 file changed, 64 insertions(+), 69 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 1b3c455..a8e86dd 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,13 +1,73 @@ [ { "name": "semaphoreui/semaphore", - "version": "v2.13.8-beta2", - "date": "2025-04-06T06:36:42Z" + "version": "v2.13.8", + "date": "2025-04-06T20:59:11Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-06T20:28:01Z" + }, + { + "name": "Luligu/matterbridge", + "version": "2.2.7", + "date": "2025-04-06T20:00:53Z" + }, + { + "name": "Dolibarr/dolibarr", + "version": "21.0.1", + "date": "2025-04-06T19:22:59Z" + }, + { + "name": "pelican-dev/wings", + "version": "v1.0.0-beta11", + "date": "2025-04-06T18:52:35Z" + }, + { + "name": "stonith404/pingvin-share", + "version": "v1.11.1", + "date": "2025-04-06T18:39:42Z" + }, + { + "name": "wavelog/wavelog", + "version": "2.0.3", + "date": "2025-04-06T17:35:41Z" + }, + { + "name": "TandoorRecipes/recipes", + "version": "1.5.34", + "date": "2025-03-27T16:17:38Z" + }, + { + "name": "runtipi/runtipi", + "version": "e2e", + "date": "2025-03-23T22:08:04Z" + }, + { + "name": "stackblitz-labs/bolt.diy", + "version": "v0.0.7-hf1", + "date": "2025-03-10T20:49:39Z" + }, + { + "name": "msgbyte/tianji", + "version": "v1.19.7", + "date": "2025-04-06T14:22:44Z" + }, + { + "name": "Prowlarr/Prowlarr", + "version": "v1.32.2.4987", + "date": "2025-03-16T09:41:37Z" + }, + { + "name": "Radarr/Radarr", + "version": "v5.21.1.9799", + "date": "2025-03-24T15:52:12Z" }, { "name": "karakeep-app/karakeep", - "version": "ios/v1.6.9-1", - "date": "2025-04-06T10:51:57Z" + "version": "extension/v1.2.4", + "date": "2025-04-06T11:56:18Z" }, { "name": "fallenbagel/jellyseerr", @@ -19,11 +79,6 @@ "version": "v0.92.6", "date": "2025-04-06T10:38:54Z" }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-06T10:31:42Z" - }, { "name": "kimai/kimai", "version": "2.32.0", @@ -79,11 +134,6 @@ "version": "26.1.4", "date": "2025-03-13T15:41:42Z" }, - { - "name": "stonith404/pingvin-share", - "version": "v1.11.0", - "date": "2025-04-05T14:56:47Z" - }, { "name": "bastienwirtz/homer", "version": "v25.04.1", @@ -154,11 +204,6 @@ "version": "9.0.104", "date": "2025-04-04T12:58:11Z" }, - { - "name": "Dolibarr/dolibarr", - "version": "21.0.1", - "date": "2025-04-04T12:56:35Z" - }, { "name": "sabnzbd/sabnzbd", "version": "4.5.0", @@ -254,11 +299,6 @@ "version": "v10.1.4", "date": "2025-04-02T09:38:52Z" }, - { - "name": "runtipi/runtipi", - "version": "v3.10.0", - "date": "2025-03-15T14:38:16Z" - }, { "name": "immich-app/immich", "version": "v1.131.3", @@ -269,11 +309,6 @@ "version": "v2.31.0", "date": "2025-04-01T18:12:45Z" }, - { - "name": "msgbyte/tianji", - "version": "v1.19.6", - "date": "2025-04-01T17:26:31Z" - }, { "name": "influxdata/influxdb", "version": "v3.0.0-0.beta.3", @@ -284,11 +319,6 @@ "version": "v1.127.1", "date": "2025-03-26T21:44:28Z" }, - { - "name": "Luligu/matterbridge", - "version": "2.2.6", - "date": "2025-04-01T14:01:36Z" - }, { "name": "theonedev/onedev", "version": "v11.8.6", @@ -379,11 +409,6 @@ "version": "v0.26.6", "date": "2025-03-30T08:02:19Z" }, - { - "name": "Prowlarr/Prowlarr", - "version": "v1.32.2.4987", - "date": "2025-03-16T09:41:37Z" - }, { "name": "Readarr/Readarr", "version": "v2.0.0.4645", @@ -394,11 +419,6 @@ "version": "v2.10.3.4602", "date": "2025-03-23T11:00:37Z" }, - { - "name": "Radarr/Radarr", - "version": "v5.21.1.9799", - "date": "2025-03-24T15:52:12Z" - }, { "name": "aceberg/WatchYourLAN", "version": "2.1.2-alpine", @@ -443,30 +463,5 @@ "name": "gristlabs/grist-core", "version": "v1.5.0", "date": "2025-03-28T20:43:51Z" - }, - { - "name": "grocy/grocy", - "version": "v4.5.0", - "date": "2025-03-28T19:02:22Z" - }, - { - "name": "Brandawg93/PeaNUT", - "version": "v5.6.1", - "date": "2025-03-28T18:40:22Z" - }, - { - "name": "louislam/uptime-kuma", - "version": "2.0.0-beta.2-temp", - "date": "2025-03-28T08:45:58Z" - }, - { - "name": "emqx/emqx", - "version": "e5.9.0-beta.2", - "date": "2025-03-28T15:06:27Z" - }, - { - "name": "goauthentik/authentik", - "version": "version/2025.2.3", - "date": "2025-03-28T14:28:34Z" } ] From 0c0836058402d4616ba22bb06ec516b38caa47a1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 08:49:20 +0200 Subject: [PATCH 0332/1614] Update install.func --- misc/install.func | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/misc/install.func b/misc/install.func index 2a730fb..e77829e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -274,3 +274,54 @@ EOF chmod 600 /root/.ssh/authorized_keys fi } + +get_gh_release() { + local repo="$1" + local app="${repo##*/}" + local api_url="https://api.github.com/repos/$repo/releases/latest" + local header=() + local attempt=0 + local max_attempts=3 + local api_response tag + + echo "🔍 Checking latest release for: $repo" + + [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") + + until [[ $attempt -ge $max_attempts ]]; do + ((attempt++)) + $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" + + if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then + $STD msg_info "Request failed, retrying...\n" + sleep 2 + continue + fi + + if echo "$api_response" | grep -q "API rate limit exceeded"; then + msg_error "GitHub API rate limit exceeded." + return 1 + fi + + if echo "$api_response" | jq -e '.message == "Not Found"' &>/dev/null; then + msg_error "Repository not found: $repo" + return 1 + fi + + tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + + if [[ -z "$tag" ]]; then + $STD msg_info "Empty tag received, retrying...\n" + sleep 2 + continue + fi + + $STD msg_ok "Found release: $tag for $repo" + echo "$tag" + return 0 + done + + msg_error "Failed to fetch release for $repo after $max_attempts attempts." + return 1 +} From 35d580287c4c01935f6bec10e317d59f088a7c3f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 09:31:39 +0200 Subject: [PATCH 0333/1614] Update install.func --- misc/install.func | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/misc/install.func b/misc/install.func index e77829e..a761ebd 100644 --- a/misc/install.func +++ b/misc/install.func @@ -282,22 +282,33 @@ get_gh_release() { local header=() local attempt=0 local max_attempts=3 - local api_response tag + local api_response tag http_code echo "🔍 Checking latest release for: $repo" [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") until [[ $attempt -ge $max_attempts ]]; do - ((attempt++)) + ((attempt++)) || true $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" - if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then - $STD msg_info "Request failed, retrying...\n" + # Hole HTTP-Status explizit + api_response=$(curl -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url") + http_code="${api_response:(-3)}" + + if [[ "$http_code" == "404" ]]; then + msg_error "Repository $repo hat kein Release (404)" + return 1 + fi + + if [[ "$http_code" != "200" ]]; then + $STD msg_info "Request failed with HTTP $http_code, retrying...\n" sleep 2 continue fi + api_response=$( Date: Mon, 7 Apr 2025 09:42:52 +0200 Subject: [PATCH 0334/1614] Update install.func --- misc/install.func | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/install.func b/misc/install.func index a761ebd..072a85c 100644 --- a/misc/install.func +++ b/misc/install.func @@ -297,7 +297,7 @@ get_gh_release() { http_code="${api_response:(-3)}" if [[ "$http_code" == "404" ]]; then - msg_error "Repository $repo hat kein Release (404)" + msg_error "Repository $repo has no Release candidate (404)" return 1 fi @@ -329,10 +329,9 @@ get_gh_release() { fi $STD msg_ok "Found release: $tag for $repo" - echo "$tag" return 0 done msg_error "Failed to fetch release for $repo after $max_attempts attempts." - return 1 + exit 1 } From 5d64161e579934fc2e2acbf07d70732a4536a829 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:38:33 +0200 Subject: [PATCH 0335/1614] Update install.func --- misc/install.func | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/misc/install.func b/misc/install.func index 072a85c..e85fa55 100644 --- a/misc/install.func +++ b/misc/install.func @@ -282,23 +282,24 @@ get_gh_release() { local header=() local attempt=0 local max_attempts=3 - local api_response tag http_code + local tag + local tmpfile http_code echo "🔍 Checking latest release for: $repo" - [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") + tmpfile=$(mktemp) + until [[ $attempt -ge $max_attempts ]]; do ((attempt++)) || true $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" - # Hole HTTP-Status explizit - api_response=$(curl -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url") - http_code="${api_response:(-3)}" + http_code=$(curl -sSL -w "%{http_code}" -o "$tmpfile" "${header[@]}" "$api_url") if [[ "$http_code" == "404" ]]; then + rm -f "$tmpfile" msg_error "Repository $repo has no Release candidate (404)" - return 1 + exit 1 fi if [[ "$http_code" != "200" ]]; then @@ -307,19 +308,19 @@ get_gh_release() { continue fi - api_response=$(/dev/null; then + if jq -e '.message == "Not Found"' "$tmpfile" &>/dev/null; then + rm -f "$tmpfile" msg_error "Repository not found: $repo" - return 1 + exit 1 fi - tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + tag=$(jq -r '.tag_name // .name // empty' "$tmpfile") [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" if [[ -z "$tag" ]]; then @@ -328,10 +329,13 @@ get_gh_release() { continue fi + rm -f "$tmpfile" $STD msg_ok "Found release: $tag for $repo" + echo "$tag" return 0 done + rm -f "$tmpfile" msg_error "Failed to fetch release for $repo after $max_attempts attempts." exit 1 } From 15289beff201c3f0205ff0c22781911c66c4fec6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:42:24 +0200 Subject: [PATCH 0336/1614] Update install.func --- misc/install.func | 53 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/misc/install.func b/misc/install.func index e85fa55..278c021 100644 --- a/misc/install.func +++ b/misc/install.func @@ -280,15 +280,15 @@ get_gh_release() { local app="${repo##*/}" local api_url="https://api.github.com/repos/$repo/releases/latest" local header=() - local attempt=0 + local tmpdir tmpfile tag asset_url http_code local max_attempts=3 - local tag - local tmpfile http_code + local attempt=0 echo "🔍 Checking latest release for: $repo" [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") tmpfile=$(mktemp) + tmpdir=$(mktemp -d) until [[ $attempt -ge $max_attempts ]]; do ((attempt++)) || true @@ -299,7 +299,7 @@ get_gh_release() { if [[ "$http_code" == "404" ]]; then rm -f "$tmpfile" msg_error "Repository $repo has no Release candidate (404)" - exit 1 + return 1 fi if [[ "$http_code" != "200" ]]; then @@ -311,31 +311,58 @@ get_gh_release() { if grep -q "API rate limit exceeded" "$tmpfile"; then rm -f "$tmpfile" msg_error "GitHub API rate limit exceeded." - exit 1 + return 1 fi if jq -e '.message == "Not Found"' "$tmpfile" &>/dev/null; then rm -f "$tmpfile" msg_error "Repository not found: $repo" - exit 1 + return 1 fi tag=$(jq -r '.tag_name // .name // empty' "$tmpfile") [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + asset_url=$(jq -r '.assets[] | select(.browser_download_url | endswith(".tar.gz")) | .browser_download_url' "$tmpfile") - if [[ -z "$tag" ]]; then - $STD msg_info "Empty tag received, retrying...\n" + if [[ -z "$tag" || -z "$asset_url" ]]; then + $STD msg_info "Empty tag or missing .tar.gz asset, retrying...\n" sleep 2 continue fi rm -f "$tmpfile" $STD msg_ok "Found release: $tag for $repo" - echo "$tag" - return 0 + break done - rm -f "$tmpfile" - msg_error "Failed to fetch release for $repo after $max_attempts attempts." - exit 1 + if [[ $attempt -ge $max_attempts ]]; then + rm -f "$tmpfile" + msg_error "Failed to fetch release info for $repo after $max_attempts attempts." + return 1 + fi + + # Download .tar.gz + $STD msg_info "Downloading $asset_url..." + curl -fsSL -o "$tmpdir/${app}.tar.gz" "$asset_url" || { + rm -rf "$tmpdir" + msg_error "Failed to download .tar.gz from $asset_url" + return 1 + } + + # Cleanup target dir + rm -rf "/opt/$app" + mkdir -p "/opt/$app" + + # Extract + tar -xzf "$tmpdir/${app}.tar.gz" -C "/opt/$app" --strip-components=1 || { + rm -rf "$tmpdir" + msg_error "Failed to extract archive" + return 1 + } + + # Write version + echo "$tag" >"/opt/${app}_version.txt" + + rm -rf "$tmpdir" + $STD msg_ok "Deployed $app to /opt/$app and wrote version $tag" } From 11ad1b8772bdb98ad03f04febb73b0a315a91f98 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:45:16 +0200 Subject: [PATCH 0337/1614] Update ubuntu-install.sh --- install/ubuntu-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index 82e3d93..c705e25 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) + # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT From 452d7043cab10be5a1a240d456a5339e6e4077c1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:48:13 +0200 Subject: [PATCH 0338/1614] Update ubuntu-install.sh --- install/ubuntu-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index c705e25..cdbeeae 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -19,11 +19,11 @@ msg_ok "Installed Dependencies" msg_info "Check GH Releases" echo "Getting 0xERR0R/blocky..." -RELEASE=$(get_gh_release 0xERR0R/blocky) +fetch_and_deploy_gh_release 0xERR0R/blocky echo "Got Version: $RELEASE" echo "Getting aceberg/WatchYourLAN..." -RELEASE=$(get_gh_release aceberg/WatchYourLAN) +fetch_and_deploy_gh_release aceberg/WatchYourLAN echo "Got Version: $RELEASE" echo "Getting actualbudget/actual..." From 3cd291a05058750d7073d6c3e7b6dd0c0348ec39 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:48:28 +0200 Subject: [PATCH 0339/1614] Update install.func --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index 278c021..4591da1 100644 --- a/misc/install.func +++ b/misc/install.func @@ -275,7 +275,7 @@ EOF fi } -get_gh_release() { +fetch_and_deploy_gh_release() { local repo="$1" local app="${repo##*/}" local api_url="https://api.github.com/repos/$repo/releases/latest" From 5b88d6030a9a9d833db8c2ee0fdf8a9bc3dc1070 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:56:20 +0200 Subject: [PATCH 0340/1614] Update install.func --- misc/install.func | 87 +++++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 37 deletions(-) diff --git a/misc/install.func b/misc/install.func index 4591da1..19fcca9 100644 --- a/misc/install.func +++ b/misc/install.func @@ -280,24 +280,22 @@ fetch_and_deploy_gh_release() { local app="${repo##*/}" local api_url="https://api.github.com/repos/$repo/releases/latest" local header=() - local tmpdir tmpfile tag asset_url http_code - local max_attempts=3 local attempt=0 + local max_attempts=3 + local api_response tag http_code echo "🔍 Checking latest release for: $repo" - [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") - tmpfile=$(mktemp) - tmpdir=$(mktemp -d) + [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") until [[ $attempt -ge $max_attempts ]]; do ((attempt++)) || true $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" - http_code=$(curl -sSL -w "%{http_code}" -o "$tmpfile" "${header[@]}" "$api_url") + api_response=$(curl -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url") + http_code="${api_response:(-3)}" if [[ "$http_code" == "404" ]]; then - rm -f "$tmpfile" msg_error "Repository $repo has no Release candidate (404)" return 1 fi @@ -308,61 +306,76 @@ fetch_and_deploy_gh_release() { continue fi - if grep -q "API rate limit exceeded" "$tmpfile"; then - rm -f "$tmpfile" + api_response=$(/dev/null; then - rm -f "$tmpfile" + if echo "$api_response" | jq -e '.message == "Not Found"' &>/dev/null; then msg_error "Repository not found: $repo" return 1 fi - tag=$(jq -r '.tag_name // .name // empty' "$tmpfile") + tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" - asset_url=$(jq -r '.assets[] | select(.browser_download_url | endswith(".tar.gz")) | .browser_download_url' "$tmpfile") - if [[ -z "$tag" || -z "$asset_url" ]]; then - $STD msg_info "Empty tag or missing .tar.gz asset, retrying...\n" + if [[ -z "$tag" ]]; then + $STD msg_info "Empty tag received, retrying...\n" sleep 2 continue fi - rm -f "$tmpfile" $STD msg_ok "Found release: $tag for $repo" break done - if [[ $attempt -ge $max_attempts ]]; then - rm -f "$tmpfile" - msg_error "Failed to fetch release info for $repo after $max_attempts attempts." + if [[ -z "$tag" ]]; then + msg_error "Failed to fetch release for $repo after $max_attempts attempts." + exit 1 + fi + + local version="$tag" + + # Bestimme Plattform + local os="Linux" + local arch="$(uname -m)" + case "$arch" in + x86_64 | amd64) arch="x86_64" ;; + aarch64 | arm64) arch="arm64" ;; + armv7l) arch="armv7" ;; + armv6l) arch="armv6" ;; + *) + msg_error "Unsupported architecture: $arch" + return 1 + ;; + esac + + local filename="${app}_v${version}_${os}_${arch}.tar.gz" + local url="https://github.com/$repo/releases/download/v${version}/$filename" + + $STD msg_info "Downloading $url" + + local tmpdir + tmpdir=$(mktemp -d) || return 1 + + if ! curl -fsSL -o "$tmpdir/$filename" "$url"; then + msg_error "Failed to download .tar.gz from $url" + rm -rf "$tmpdir" return 1 fi - # Download .tar.gz - $STD msg_info "Downloading $asset_url..." - curl -fsSL -o "$tmpdir/${app}.tar.gz" "$asset_url" || { - rm -rf "$tmpdir" - msg_error "Failed to download .tar.gz from $asset_url" - return 1 - } - - # Cleanup target dir - rm -rf "/opt/$app" mkdir -p "/opt/$app" - - # Extract - tar -xzf "$tmpdir/${app}.tar.gz" -C "/opt/$app" --strip-components=1 || { + if ! tar -xzf "$tmpdir/$filename" -C "/opt/$app" --strip-components=1; then + msg_error "Failed to extract archive for $app" rm -rf "$tmpdir" - msg_error "Failed to extract archive" return 1 - } + fi - # Write version - echo "$tag" >"/opt/${app}_version.txt" + echo "$version" >"/opt/${app}_version.txt" + + $STD msg_ok "Deployed $app v$version to /opt/$app" rm -rf "$tmpdir" - $STD msg_ok "Deployed $app to /opt/$app and wrote version $tag" } From eca6301247c9abd3d39c7862f04e665db217ec0b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 11:05:47 +0200 Subject: [PATCH 0341/1614] Update ubuntu-install.sh --- install/ubuntu-install.sh | 144 +++++++++++++++++++------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index cdbeeae..bdfee69 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -22,101 +22,101 @@ echo "Getting 0xERR0R/blocky..." fetch_and_deploy_gh_release 0xERR0R/blocky echo "Got Version: $RELEASE" -echo "Getting aceberg/WatchYourLAN..." -fetch_and_deploy_gh_release aceberg/WatchYourLAN -echo "Got Version: $RELEASE" +# echo "Getting aceberg/WatchYourLAN..." +# fetch_and_deploy_gh_release aceberg/WatchYourLAN +# echo "Got Version: $RELEASE" -echo "Getting actualbudget/actual..." -RELEASE=$(get_gh_release actualbudget/actual) -echo "Got Version: $RELEASE" +# echo "Getting actualbudget/actual..." +# RELEASE=$(get_gh_release actualbudget/actual) +# echo "Got Version: $RELEASE" -echo "Getting agl/jbig2enc..." -RELEASE=$(get_gh_release agl/jbig2enc) -echo "Got Version: $RELEASE" +# echo "Getting agl/jbig2enc..." +# RELEASE=$(get_gh_release agl/jbig2enc) +# echo "Got Version: $RELEASE" -echo "Getting alexta69/metube..." -RELEASE=$(get_gh_release alexta69/metube) -echo "Got Version: $RELEASE" +# echo "Getting alexta69/metube..." +# RELEASE=$(get_gh_release alexta69/metube) +# echo "Got Version: $RELEASE" -echo "Getting AlexxIT/go2rtc..." -RELEASE=$(get_gh_release AlexxIT/go2rtc) -echo "Got Version: $RELEASE" +# echo "Getting AlexxIT/go2rtc..." +# RELEASE=$(get_gh_release AlexxIT/go2rtc) +# echo "Got Version: $RELEASE" -echo "Getting apache/tika..." -RELEASE=$(get_gh_release apache/tika) -echo "Got Version: $RELEASE" +# echo "Getting apache/tika..." +# RELEASE=$(get_gh_release apache/tika) +# echo "Got Version: $RELEASE" -echo "Getting ArtifexSoftware/ghostpdl-downloads..." -RELEASE=$(get_gh_release ArtifexSoftware/ghostpdl-downloads) -echo "Got Version: $RELEASE" +# echo "Getting ArtifexSoftware/ghostpdl-downloads..." +# RELEASE=$(get_gh_release ArtifexSoftware/ghostpdl-downloads) +# echo "Got Version: $RELEASE" -echo "Getting Athou/commafeed..." -RELEASE=$(get_gh_release Athou/commafeed) -echo "Got Version: $RELEASE" +# echo "Getting Athou/commafeed..." +# RELEASE=$(get_gh_release Athou/commafeed) +# echo "Got Version: $RELEASE" -echo "Getting authelia/authelia..." -RELEASE=$(get_gh_release authelia/authelia) -echo "Got Version: $RELEASE" +# echo "Getting authelia/authelia..." +# RELEASE=$(get_gh_release authelia/authelia) +# echo "Got Version: $RELEASE" -echo "Getting azukaar/Cosmos-Server..." -RELEASE=$(get_gh_release azukaar/Cosmos-Server) -echo "Got Version: $RELEASE" +# echo "Getting azukaar/Cosmos-Server..." +# RELEASE=$(get_gh_release azukaar/Cosmos-Server) +# echo "Got Version: $RELEASE" -echo "Getting bastienwirtz/homer..." -RELEASE=$(get_gh_release bastienwirtz/homer) -echo "Got Version: $RELEASE" +# echo "Getting bastienwirtz/homer..." +# RELEASE=$(get_gh_release bastienwirtz/homer) +# echo "Got Version: $RELEASE" -echo "Getting benjaminjonard/koillection..." -RELEASE=$(get_gh_release benjaminjonard/koillection) -echo "Got Version: $RELEASE" +# echo "Getting benjaminjonard/koillection..." +# RELEASE=$(get_gh_release benjaminjonard/koillection) +# echo "Got Version: $RELEASE" -echo "Getting benzino77/tasmocompiler..." -RELEASE=$(get_gh_release benzino77/tasmocompiler) -echo "Got Version: $RELEASE" +# echo "Getting benzino77/tasmocompiler..." +# RELEASE=$(get_gh_release benzino77/tasmocompiler) +# echo "Got Version: $RELEASE" -echo "Getting blakeblackshear/frigate..." -RELEASE=$(get_gh_release blakeblackshear/frigate) -echo "Got Version: $RELEASE" +# echo "Getting blakeblackshear/frigate..." +# RELEASE=$(get_gh_release blakeblackshear/frigate) +# echo "Got Version: $RELEASE" -echo "Getting bluenviron/mediamtx..." -RELEASE=$(get_gh_release bluenviron/mediamtx) -echo "Got Version: $RELEASE" +# echo "Getting bluenviron/mediamtx..." +# RELEASE=$(get_gh_release bluenviron/mediamtx) +# echo "Got Version: $RELEASE" -echo "Getting BookStackApp/BookStack..." -RELEASE=$(get_gh_release BookStackApp/BookStack) -echo "Got Version: $RELEASE" +# echo "Getting BookStackApp/BookStack..." +# RELEASE=$(get_gh_release BookStackApp/BookStack) +# echo "Got Version: $RELEASE" -echo "Getting browserless/chrome..." -RELEASE=$(get_gh_release browserless/chrome) -echo "Got Version: $RELEASE" +# echo "Getting browserless/chrome..." +# RELEASE=$(get_gh_release browserless/chrome) +# echo "Got Version: $RELEASE" -echo "Getting Bubka/2FAuth..." -RELEASE=$(get_gh_release Bubka/2FAuth) -echo "Got Version: $RELEASE" +# echo "Getting Bubka/2FAuth..." +# RELEASE=$(get_gh_release Bubka/2FAuth) +# echo "Got Version: $RELEASE" -echo "Getting caddyserver/xcaddy..." -RELEASE=$(get_gh_release caddyserver/xcaddy) -echo "Got Version: $RELEASE" +# echo "Getting caddyserver/xcaddy..." +# RELEASE=$(get_gh_release caddyserver/xcaddy) +# echo "Got Version: $RELEASE" -echo "Getting clusterzx/paperless-ai..." -RELEASE=$(get_gh_release clusterzx/paperless-ai) -echo "Got Version: $RELEASE" +# echo "Getting clusterzx/paperless-ai..." +# RELEASE=$(get_gh_release clusterzx/paperless-ai) +# echo "Got Version: $RELEASE" -echo "Getting cockpit-project/cockpit..." -RELEASE=$(get_gh_release cockpit-project/cockpit) -echo "Got Version: $RELEASE" +# echo "Getting cockpit-project/cockpit..." +# RELEASE=$(get_gh_release cockpit-project/cockpit) +# echo "Got Version: $RELEASE" -echo "Getting community-scripts/ProxmoxVE..." -RELEASE=$(get_gh_release community-scripts/ProxmoxVE) -echo "Got Version: $RELEASE" +# echo "Getting community-scripts/ProxmoxVE..." +# RELEASE=$(get_gh_release community-scripts/ProxmoxVE) +# echo "Got Version: $RELEASE" -echo "Getting CorentinTh/it-tools..." -RELEASE=$(get_gh_release CorentinTh/it-tools) -echo "Got Version: $RELEASE" +# echo "Getting CorentinTh/it-tools..." +# RELEASE=$(get_gh_release CorentinTh/it-tools) +# echo "Got Version: $RELEASE" -echo "Getting dani-garcia/bw_web_builds..." -RELEASE=$(get_gh_release dani-garcia/bw_web_builds) -echo "Got Version: $RELEASE" +# echo "Getting dani-garcia/bw_web_builds..." +# RELEASE=$(get_gh_release dani-garcia/bw_web_builds) +# echo "Got Version: $RELEASE" msg_ok "Done" From 93e721269a0e2de00097ca99784e80f8490f87b1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 11:18:49 +0200 Subject: [PATCH 0342/1614] Update ubuntu-install.sh --- install/ubuntu-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index bdfee69..fe4658b 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -18,9 +18,7 @@ $STD apt-get install -y jq msg_ok "Installed Dependencies" msg_info "Check GH Releases" -echo "Getting 0xERR0R/blocky..." fetch_and_deploy_gh_release 0xERR0R/blocky -echo "Got Version: $RELEASE" # echo "Getting aceberg/WatchYourLAN..." # fetch_and_deploy_gh_release aceberg/WatchYourLAN From 365b023f1385b286f87a6567ba094e97743375ab Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 11:20:20 +0200 Subject: [PATCH 0343/1614] Update install.func --- misc/install.func | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/misc/install.func b/misc/install.func index 19fcca9..1938f1e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -367,10 +367,19 @@ fetch_and_deploy_gh_release() { fi mkdir -p "/opt/$app" - if ! tar -xzf "$tmpdir/$filename" -C "/opt/$app" --strip-components=1; then - msg_error "Failed to extract archive for $app" - rm -rf "$tmpdir" - return 1 + local extracted=false + if tar -tzf "$tmpdir/$filename" | grep -q '/'; then + if tar -xzf "$tmpdir/$filename" -C "/opt/$app" --strip-components=1; then + extracted=true + fi + fi + + if [[ $extracted != true ]]; then + if ! tar -xzf "$tmpdir/$filename" -C "/opt/$app"; then + msg_error "Failed to extract archive for $app" + rm -rf "$tmpdir" + return 1 + fi fi echo "$version" >"/opt/${app}_version.txt" From 08c5cbfc51289e09e34ff02da1516f733fbbbc32 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 11:22:28 +0200 Subject: [PATCH 0344/1614] Update fumadocs-install.sh --- install/fumadocs-install.sh | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/install/fumadocs-install.sh b/install/fumadocs-install.sh index c0a3840..1d7aa07 100644 --- a/install/fumadocs-install.sh +++ b/install/fumadocs-install.sh @@ -14,9 +14,9 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg \ - ca-certificates \ - expect + gnupg \ + ca-certificates \ + expect msg_ok "Installed Dependencies" msg_info "Installing Node.js" @@ -29,26 +29,27 @@ $STD npm install -g pnpm msg_ok "Installed Node.js" msg_info "Installing Fumadocs" -temp_file=$(mktemp) -RELEASE=$(curl -fsSL https://api.github.com/repos/fuma-nama/fumadocs/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}') +fetch_and_deploy_gh_release fuma-nama/fumadocs +# temp_file=$(mktemp) +# RELEASE=$(curl -fsSL https://api.github.com/repos/fuma-nama/fumadocs/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}') export NODE_OPTIONS="--max-old-space-size=4096" -curl -fsSL "https://github.com/fuma-nama/fumadocs/archive/refs/tags/${RELEASE}.tar.gz" -o "$temp_file" -tar -xzf $temp_file -mv fumadocs-* "/opt/fumadocs" +# curl -fsSL "https://github.com/fuma-nama/fumadocs/archive/refs/tags/${RELEASE}.tar.gz" -o "$temp_file" +# tar -xzf $temp_file +# mv fumadocs-* "/opt/fumadocs" cd /opt/fumadocs $STD pnpm install -spawn pnpm create fumadocs-app -expect "Project name" -send "my-app\r" -expect "Choose a template" -send "Next.js: Fumadocs MDX\r" -expect "Use \`/src\` directory?" -send "No\r" -expect "Add default ESLint configuration?" -send "No\r" -expect "Do you want to install packages automatically?*" -send "Yes\r" -expect eof +pnpm create fumadocs-app +# expect "Project name" +# send "my-app\r" +# expect "Choose a template" +# send "Next.js: Fumadocs MDX\r" +# expect "Use \`/src\` directory?" +# send "No\r" +# expect "Add default ESLint configuration?" +# send "No\r" +# expect "Do you want to install packages automatically?*" +# send "Yes\r" +# expect eof echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Fumadocs" @@ -72,7 +73,6 @@ motd_ssh customize msg_info "Cleaning up" -rm -f $temp_file $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From 3637827781f45d47a592d149f559ae5cc7996202 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 11:58:04 +0200 Subject: [PATCH 0345/1614] Update install.func --- misc/install.func | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index 1938f1e..dc59621 100644 --- a/misc/install.func +++ b/misc/install.func @@ -286,6 +286,15 @@ fetch_and_deploy_gh_release() { echo "🔍 Checking latest release for: $repo" + # ensure that jq is installed + if ! command -v jq &>/dev/null; then + apt-get update -qq &>/dev/null + apt-get install -y jq &>/dev/null || { + msg_error "Failed to install jq" + return 1 + } + fi + [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") until [[ $attempt -ge $max_attempts ]]; do @@ -338,7 +347,7 @@ fetch_and_deploy_gh_release() { local version="$tag" - # Bestimme Plattform + # determine platform local os="Linux" local arch="$(uname -m)" case "$arch" in From 27c57b52957586a02d0a8ee18bd5315af101ded5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 12:16:12 +0200 Subject: [PATCH 0346/1614] Update install.func --- misc/install.func | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/misc/install.func b/misc/install.func index dc59621..236d29e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -346,8 +346,11 @@ fetch_and_deploy_gh_release() { fi local version="$tag" + local base_url="https://github.com/$repo/releases/download/v$tag" + local tmpdir + tmpdir=$(mktemp -d) || return 1 - # determine platform + # determine platform for OS/Arch or use tarball local os="Linux" local arch="$(uname -m)" case "$arch" in @@ -362,17 +365,19 @@ fetch_and_deploy_gh_release() { esac local filename="${app}_v${version}_${os}_${arch}.tar.gz" - local url="https://github.com/$repo/releases/download/v${version}/$filename" + local url="$base_url/$filename" - $STD msg_info "Downloading $url" - - local tmpdir - tmpdir=$(mktemp -d) || return 1 + $STD msg_info "Trying download: $url" if ! curl -fsSL -o "$tmpdir/$filename" "$url"; then - msg_error "Failed to download .tar.gz from $url" - rm -rf "$tmpdir" - return 1 + $STD msg_info "Falling back to generic tarball..." + filename="${app}.tar.gz" + url="$base_url/$filename" + if ! curl -fsSL -o "$tmpdir/$filename" "$url"; then + msg_error "Failed to download .tar.gz from both $url and platform-specific fallback." + rm -rf "$tmpdir" + return 1 + fi fi mkdir -p "/opt/$app" @@ -392,8 +397,6 @@ fetch_and_deploy_gh_release() { fi echo "$version" >"/opt/${app}_version.txt" - $STD msg_ok "Deployed $app v$version to /opt/$app" - rm -rf "$tmpdir" } From 0ab98a769b077079801b647f6c645f8b8ade9347 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 13:02:05 +0200 Subject: [PATCH 0347/1614] Update install.func --- misc/install.func | 55 ++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/misc/install.func b/misc/install.func index 236d29e..d5f952b 100644 --- a/misc/install.func +++ b/misc/install.func @@ -288,6 +288,7 @@ fetch_and_deploy_gh_release() { # ensure that jq is installed if ! command -v jq &>/dev/null; then + $STD msg_info "Installing jq..." apt-get update -qq &>/dev/null apt-get install -y jq &>/dev/null || { msg_error "Failed to install jq" @@ -350,34 +351,40 @@ fetch_and_deploy_gh_release() { local tmpdir tmpdir=$(mktemp -d) || return 1 - # determine platform for OS/Arch or use tarball - local os="Linux" - local arch="$(uname -m)" - case "$arch" in - x86_64 | amd64) arch="x86_64" ;; - aarch64 | arm64) arch="arm64" ;; - armv7l) arch="armv7" ;; - armv6l) arch="armv6" ;; - *) - msg_error "Unsupported architecture: $arch" + # Liste der Assets aus der Release-API extrahieren + local assets urls + assets=$(echo "$api_response" | jq -r '.assets[].browser_download_url') || true + + local url="" + for u in $assets; do + if [[ "$u" =~ (x86_64|amd64|arm64|armv7|armv6).*\.tar\.gz$ ]]; then + url="$u" + break + fi + done + + if [[ -z "$url" ]]; then + for u in $assets; do + if [[ "$u" =~ \.tar\.gz$ ]]; then + url="$u" + break + fi + done + fi + + if [[ -z "$url" ]]; then + msg_error "No suitable .tar.gz release asset found for $repo" + rm -rf "$tmpdir" return 1 - ;; - esac + fi - local filename="${app}_v${version}_${os}_${arch}.tar.gz" - local url="$base_url/$filename" - - $STD msg_info "Trying download: $url" + local filename="${url##*/}" + $STD msg_info "Downloading $url" if ! curl -fsSL -o "$tmpdir/$filename" "$url"; then - $STD msg_info "Falling back to generic tarball..." - filename="${app}.tar.gz" - url="$base_url/$filename" - if ! curl -fsSL -o "$tmpdir/$filename" "$url"; then - msg_error "Failed to download .tar.gz from both $url and platform-specific fallback." - rm -rf "$tmpdir" - return 1 - fi + msg_error "Failed to download $filename from $url" + rm -rf "$tmpdir" + return 1 fi mkdir -p "/opt/$app" From 7c4c4af751d5b2205f2313af57c539a59685afb4 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Mon, 7 Apr 2025 08:05:53 -0400 Subject: [PATCH 0348/1614] Immich: formatting changes --- install/immich-install.sh | 242 +++++++++++++++++++------------------- 1 file changed, 121 insertions(+), 121 deletions(-) diff --git a/install/immich-install.sh b/install/immich-install.sh index 9eaba75..4706b38 100644 --- a/install/immich-install.sh +++ b/install/immich-install.sh @@ -21,8 +21,8 @@ echo "deb http://deb.debian.org/debian testing main contrib" >/etc/apt/sources.l echo "Pin-Priority: -10" } >/etc/apt/preferences.d/immich -$STD apt-get update -$STD apt-get install --no-install-recommends -y \ +"$STD" apt-get update +"$STD" apt-get install --no-install-recommends -y \ git \ redis \ python3-venv \ @@ -68,7 +68,7 @@ $STD apt-get install --no-install-recommends -y \ zlib1g \ ocl-icd-libopencl1 \ intel-media-va-driver -$STD apt-get install -y \ +"$STD" apt-get install -y \ libgdk-pixbuf-2.0-dev librsvg2-dev libtool curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg DPKG_ARCHITECTURE="$(dpkg --print-architecture)" @@ -81,49 +81,49 @@ Components: main Architectures: ${DPKG_ARCHITECTURE} Signed-By: /etc/apt/keyrings/jellyfin.gpg EOF -$STD apt-get update -$STD apt-get install -y jellyfin-ffmpeg7 +"$STD" apt-get update +"$STD" apt-get install -y jellyfin-ffmpeg7 ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe tmp_dir=$(mktemp -d) -cd $tmp_dir +cd "$tmp_dir" || exit curl -fsSL https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17193.4/intel-igc-core_1.0.17193.4_amd64.deb -O curl -fsSL https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17193.4/intel-igc-opencl_1.0.17193.4_amd64.deb -O curl -fsSL https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/intel-opencl-icd_24.26.30049.6_amd64.deb -O curl -fsSL https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/libigdgmm12_22.3.20_amd64.deb -O -$STD dpkg -i ./*.deb +"$STD" dpkg -i ./*.deb msg_ok "Base Dependencies Installed" msg_info "Setting up Postgresql Database" -$STD apt-get install -y postgresql-common +"$STD" apt-get install -y postgresql-common echo "YES" | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh &>/dev/null -$STD apt-get install -y postgresql-17 postgresql-17-pgvector +"$STD" apt-get install -y postgresql-17 postgresql-17-pgvector DB_NAME="immich" DB_USER="immich" DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c18) -$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH ENCRYPTED PASSWORD '$DB_PASS';" -$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" -$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;" -$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" +"$STD" sudo -u postgres psql -c "CREATE USER $DB_USER WITH ENCRYPTED PASSWORD '$DB_PASS';" +"$STD" sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +"$STD" sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;" +"$STD" sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" { echo "${APPLICATION} DB Credentials" echo "Database User: $DB_USER" echo "Database Password: $DB_PASS" echo "Database Name: $DB_NAME" -} >>~/${APPLICATION}.creds +} >>~/"$APPLICATION".creds msg_ok "Set up Postgresql Database" msg_info "Installing NodeJS" curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs +"$STD" apt-get update +"$STD" apt-get install -y nodejs msg_ok "Installed NodeJS" msg_info "Installing Packages from Testing Repo" export APT_LISTCHANGES_FRONTEND=none export DEBIAN_FRONTEND=noninteractive -$STD apt-get install -t testing --no-install-recommends -y \ +"$STD" apt-get install -t testing --no-install-recommends -y \ libio-compress-brotli-perl \ libwebp7 \ libwebpdemux2 \ @@ -135,31 +135,31 @@ $STD apt-get install -t testing --no-install-recommends -y \ msg_ok "Packages from Testing Repo Installed" # Fix default DB collation issue -$STD sudo -u postgres psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;" -$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME REFRESH COLLATION VERSION;" +"$STD" sudo -u postgres psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;" +"$STD" sudo -u postgres psql -c "ALTER DATABASE $DB_NAME REFRESH COLLATION VERSION;" msg_info "Compiling Custom Photo-processing Library (extreme patience)" STAGING_DIR=/opt/staging BASE_REPO="https://github.com/immich-app/base-images" BASE_DIR=${STAGING_DIR}/base-images SOURCE_DIR=${STAGING_DIR}/image-source -$STD git clone -b main ${BASE_REPO} ${BASE_DIR} # TODO: convert this git clone into a TAG download -mkdir -p ${SOURCE_DIR} +"$STD" git clone -b main "$BASE_REPO" "$BASE_DIR" # TODO: convert this git clone into a TAG download +mkdir -p "$SOURCE_DIR" -cd ${STAGING_DIR} +cd "$STAGING_DIR" || exit SOURCE=${SOURCE_DIR}/libjxl JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62" JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0" : "${LIBJXL_REVISION:=$(jq -cr '.sources[] | select(.name == "libjxl").revision' $BASE_DIR/server/bin/build-lock.json)}" -$STD git clone https://github.com/libjxl/libjxl.git ${SOURCE} -cd ${SOURCE} -$STD git reset --hard "${LIBJXL_REVISION}" -$STD git submodule update --init --recursive --depth 1 --recommend-shallow -$STD git apply ${BASE_DIR}/server/bin/patches/jpegli-empty-dht-marker.patch -$STD git apply ${BASE_DIR}/server/bin/patches/jpegli-icc-warning.patch +"$STD" git clone https://github.com/libjxl/libjxl.git "$SOURCE" +cd "$SOURCE" || exit +"$STD" git reset --hard "$LIBJXL_REVISION" +"$STD" git submodule update --init --recursive --depth 1 --recommend-shallow +"$STD" git apply "$BASE_DIR"/server/bin/patches/jpegli-empty-dht-marker.patch +"$STD" git apply "$BASE_DIR"/server/bin/patches/jpegli-icc-warning.patch mkdir build -cd build -$STD cmake \ +cd build || exit +"$STD" cmake \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING=OFF \ -DJPEGXL_ENABLE_DOXYGEN=OFF \ @@ -173,25 +173,25 @@ $STD cmake \ -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=ON \ -DJPEGXL_INSTALL_JPEGLI_LIBJPEG=ON \ -DJPEGXL_ENABLE_PLUGINS=ON \ - -DJPEGLI_LIBJPEG_LIBRARY_SOVERSION="${JPEGLI_LIBJPEG_LIBRARY_SOVERSION}" \ - -DJPEGLI_LIBJPEG_LIBRARY_VERSION="${JPEGLI_LIBJPEG_LIBRARY_VERSION}" \ + -DJPEGLI_LIBJPEG_LIBRARY_SOVERSION="$JPEGLI_LIBJPEG_LIBRARY_SOVERSION" \ + -DJPEGLI_LIBJPEG_LIBRARY_VERSION="$JPEGLI_LIBJPEG_LIBRARY_VERSION" \ -DLIBJPEG_TURBO_VERSION_NUMBER=2001005 \ .. -$STD cmake --build . -- -j"$(nproc)" -$STD cmake --install . -$STD ldconfig /usr/local/lib -$STD make clean -cd ${STAGING_DIR} -rm -rf ${SOURCE}/{build,third_party} +"$STD" cmake --build . -- -j"$(nproc)" +"$STD" cmake --install . +"$STD" ldconfig /usr/local/lib +"$STD" make clean +cd "$STAGING_DIR" || exit +rm -rf "$SOURCE"/{build,third_party} SOURCE=${SOURCE_DIR}/libheif : "${LIBHEIF_REVISION:=$(jq -cr '.sources[] | select(.name == "libheif").revision' $BASE_DIR/server/bin/build-lock.json)}" -$STD git clone https://github.com/strukturag/libheif.git ${SOURCE} -cd ${SOURCE} -$STD git reset --hard "${LIBHEIF_REVISION}" +"$STD" git clone https://github.com/strukturag/libheif.git "$SOURCE" +cd "$SOURCE" || exit +"$STD" git reset --hard "$LIBHEIF_REVISION" mkdir build -cd build -$STD cmake --preset=release-noplugins \ +cd build || exit +"$STD" cmake --preset=release-noplugins \ -DWITH_DAV1D=ON \ -DENABLE_PARALLEL_TILE_DECODING=ON \ -DWITH_LIBSHARPYUV=ON \ @@ -201,108 +201,108 @@ $STD cmake --preset=release-noplugins \ -DWITH_X265=OFF \ -DWITH_EXAMPLES=OFF \ .. -$STD make install +"$STD" make install ldconfig /usr/local/lib -$STD make clean -cd ${STAGING_DIR} -rm -rf ${SOURCE}/build +"$STD" make clean +cd "$STAGING_DIR" || exit +rm -rf "$SOURCE"/build SOURCE=${SOURCE_DIR}/libraw : "${LIBRAW_REVISION:=$(jq -cr '.sources[] | select(.name == "libraw").revision' $BASE_DIR/server/bin/build-lock.json)}" -$STD git clone https://github.com/libraw/libraw.git ${SOURCE} -cd ${SOURCE} -$STD git reset --hard "${LIBRAW_REVISION}" -$STD autoreconf --install -$STD ./configure -$STD make -j"$(nproc)" -$STD make install +"$STD" git clone https://github.com/libraw/libraw.git "$SOURCE" +cd "$SOURCE" || exit +"$STD" git reset --hard "$LIBRAW_REVISION" +"$STD" autoreconf --install +"$STD" ./configure +"$STD" make -j"$(nproc)" +"$STD" make install ldconfig /usr/local/lib -$STD make clean -cd ${STAGING_DIR} +"$STD" make clean +cd "$STAGING_DIR" || exit SOURCE=$SOURCE_DIR/imagemagick : "${IMAGEMAGICK_REVISION:=$(jq -cr '.sources[] | select(.name == "imagemagick").revision' $BASE_DIR/server/bin/build-lock.json)}" -$STD git clone https://github.com/ImageMagick/ImageMagick.git $SOURCE -cd $SOURCE -$STD git reset --hard "${IMAGEMAGICK_REVISION}" -$STD ./configure --with-modules -$STD make -j"$(nproc)" -$STD make install +"$STD" git clone https://github.com/ImageMagick/ImageMagick.git "$SOURCE" +cd "$SOURCE" || exit +"$STD" git reset --hard "$IMAGEMAGICK_REVISION" +"$STD" ./configure --with-modules +"$STD" make -j"$(nproc)" +"$STD" make install ldconfig /usr/local/lib -$STD make clean -cd ${STAGING_DIR} +"$STD" make clean +cd "$STAGING_DIR" || exit SOURCE=$SOURCE_DIR/libvips : "${LIBVIPS_REVISION:=$(jq -cr '.sources[] | select(.name == "libvips").revision' $BASE_DIR/server/bin/build-lock.json)}" -$STD git clone https://github.com/libvips/libvips.git ${SOURCE} -cd ${SOURCE} -$STD git reset --hard "${LIBVIPS_REVISION}" -$STD meson setup build --buildtype=release --libdir=lib -Dintrospection=disabled -Dtiff=disabled -cd build -$STD ninja install -$STD ldconfig /usr/local/lib -cd ${STAGING_DIR} -rm -rf ${SOURCE}/build +"$STD" git clone https://github.com/libvips/libvips.git "$SOURCE" +cd "$SOURCE" || exit +"$STD" git reset --hard "$LIBVIPS_REVISION" +"$STD" meson setup build --buildtype=release --libdir=lib -Dintrospection=disabled -Dtiff=disabled +cd build || exit +"$STD" ninja install +"$STD" ldconfig /usr/local/lib +cd "$STAGING_DIR" || exit +rm -rf "$SOURCE"/build msg_ok "Custom Photo-processing Library Compiled" msg_info "Installing ${APPLICATION} (more patience please)" tmp_file=$(mktemp) RELEASE=$(curl -s https://api.github.com/repos/immich-app/immich/releases?per_page=1 | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/immich-app/immich/archive/refs/tags/v${RELEASE}.zip" -o $tmp_file -unzip -q $tmp_file +curl -fsSL "https://github.com/immich-app/immich/archive/refs/tags/v${RELEASE}.zip" -o "$tmp_file" +unzip -q "$tmp_file" INSTALL_DIR="/opt/${APPLICATION}" UPLOAD_DIR="${INSTALL_DIR}/upload" SRC_DIR="${INSTALL_DIR}/source" APP_DIR="${INSTALL_DIR}/app" ML_DIR="${APP_DIR}/machine-learning" GEO_DIR="${INSTALL_DIR}/geodata" -mkdir -p ${INSTALL_DIR} -mv ${APPLICATION}-${RELEASE}/ ${SRC_DIR} -mkdir -p {${APP_DIR},${UPLOAD_DIR},${GEO_DIR},${ML_DIR},${INSTALL_DIR}/.cache} +mkdir -p "$INSTALL_DIR" +mv "$APPLICATION-$RELEASE"/ "$SRC_DIR" +mkdir -p "{$APP_DIR,$UPLOAD_DIR,$GEO_DIR,$ML_DIR,$INSTALL_DIR/.cache}" -cd ${SRC_DIR}/server -$STD npm ci -$STD npm run build -$STD npm prune --omit=dev --omit=optional -cd ${SRC_DIR}/open-api/typescript-sdk -$STD npm ci -$STD npm run build -cd ${SRC_DIR}/web -$STD npm ci -$STD npm run build -cd ${SRC_DIR} -cp -a server/{node_modules,dist,bin,resources,package.json,package-lock.json,start*.sh} ${APP_DIR}/ -cp -a web/build ${APP_DIR}/www -cp LICENSE ${APP_DIR} -cp ${BASE_DIR}/server/bin/build-lock.json ${APP_DIR} +cd "$SRC_DIR"/server || exit +"$STD" npm ci +"$STD" npm run build +"$STD" npm prune --omit=dev --omit=optional +cd "$SRC_DIR"/open-api/typescript-sdk || exit +"$STD" npm ci +"$STD" npm run build +cd "$SRC_DIR"/web || exit +"$STD" npm ci +"$STD" npm run build +cd "$SRC_DIR" || exit +cp -a server/{node_modules,dist,bin,resources,package.json,package-lock.json,start*.sh} "$APP_DIR"/ +cp -a web/build "$APP_DIR"/www +cp LICENSE "$APP_DIR" +cp "$BASE_DIR"/server/bin/build-lock.json "$APP_DIR" -cd ${SRC_DIR}/machine-learning -$STD python3 -m venv ${ML_DIR}/ml-venv +cd "$SRC_DIR"/machine-learning || exit +"$STD" python3 -m venv "$ML_DIR"/ml-venv ( - . ${ML_DIR}/ml-venv/bin/activate - $STD pip3 install uv - $STD uv sync --extra cpu --active + . "$ML_DIR"/ml-venv/bin/activate + "$STD" pip3 install uv + "$STD" uv sync --extra cpu --active ) -cd ${SRC_DIR} -cp -a machine-learning/{ann,immich_ml} ${ML_DIR} -ln -sf ${APP_DIR}/resources ${INSTALL_DIR} +cd "$SRC_DIR" || exit +cp -a machine-learning/{ann,immich_ml} "$ML_DIR" +ln -sf "$APP_DIR"/resources "$INSTALL_DIR" -cd ${APP_DIR} +cd "$APP_DIR" || exit grep -RlI /usr/src . --exclude="*.py*" --exclude="*.json" | xargs -n1 sed -i "s|\/usr/src|$INSTALL_DIR|g" # sed -i "s|\"/cache\"|\"$INSTALL_DIR/cache\"|g" $ML_DIR/immich_ml/config.py grep -RlE "'/build'" | xargs -n1 sed -i "s|'/build'|'$APP_DIR'|g" -ln -s ${UPLOAD_DIR} ${APP_DIR}/upload -ln -s ${UPLOAD_DIR} ${ML_DIR}/upload +ln -s "$UPLOAD_DIR" "$APP_DIR"/upload +ln -s "$UPLOAD_DIR" "$ML_DIR"/upload msg_info "Installing Immich CLI" -$STD npm install --build-from-source sharp -rm -rf ${APP_DIR}/node_modules/@img/sharp-{libvips*,linuxmusl-x64} -$STD npm i -g @immich/cli +"$STD" npm install --build-from-source sharp +rm -rf "$APP_DIR"/node_modules/@img/sharp-{libvips*,linuxmusl-x64} +"$STD" npm i -g @immich/cli msg_ok "Installed Immich CLI" msg_info "Installing GeoNames data" -cd ${GEO_DIR} +cd "$GEO_DIR" || exit URL_LIST=( https://download.geonames.org/export/dump/admin1CodesASCII.txt https://download.geonames.org/export/dump/admin2Codes.txt @@ -312,17 +312,17 @@ URL_LIST=( echo "${URL_LIST[@]}" | xargs -n1 -P 8 wget -q unzip -q cities500.zip date --iso-8601=seconds | tr -d "\n" >geodata-date.txt -cd ${INSTALL_DIR} -ln -s ${GEO_DIR} ${APP_DIR} +cd "$INSTALL_DIR" || exit +ln -s "$GEO_DIR" "$APP_DIR" msg_ok "Installed GeoNames data" mkdir -p /var/log/immich touch /var/log/immich/{web.log,ml.log} -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +echo "$RELEASE" >/opt/"${APPLICATION}"_version.txt msg_ok "Installed ${APPLICATION}" msg_info "Creating env file, scripts & services" -cat <${INSTALL_DIR}/.env +cat <"${INSTALL_DIR}"/.env TZ=$(cat /etc/timezone) IMMICH_VERSION=release IMMICH_ENV=production @@ -337,7 +337,7 @@ REDIS_HOSTNAME=localhost MACHINE_LEARNING_CACHE_FOLDER=${INSTALL_DIR}/.cache EOF -cat <${ML_DIR}/ml_start.sh +cat <"${ML_DIR}"/ml_start.sh #!/usr/bin/env bash cd ${ML_DIR} @@ -345,8 +345,8 @@ cd ${ML_DIR} python -m immich_ml EOF -chmod +x ${ML_DIR}/ml_start.sh -cat </etc/systemd/system/${APPLICATION}-web.service +chmod +x "$ML_DIR"/ml_start.sh +cat </etc/systemd/system/"${APPLICATION}"-web.service [Unit] Description=${APPLICATION} Web Service After=network.target @@ -368,7 +368,7 @@ StandardError=append:/var/log/immich/web.log [Install] WantedBy=multi-user.target EOF -cat </etc/systemd/system/${APPLICATION}-ml.service +cat </etc/systemd/system/"${APPLICATION}"-ml.service [Unit] Description=${APPLICATION} Machine-Learning After=network.target @@ -387,7 +387,7 @@ StandardError=append:/var/log/immich/ml.log [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now ${APPLICATION}-ml.service ${APPLICATION}-web.service +systemctl enable -q --now "$APPLICATION"-ml.service "$APPLICATION"-web.service msg_ok "Created env file, scripts and services" sed -i "$ a VERSION_ID=12" /etc/os-release # otherwise the motd_ssh function will fail @@ -395,8 +395,8 @@ motd_ssh customize msg_info "Cleaning up" -rm -f $tmp_file -rm -rf $tmp_dir -$STD apt-get -y autoremove -$STD apt-get -y autoclean +rm -f "$tmp_file" +rm -rf "$tmp_dir" +"$STD" apt-get -y autoremove +"$STD" apt-get -y autoclean msg_ok "Cleaned" From 216a2d19d6433087bcca5e743ce2971d08b98321 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Mon, 7 Apr 2025 12:37:29 +0000 Subject: [PATCH 0349/1614] Update versions.json --- frontend/public/json/versions.json | 156 ++++++++++++++++------------- 1 file changed, 88 insertions(+), 68 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index a8e86dd..f221d52 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,13 +1,93 @@ [ + { + "name": "Graylog2/graylog2-server", + "version": "6.2.0-beta.4", + "date": "2025-04-07T11:28:13Z" + }, + { + "name": "VictoriaMetrics/VictoriaMetrics", + "version": "pmm-6401-v1.115.0", + "date": "2025-04-07T11:15:53Z" + }, { "name": "semaphoreui/semaphore", - "version": "v2.13.8", - "date": "2025-04-06T20:59:11Z" + "version": "v2.13.10", + "date": "2025-04-07T11:05:41Z" }, { "name": "fhem/fhem-mirror", "version": "6.2", - "date": "2025-04-06T20:28:01Z" + "date": "2025-04-07T10:34:55Z" + }, + { + "name": "syncthing/syncthing", + "version": "v1.29.4", + "date": "2025-04-01T08:45:07Z" + }, + { + "name": "fallenbagel/jellyseerr", + "version": "preview-back-to-axios", + "date": "2025-04-07T09:23:08Z" + }, + { + "name": "zwave-js/zwave-js-ui", + "version": "v10.1.5", + "date": "2025-04-07T09:19:35Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.4.0b4-rc1", + "date": "2025-04-07T09:13:56Z" + }, + { + "name": "redis/redis", + "version": "8.0-rc1-int2", + "date": "2025-04-02T19:05:08Z" + }, + { + "name": "zabbix/zabbix", + "version": "7.4.0beta1", + "date": "2025-04-07T08:14:13Z" + }, + { + "name": "StarFleetCPTN/GoMFT", + "version": "v0.2.5", + "date": "2025-04-07T07:43:29Z" + }, + { + "name": "nzbgetcom/nzbget", + "version": "v24.8", + "date": "2025-03-18T07:33:51Z" + }, + { + "name": "mattermost/mattermost", + "version": "server/public/v0.1.11", + "date": "2025-03-28T14:04:31Z" + }, + { + "name": "morpheus65535/bazarr", + "version": "v1.5.1", + "date": "2025-01-01T16:15:52Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1740", + "date": "2025-04-07T05:56:22Z" + }, + { + "name": "prometheus/prometheus", + "version": "v0.303.0-rc.1", + "date": "2025-04-07T04:39:38Z" + }, + { + "name": "open-webui/open-webui", + "version": "v0.6.2", + "date": "2025-04-07T03:41:23Z" + }, + { + "name": "firefly-iii/firefly-iii", + "version": "v6.2.10", + "date": "2025-03-22T13:02:26Z" }, { "name": "Luligu/matterbridge", @@ -41,8 +121,8 @@ }, { "name": "runtipi/runtipi", - "version": "e2e", - "date": "2025-03-23T22:08:04Z" + "version": "v3.10.0", + "date": "2025-03-15T14:38:16Z" }, { "name": "stackblitz-labs/bolt.diy", @@ -70,9 +150,9 @@ "date": "2025-04-06T11:56:18Z" }, { - "name": "fallenbagel/jellyseerr", - "version": "preview-back-to-axios", - "date": "2025-04-06T10:39:06Z" + "name": "TechnitiumSoftware/DnsServer", + "version": "v13.5.0", + "date": "2025-04-06T11:24:50Z" }, { "name": "TriliumNext/Notes", @@ -84,21 +164,11 @@ "version": "2.32.0", "date": "2025-04-06T09:43:51Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1733", - "date": "2025-04-06T06:00:36Z" - }, { "name": "inventree/InvenTree", "version": "0.17.10", "date": "2025-04-06T05:31:49Z" }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.10", - "date": "2025-03-22T13:02:26Z" - }, { "name": "ollama/ollama", "version": "v0.6.5-rc0", @@ -124,11 +194,6 @@ "version": "v1.0.2", "date": "2025-04-05T17:40:25Z" }, - { - "name": "open-webui/open-webui", - "version": "v0.6.1", - "date": "2025-04-05T17:15:47Z" - }, { "name": "keycloak/keycloak", "version": "26.1.4", @@ -184,21 +249,11 @@ "version": "5.7.0", "date": "2025-04-04T18:10:16Z" }, - { - "name": "syncthing/syncthing", - "version": "v1.29.4", - "date": "2025-04-01T08:45:07Z" - }, { "name": "icereed/paperless-gpt", "version": "v0.14.4", "date": "2025-04-04T14:18:53Z" }, - { - "name": "nzbgetcom/nzbget", - "version": "v24.8", - "date": "2025-03-18T07:33:51Z" - }, { "name": "apache/tomcat", "version": "9.0.104", @@ -214,11 +269,6 @@ "version": "0.49.12", "date": "2025-04-04T07:31:08Z" }, - { - "name": "morpheus65535/bazarr", - "version": "v1.5.1", - "date": "2025-01-01T16:15:52Z" - }, { "name": "wazuh/wazuh", "version": "coverity-w14-4.12.0", @@ -234,21 +284,11 @@ "version": "1.10.3", "date": "2024-11-05T09:20:50Z" }, - { - "name": "Graylog2/graylog2-server", - "version": "6.0.14", - "date": "2025-04-03T07:52:24Z" - }, { "name": "jupyter/notebook", "version": "@jupyter-notebook/ui-components@7.4.0-rc.0", "date": "2025-04-03T06:49:38Z" }, - { - "name": "mattermost/mattermost", - "version": "server/public/v0.1.11", - "date": "2025-03-28T14:04:31Z" - }, { "name": "rabbitmq/rabbitmq-server", "version": "v4.0.8", @@ -259,11 +299,6 @@ "version": "v5.35.1", "date": "2025-04-02T21:49:00Z" }, - { - "name": "redis/redis", - "version": "8.0-rc1-int2", - "date": "2025-04-02T19:05:08Z" - }, { "name": "zitadel/zitadel", "version": "v2.63.9", @@ -284,21 +319,11 @@ "version": "jenkins-2.503", "date": "2025-04-02T15:12:13Z" }, - { - "name": "Checkmk/checkmk", - "version": "v2.4.0b3", - "date": "2025-04-02T14:39:56Z" - }, { "name": "hargata/lubelog", "version": "v1.4.6", "date": "2025-04-02T14:07:12Z" }, - { - "name": "zwave-js/zwave-js-ui", - "version": "v10.1.4", - "date": "2025-04-02T09:38:52Z" - }, { "name": "immich-app/immich", "version": "v1.131.3", @@ -379,11 +404,6 @@ "version": "4.8.11.0", "date": "2025-03-10T06:39:11Z" }, - { - "name": "StarFleetCPTN/GoMFT", - "version": "v0.2.4", - "date": "2025-03-30T19:46:08Z" - }, { "name": "louislam/dockge", "version": "1.5.0", From 6171153dc6ac730f5e13ffa00df096aaa5c21819 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:09:43 +0200 Subject: [PATCH 0350/1614] testing --- ct/musicassistant.sh | 40 +++++++++++++++++ install/musicassistant-install.sh | 71 +++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 ct/musicassistant.sh create mode 100644 install/musicassistant-install.sh diff --git a/ct/musicassistant.sh b/ct/musicassistant.sh new file mode 100644 index 0000000..62bc4a2 --- /dev/null +++ b/ct/musicassistant.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/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/music-assistant/server + +APP="MusicAssistant" +var_tags="${var_tags:-music}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-7}" +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 [[ ! -d /opt/musicassistant ]]; then + msg_error "No Installation Found!" + exit + fi +} + +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}meilisearch: http://${IP}:8095${CL}" diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh new file mode 100644 index 0000000..7351f12 --- /dev/null +++ b/install/musicassistant-install.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# License: MIT +# Source: https://github.com/music-assistant/server + +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 \ + ffmpeg \ + build-essential \ + libffi-dev \ + libssl-dev \ + libjpeg-dev \ + zlib1g-dev \ + pkg-config +msg_ok "Installed Dependencies" + +msg_info "Setup Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip \ + python3-venv +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Setup Python3" + +msg_info "Setup Music Assistant" +fetch_and_deploy_gh_release music-assistant/server +python3 -m venv /opt/musicassistant/venv +source /opt/musicassistant/venv/bin/activate +pip install --upgrade pip setuptools wheel +pip install . +msg_ok "Setup Music Assistant" + +msg_info "Creating systemd service" +cat </etc/systemd/system/musicassistant.service +[Unit] +Description=Music Assistant +After=network-online.target + +[Service] +Type=simple +WorkingDirectory=/opt/musicassistant +Environment="PATH=/opt/musicassistant/venv/bin" +ExecStart=/opt/musicassistant/venv/bin/mass +Restart=always +RestartForceExitStatus=100 + +[Install] +WantedBy=multi-user.target +EOF + +systemctl daemon-reexec +systemctl enable -q --now musicassistant +msg_ok "Started Music Assistant" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 2c5026d9b18ea5fb39c940210b2738976f377a5b Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 7 Apr 2025 13:10:29 +0000 Subject: [PATCH 0351/1614] Update .app files --- ct/headers/musicassistant | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/musicassistant diff --git a/ct/headers/musicassistant b/ct/headers/musicassistant new file mode 100644 index 0000000..afdf3a5 --- /dev/null +++ b/ct/headers/musicassistant @@ -0,0 +1,6 @@ + __ ___ _ ___ _ __ __ + / |/ /_ _______(_)____/ | __________(_)____/ /_____ _____ / /_ + / /|_/ / / / / ___/ / ___/ /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ + / / / / /_/ (__ ) / /__/ ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_/ /_/\__,_/____/_/\___/_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ + From bce892e76e20aeb372f055b761fffcf96e531a06 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:11:36 +0200 Subject: [PATCH 0352/1614] Create musicassistant.json --- frontend/public/json/musicassistant.json | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 frontend/public/json/musicassistant.json diff --git a/frontend/public/json/musicassistant.json b/frontend/public/json/musicassistant.json new file mode 100644 index 0000000..952234f --- /dev/null +++ b/frontend/public/json/musicassistant.json @@ -0,0 +1,34 @@ +{ + "name": "MusicAssistant", + "slug": "musicassistant", + "categories": [ + 13 + ], + "date_created": "2025-04-07", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 8095, + "documentation": "https://www.music-assistant.io/", + "website": "https://github.com/music-assistant/server", + "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/music-assistant.svg", + "description": "Music Assistant is a free, opensource Media library manager that connects to your streaming services and a wide range of connected speakers. The server is the beating heart, the core of Music Assistant and must run on an always-on device like a Raspberry Pi, a NAS or an Intel NUC or alike.", + "install_methods": [ + { + "type": "default", + "script": "ct/musicassistant.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 5, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file From 91632b85befc73a7d6dfe9d5caad18410cb5acbb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:18:57 +0200 Subject: [PATCH 0353/1614] Update install.func --- misc/install.func | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/misc/install.func b/misc/install.func index d5f952b..e035cd3 100644 --- a/misc/install.func +++ b/misc/install.func @@ -351,7 +351,7 @@ fetch_and_deploy_gh_release() { local tmpdir tmpdir=$(mktemp -d) || return 1 - # Liste der Assets aus der Release-API extrahieren + # Extract list of assets from the Release API local assets urls assets=$(echo "$api_response" | jq -r '.assets[].browser_download_url') || true @@ -372,19 +372,25 @@ fetch_and_deploy_gh_release() { done fi - if [[ -z "$url" ]]; then - msg_error "No suitable .tar.gz release asset found for $repo" - rm -rf "$tmpdir" - return 1 - fi + local filename="" - local filename="${url##*/}" - $STD msg_info "Downloading $url" - - if ! curl -fsSL -o "$tmpdir/$filename" "$url"; then - msg_error "Failed to download $filename from $url" - rm -rf "$tmpdir" - return 1 + if [[ -n "$url" ]]; then + filename="${url##*/}" + $STD msg_info "Downloading $url" + if ! curl -f#SL -o "$tmpdir/$filename" "$url"; then + msg_error "Failed to download $filename from $url" + rm -rf "$tmpdir" + return 1 + fi + else + url="https://github.com/$repo/archive/refs/tags/v$version.tar.gz" + filename="source.tar.gz" + $STD msg_info "Trying GitHub source tarball fallback: $url" + if ! curl -f#SL -o "$tmpdir/$filename" "$url"; then + msg_error "No suitable .tar.gz release asset or fallback source tarball found for $repo" + rm -rf "$tmpdir" + return 1 + fi fi mkdir -p "/opt/$app" From bb06f156de0c73ffba10ba29beedfa4729b83ef5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:24:45 +0200 Subject: [PATCH 0354/1614] Update install.func --- misc/install.func | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/misc/install.func b/misc/install.func index e035cd3..9d38f7e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -372,25 +372,18 @@ fetch_and_deploy_gh_release() { done fi - local filename="" - - if [[ -n "$url" ]]; then - filename="${url##*/}" - $STD msg_info "Downloading $url" - if ! curl -f#SL -o "$tmpdir/$filename" "$url"; then - msg_error "Failed to download $filename from $url" - rm -rf "$tmpdir" - return 1 - fi - else + if [[ -z "$url" ]]; then url="https://github.com/$repo/archive/refs/tags/v$version.tar.gz" - filename="source.tar.gz" $STD msg_info "Trying GitHub source tarball fallback: $url" - if ! curl -f#SL -o "$tmpdir/$filename" "$url"; then - msg_error "No suitable .tar.gz release asset or fallback source tarball found for $repo" - rm -rf "$tmpdir" - return 1 - fi + fi + + local filename="${url##*/}" + $STD msg_info "Downloading $url" + + if ! curl -fsSL -o "$tmpdir/$filename" "$url"; then + msg_error "No suitable .tar.gz release asset or fallback source tarball found for $repo" + rm -rf "$tmpdir" + return 1 fi mkdir -p "/opt/$app" From 0f3de050c636ebdbcda830bfde7acaedd999adb9 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:30:58 +0200 Subject: [PATCH 0355/1614] Update install.func --- misc/install.func | 61 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/misc/install.func b/misc/install.func index 9d38f7e..91a5d9f 100644 --- a/misc/install.func +++ b/misc/install.func @@ -283,9 +283,17 @@ fetch_and_deploy_gh_release() { local attempt=0 local max_attempts=3 local api_response tag http_code + local current_version="" + local curl_timeout="--connect-timeout 10 --max-time 30" echo "🔍 Checking latest release for: $repo" + # Check if the app directory exists and if there's a version file + if [[ -f "/opt/${app}_version.txt" ]]; then + current_version=$(cat "/opt/${app}_version.txt") + $STD msg_info "Current version: $current_version" + fi + # ensure that jq is installed if ! command -v jq &>/dev/null; then $STD msg_info "Installing jq..." @@ -302,7 +310,7 @@ fetch_and_deploy_gh_release() { ((attempt++)) || true $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" - api_response=$(curl -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url") + api_response=$(curl $curl_timeout -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url") http_code="${api_response:(-3)}" if [[ "$http_code" == "404" ]]; then @@ -312,7 +320,7 @@ fetch_and_deploy_gh_release() { if [[ "$http_code" != "200" ]]; then $STD msg_info "Request failed with HTTP $http_code, retrying...\n" - sleep 2 + sleep $((attempt * 2)) continue fi @@ -333,7 +341,7 @@ fetch_and_deploy_gh_release() { if [[ -z "$tag" ]]; then $STD msg_info "Empty tag received, retrying...\n" - sleep 2 + sleep $((attempt * 2)) continue fi @@ -346,6 +354,12 @@ fetch_and_deploy_gh_release() { exit 1 fi + # Version comparison (if we already have this version, skip) + if [[ "$current_version" == "$tag" ]]; then + $STD msg_info "Already running the latest version ($tag). Skipping update." + return 0 + fi + local version="$tag" local base_url="https://github.com/$repo/releases/download/v$tag" local tmpdir @@ -355,23 +369,56 @@ fetch_and_deploy_gh_release() { local assets urls assets=$(echo "$api_response" | jq -r '.assets[].browser_download_url') || true + # Detect current architecture + local arch + if command -v dpkg &>/dev/null; then + arch=$(dpkg --print-architecture) + elif command -v uname &>/dev/null; then + case "$(uname -m)" in + x86_64) arch="amd64" ;; + aarch64) arch="arm64" ;; + armv7l) arch="armv7" ;; + armv6l) arch="armv6" ;; + *) arch="unknown" ;; + esac + else + arch="unknown" + fi + $STD msg_info "Detected system architecture: $arch" + + # Try to find a matching asset for our architecture local url="" for u in $assets; do - if [[ "$u" =~ (x86_64|amd64|arm64|armv7|armv6).*\.tar\.gz$ ]]; then + if [[ "$u" =~ $arch.*\.tar\.gz$ ]]; then url="$u" + $STD msg_info "Found matching architecture asset: $url" break fi done + # Fallback to other architectures if our specific one isn't found if [[ -z "$url" ]]; then for u in $assets; do - if [[ "$u" =~ \.tar\.gz$ ]]; then + if [[ "$u" =~ (x86_64|amd64|arm64|armv7|armv6).*\.tar\.gz$ ]]; then url="$u" + $STD msg_info "Architecture-specific asset not found, using: $url" break fi done fi + # Fallback to any tar.gz + if [[ -z "$url" ]]; then + for u in $assets; do + if [[ "$u" =~ \.tar\.gz$ ]]; then + url="$u" + $STD msg_info "Using generic tarball: $url" + break + fi + done + fi + + # Final fallback to GitHub source tarball if [[ -z "$url" ]]; then url="https://github.com/$repo/archive/refs/tags/v$version.tar.gz" $STD msg_info "Trying GitHub source tarball fallback: $url" @@ -380,8 +427,8 @@ fetch_and_deploy_gh_release() { local filename="${url##*/}" $STD msg_info "Downloading $url" - if ! curl -fsSL -o "$tmpdir/$filename" "$url"; then - msg_error "No suitable .tar.gz release asset or fallback source tarball found for $repo" + if ! curl $curl_timeout -fsSL -o "$tmpdir/$filename" "$url"; then + msg_error "Failed to download release asset from $url" rm -rf "$tmpdir" return 1 fi From b71afe3b0f9bc0736f49ebc03cdb931e08051723 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:41:28 +0200 Subject: [PATCH 0356/1614] Update install.func --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index 91a5d9f..12dad58 100644 --- a/misc/install.func +++ b/misc/install.func @@ -420,7 +420,7 @@ fetch_and_deploy_gh_release() { # Final fallback to GitHub source tarball if [[ -z "$url" ]]; then - url="https://github.com/$repo/archive/refs/tags/v$version.tar.gz" + url="https://github.com/$repo/archive/refs/tags/$version.tar.gz" $STD msg_info "Trying GitHub source tarball fallback: $url" fi From aab892a26be4ce07565160e0bb2da4c53cf3131d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:47:19 +0200 Subject: [PATCH 0357/1614] Update musicassistant-install.sh --- install/musicassistant-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh index 7351f12..5ea98ac 100644 --- a/install/musicassistant-install.sh +++ b/install/musicassistant-install.sh @@ -34,8 +34,8 @@ msg_ok "Setup Python3" msg_info "Setup Music Assistant" fetch_and_deploy_gh_release music-assistant/server -python3 -m venv /opt/musicassistant/venv -source /opt/musicassistant/venv/bin/activate +python3 -m venv /opt/server/venv +source /opt/server/venv/bin/activate pip install --upgrade pip setuptools wheel pip install . msg_ok "Setup Music Assistant" @@ -48,9 +48,9 @@ After=network-online.target [Service] Type=simple -WorkingDirectory=/opt/musicassistant -Environment="PATH=/opt/musicassistant/venv/bin" -ExecStart=/opt/musicassistant/venv/bin/mass +WorkingDirectory=/opt/server +Environment="PATH=/opt/server/venv/bin" +ExecStart=/opt/server/venv/bin/mass Restart=always RestartForceExitStatus=100 From 2b44eeae2f04f9f106f951c0b6d8b62b475af655 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:48:17 +0200 Subject: [PATCH 0358/1614] Update install.func --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index 12dad58..e837043 100644 --- a/misc/install.func +++ b/misc/install.func @@ -277,7 +277,7 @@ EOF fetch_and_deploy_gh_release() { local repo="$1" - local app="${repo##*/}" + local app="${APPLICATION}" local api_url="https://api.github.com/repos/$repo/releases/latest" local header=() local attempt=0 From 36bd283211a4edc68ff7d88cb9c0a9c2c0cf89c0 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:48:34 +0200 Subject: [PATCH 0359/1614] Update musicassistant-install.sh --- install/musicassistant-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh index 5ea98ac..7351f12 100644 --- a/install/musicassistant-install.sh +++ b/install/musicassistant-install.sh @@ -34,8 +34,8 @@ msg_ok "Setup Python3" msg_info "Setup Music Assistant" fetch_and_deploy_gh_release music-assistant/server -python3 -m venv /opt/server/venv -source /opt/server/venv/bin/activate +python3 -m venv /opt/musicassistant/venv +source /opt/musicassistant/venv/bin/activate pip install --upgrade pip setuptools wheel pip install . msg_ok "Setup Music Assistant" @@ -48,9 +48,9 @@ After=network-online.target [Service] Type=simple -WorkingDirectory=/opt/server -Environment="PATH=/opt/server/venv/bin" -ExecStart=/opt/server/venv/bin/mass +WorkingDirectory=/opt/musicassistant +Environment="PATH=/opt/musicassistant/venv/bin" +ExecStart=/opt/musicassistant/venv/bin/mass Restart=always RestartForceExitStatus=100 From 55a6d882f1bb35adb7a80e96efff1033d285592c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:57:32 +0200 Subject: [PATCH 0360/1614] Update install.func --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index e837043..4228d3a 100644 --- a/misc/install.func +++ b/misc/install.func @@ -277,7 +277,7 @@ EOF fetch_and_deploy_gh_release() { local repo="$1" - local app="${APPLICATION}" + local app=$(echo ${APPLICATION,,} | tr -d ' ') local api_url="https://api.github.com/repos/$repo/releases/latest" local header=() local attempt=0 From a5628c6b898305b2ea7df1779b084953e28b5d5d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 16:07:04 +0200 Subject: [PATCH 0361/1614] fixes --- ct/musicassistant.sh | 4 ++-- misc/install.func | 19 +++++++------------ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/ct/musicassistant.sh b/ct/musicassistant.sh index 62bc4a2..ad4002d 100644 --- a/ct/musicassistant.sh +++ b/ct/musicassistant.sh @@ -10,8 +10,8 @@ var_tags="${var_tags:-music}" var_cpu="${var_cpu:-2}" var_ram="${var_ram:-2048}" var_disk="${var_disk:-7}" -var_os="${var_os:-debian}" -var_version="${var_version:-12}" +var_os="${var_os:-ubuntu}" +var_version="${var_version:-24.10}" var_unprivileged="${var_unprivileged:-1}" header_info "$APP" diff --git a/misc/install.func b/misc/install.func index 4228d3a..7b54c5d 100644 --- a/misc/install.func +++ b/misc/install.func @@ -434,19 +434,14 @@ fetch_and_deploy_gh_release() { fi mkdir -p "/opt/$app" - local extracted=false - if tar -tzf "$tmpdir/$filename" | grep -q '/'; then - if tar -xzf "$tmpdir/$filename" -C "/opt/$app" --strip-components=1; then - extracted=true - fi - fi - if [[ $extracted != true ]]; then - if ! tar -xzf "$tmpdir/$filename" -C "/opt/$app"; then - msg_error "Failed to extract archive for $app" - rm -rf "$tmpdir" - return 1 - fi + tar -xzf "$tmpdir/$filename" -C "$tmpdir" + local content_root + content_root=$(find "$tmpdir" -mindepth 1 -maxdepth 1 -type d) + if [[ $(echo "$content_root" | wc -l) -eq 1 ]]; then + cp -r "$content_root"/* "/opt/$app/" + else + cp -r "$tmpdir"/* "/opt/$app/" fi echo "$version" >"/opt/${app}_version.txt" From d571d0026cd53982de08dc699021d3fe10d3fdf7 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 16:27:03 +0200 Subject: [PATCH 0362/1614] Update musicassistant-install.sh --- install/musicassistant-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh index 7351f12..c23e2b4 100644 --- a/install/musicassistant-install.sh +++ b/install/musicassistant-install.sh @@ -34,10 +34,11 @@ msg_ok "Setup Python3" msg_info "Setup Music Assistant" fetch_and_deploy_gh_release music-assistant/server -python3 -m venv /opt/musicassistant/venv -source /opt/musicassistant/venv/bin/activate -pip install --upgrade pip setuptools wheel -pip install . +cd /opt/musicassistant +python3 -m venv .venv +source .venv/bin/activate +pip install --upgrade pip uv +uv pip install . msg_ok "Setup Music Assistant" msg_info "Creating systemd service" From 2b8162bba82174a16cfbaae6ef79046ff1fba50c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 16:29:00 +0200 Subject: [PATCH 0363/1614] fixes --- install/musicassistant-install.sh | 2 -- misc/install.func | 2 -- 2 files changed, 4 deletions(-) diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh index c23e2b4..f111f6f 100644 --- a/install/musicassistant-install.sh +++ b/install/musicassistant-install.sh @@ -58,8 +58,6 @@ RestartForceExitStatus=100 [Install] WantedBy=multi-user.target EOF - -systemctl daemon-reexec systemctl enable -q --now musicassistant msg_ok "Started Music Assistant" diff --git a/misc/install.func b/misc/install.func index 7b54c5d..69afe15 100644 --- a/misc/install.func +++ b/misc/install.func @@ -286,8 +286,6 @@ fetch_and_deploy_gh_release() { local current_version="" local curl_timeout="--connect-timeout 10 --max-time 30" - echo "🔍 Checking latest release for: $repo" - # Check if the app directory exists and if there's a version file if [[ -f "/opt/${app}_version.txt" ]]; then current_version=$(cat "/opt/${app}_version.txt") From ab67755e473f59517ae18c6dc27b4db712a876ba Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 7 Apr 2025 16:35:46 +0200 Subject: [PATCH 0364/1614] finalize --- ct/musicassistant.sh | 6 +++--- frontend/public/json/musicassistant.json | 8 ++++---- install/musicassistant-install.sh | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ct/musicassistant.sh b/ct/musicassistant.sh index ad4002d..f6ca699 100644 --- a/ct/musicassistant.sh +++ b/ct/musicassistant.sh @@ -8,8 +8,8 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ APP="MusicAssistant" var_tags="${var_tags:-music}" var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-2048}" -var_disk="${var_disk:-7}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-4}" var_os="${var_os:-ubuntu}" var_version="${var_version:-24.10}" var_unprivileged="${var_unprivileged:-1}" @@ -37,4 +37,4 @@ 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}meilisearch: http://${IP}:8095${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8095${CL}" diff --git a/frontend/public/json/musicassistant.json b/frontend/public/json/musicassistant.json index 952234f..f19f448 100644 --- a/frontend/public/json/musicassistant.json +++ b/frontend/public/json/musicassistant.json @@ -20,9 +20,9 @@ "resources": { "cpu": 1, "ram": 1024, - "hdd": 5, - "os": "Debian", - "version": "12" + "hdd": 4, + "os": "Ubuntu", + "version": "24.10" } } ], @@ -31,4 +31,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh index f111f6f..b91523b 100644 --- a/install/musicassistant-install.sh +++ b/install/musicassistant-install.sh @@ -33,12 +33,12 @@ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Setup Python3" msg_info "Setup Music Assistant" -fetch_and_deploy_gh_release music-assistant/server +$STD fetch_and_deploy_gh_release music-assistant/server cd /opt/musicassistant -python3 -m venv .venv -source .venv/bin/activate -pip install --upgrade pip uv -uv pip install . +$STD python3 -m venv .venv +$STD source .venv/bin/activate +$STD pip install --upgrade pip uv +$STD uv pip install . msg_ok "Setup Music Assistant" msg_info "Creating systemd service" @@ -50,8 +50,8 @@ After=network-online.target [Service] Type=simple WorkingDirectory=/opt/musicassistant -Environment="PATH=/opt/musicassistant/venv/bin" -ExecStart=/opt/musicassistant/venv/bin/mass +Environment="PATH=/opt/musicassistant/.venv/bin" +ExecStart=/opt/musicassistant/.venv/bin/mass Restart=always RestartForceExitStatus=100 From a626ac44fc1d1fe6ae8ce47d59c6fd4e28f65a08 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Tue, 8 Apr 2025 01:22:41 +0000 Subject: [PATCH 0365/1614] Update versions.json --- frontend/public/json/versions.json | 139 +++++++++++++---------------- 1 file changed, 62 insertions(+), 77 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index f221d52..ce8bd8e 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,4 +1,64 @@ [ + { + "name": "pelican-dev/panel", + "version": "v1.0.0-beta19", + "date": "2025-04-07T23:06:29Z" + }, + { + "name": "pelican-dev/wings", + "version": "v1.0.0-beta11", + "date": "2025-04-07T23:02:00Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-07T20:30:04Z" + }, + { + "name": "Threadfin/Threadfin", + "version": "1.2.32", + "date": "2025-04-07T20:01:09Z" + }, + { + "name": "NodeBB/NodeBB", + "version": "v4.2.0", + "date": "2025-03-19T18:34:01Z" + }, + { + "name": "go-gitea/gitea", + "version": "v1.23.7", + "date": "2025-04-07T19:27:52Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.4.0b4", + "date": "2025-04-07T19:14:53Z" + }, + { + "name": "Brandawg93/PeaNUT", + "version": "v5.7.0", + "date": "2025-04-07T16:14:10Z" + }, + { + "name": "openobserve/openobserve", + "version": "v0.14.5", + "date": "2025-04-07T16:09:11Z" + }, + { + "name": "thomiceli/opengist", + "version": "v1.10.0", + "date": "2025-04-07T14:32:15Z" + }, + { + "name": "n8n-io/n8n", + "version": "n8n@1.84.3", + "date": "2025-03-27T11:54:33Z" + }, + { + "name": "apache/cassandra", + "version": "5.0.4-tentative", + "date": "2025-04-07T12:05:05Z" + }, { "name": "Graylog2/graylog2-server", "version": "6.2.0-beta.4", @@ -14,11 +74,6 @@ "version": "v2.13.10", "date": "2025-04-07T11:05:41Z" }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-07T10:34:55Z" - }, { "name": "syncthing/syncthing", "version": "v1.29.4", @@ -34,11 +89,6 @@ "version": "v10.1.5", "date": "2025-04-07T09:19:35Z" }, - { - "name": "Checkmk/checkmk", - "version": "v2.4.0b4-rc1", - "date": "2025-04-07T09:13:56Z" - }, { "name": "redis/redis", "version": "8.0-rc1-int2", @@ -99,11 +149,6 @@ "version": "21.0.1", "date": "2025-04-06T19:22:59Z" }, - { - "name": "pelican-dev/wings", - "version": "v1.0.0-beta11", - "date": "2025-04-06T18:52:35Z" - }, { "name": "stonith404/pingvin-share", "version": "v1.11.1", @@ -171,8 +216,8 @@ }, { "name": "ollama/ollama", - "version": "v0.6.5-rc0", - "date": "2025-04-03T23:57:36Z" + "version": "v0.6.5", + "date": "2025-04-06T00:15:39Z" }, { "name": "jellyfin/jellyfin", @@ -374,11 +419,6 @@ "version": "v2.2.0", "date": "2025-03-31T21:31:48Z" }, - { - "name": "NodeBB/NodeBB", - "version": "v4.2.0", - "date": "2025-03-19T18:34:01Z" - }, { "name": "traefik/traefik", "version": "v3.3.5", @@ -389,11 +429,6 @@ "version": "15.1", "date": "2025-03-31T13:42:20Z" }, - { - "name": "n8n-io/n8n", - "version": "n8n@1.84.3", - "date": "2025-03-27T11:54:33Z" - }, { "name": "documenso/documenso", "version": "v1.10.0-rc.4", @@ -433,55 +468,5 @@ "name": "Readarr/Readarr", "version": "v2.0.0.4645", "date": "2017-03-07T18:56:06Z" - }, - { - "name": "Lidarr/Lidarr", - "version": "v2.10.3.4602", - "date": "2025-03-23T11:00:37Z" - }, - { - "name": "aceberg/WatchYourLAN", - "version": "2.1.2-alpine", - "date": "2025-03-30T06:25:22Z" - }, - { - "name": "pocket-id/pocket-id", - "version": "v0.45.0", - "date": "2025-03-29T23:12:22Z" - }, - { - "name": "glanceapp/glance", - "version": "v0.7.9", - "date": "2025-03-29T18:08:11Z" - }, - { - "name": "tobychui/zoraxy", - "version": "v3.1.9", - "date": "2025-03-01T02:24:33Z" - }, - { - "name": "inspircd/inspircd", - "version": "v4.7.0", - "date": "2025-03-29T03:50:50Z" - }, - { - "name": "bunkerity/bunkerweb", - "version": "v1.6.1", - "date": "2025-03-15T17:29:17Z" - }, - { - "name": "OliveTin/OliveTin", - "version": "2025.3.28", - "date": "2025-03-29T00:18:56Z" - }, - { - "name": "TasmoAdmin/TasmoAdmin", - "version": "v4.2.3", - "date": "2025-02-09T23:07:48Z" - }, - { - "name": "gristlabs/grist-core", - "version": "v1.5.0", - "date": "2025-03-28T20:43:51Z" } ] From 29b7f5ca065e34ec63e75dc0c68dee8a1179e3ee Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 09:18:33 +0200 Subject: [PATCH 0366/1614] Update build.func --- misc/build.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 63d4db7..a66f64c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -146,14 +146,14 @@ msg_info() { msg_ok() { local msg="$1" stop_spinner - printf "\r\e[2K%s %b\n" "${CM}" "${GN}${msg}${CL}" >&2 + printf "${CM}" "${GN}${msg}${CL}" >&2 unset MSG_INFO_SHOWN["$msg"] } msg_error() { stop_spinner local msg="$1" - printf "\r\e[2K%s %b\n" "${CROSS}" "${RD}${msg}${CL}" >&2 + printf "${CROSS}" "${RD}${msg}${CL}" >&2 log_message "ERROR" "$msg" } From 558af8cbfb590f76cec68a39d550e0661bf3c57a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 09:29:07 +0200 Subject: [PATCH 0367/1614] Update build.func --- misc/build.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index a66f64c..3626404 100644 --- a/misc/build.func +++ b/misc/build.func @@ -146,14 +146,14 @@ msg_info() { msg_ok() { local msg="$1" stop_spinner - printf "${CM}" "${GN}${msg}${CL}" >&2 + printf "\r\e[2K%s %b\n""${CM}" "${GN}${msg}${CL}" >&2 unset MSG_INFO_SHOWN["$msg"] } msg_error() { stop_spinner local msg="$1" - printf "${CROSS}" "${RD}${msg}${CL}" >&2 + printf "\r\e[2K%s %b\n""${CROSS}" "${RD}${msg}${CL}" >&2 log_message "ERROR" "$msg" } From fe6e37dd192c5ce8f0b154dd265ff5e014dd82cb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 09:34:08 +0200 Subject: [PATCH 0368/1614] Update build.func --- misc/build.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 3626404..63d4db7 100644 --- a/misc/build.func +++ b/misc/build.func @@ -146,14 +146,14 @@ msg_info() { msg_ok() { local msg="$1" stop_spinner - printf "\r\e[2K%s %b\n""${CM}" "${GN}${msg}${CL}" >&2 + printf "\r\e[2K%s %b\n" "${CM}" "${GN}${msg}${CL}" >&2 unset MSG_INFO_SHOWN["$msg"] } msg_error() { stop_spinner local msg="$1" - printf "\r\e[2K%s %b\n""${CROSS}" "${RD}${msg}${CL}" >&2 + printf "\r\e[2K%s %b\n" "${CROSS}" "${RD}${msg}${CL}" >&2 log_message "ERROR" "$msg" } From 5b684a501be473f6024a3f7f04533528acac3cfb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 09:52:12 +0200 Subject: [PATCH 0369/1614] Update musicassistant-install.sh --- install/musicassistant-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh index b91523b..b80739e 100644 --- a/install/musicassistant-install.sh +++ b/install/musicassistant-install.sh @@ -28,6 +28,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip \ + python3-setuptools \ python3-venv rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Setup Python3" @@ -49,8 +50,8 @@ After=network-online.target [Service] Type=simple +User=root WorkingDirectory=/opt/musicassistant -Environment="PATH=/opt/musicassistant/.venv/bin" ExecStart=/opt/musicassistant/.venv/bin/mass Restart=always RestartForceExitStatus=100 From 760d9f0125dbdcdeafa01727df509ec801f3329b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:18:35 +0200 Subject: [PATCH 0370/1614] remove os selection --- misc/build.func | 238 ++++++++++++++++++++++++------------------------ 1 file changed, 119 insertions(+), 119 deletions(-) diff --git a/misc/build.func b/misc/build.func index 63d4db7..9229116 100644 --- a/misc/build.func +++ b/misc/build.func @@ -434,127 +434,127 @@ exit_script() { advanced_settings() { whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 - if [ "$var_os" != "alpine" ]; then - var_default_os="${var_os}" - var_os="" - while [ -z "$var_os" ]; do - if [ "$var_default_os" == "debian" ]; then - if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" ON \ - "ubuntu" "" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_os" ]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - fi - else - exit_script - fi - fi - if [ "$var_default_os" == "ubuntu" ]; then - if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - "debian" "" OFF \ - "ubuntu" "" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_os" ]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - fi - else - exit_script - fi - fi - done - fi + # if [ "$var_os" != "alpine" ]; then + # var_default_os="${var_os}" + # var_os="" + # while [ -z "$var_os" ]; do + # if [ "$var_default_os" == "debian" ]; then + # if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + # "debian" "" ON \ + # "ubuntu" "" OFF \ + # 3>&1 1>&2 2>&3); then + # if [ -n "$var_os" ]; then + # echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + # fi + # else + # exit_script + # fi + # fi + # if [ "$var_default_os" == "ubuntu" ]; then + # if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ + # "debian" "" OFF \ + # "ubuntu" "" ON \ + # 3>&1 1>&2 2>&3); then + # if [ -n "$var_os" ]; then + # echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + # fi + # else + # exit_script + # fi + # fi + # done + # fi - if [ "$var_os" == "debian" ]; then - var_default_version="${var_version}" - var_version="" - while [ -z "$var_version" ]; do - if [ "$var_default_version" == "11" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ - "11" "Bullseye" ON \ - "12" "Bookworm" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - if [ "$var_default_version" == "12" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ - "11" "Bullseye" OFF \ - "12" "Bookworm" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - done - fi + # if [ "$var_os" == "debian" ]; then + # var_default_version="${var_version}" + # var_version="" + # while [ -z "$var_version" ]; do + # if [ "$var_default_version" == "11" ]; then + # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ + # "11" "Bullseye" ON \ + # "12" "Bookworm" OFF \ + # 3>&1 1>&2 2>&3); then + # if [ -n "$var_version" ]; then + # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + # fi + # else + # exit_script + # fi + # fi + # if [ "$var_default_version" == "12" ]; then + # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ + # "11" "Bullseye" OFF \ + # "12" "Bookworm" ON \ + # 3>&1 1>&2 2>&3); then + # if [ -n "$var_version" ]; then + # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + # fi + # else + # exit_script + # fi + # fi + # done + # fi - if [ "$var_os" == "ubuntu" ]; then - var_default_version="${var_version}" - var_version="" - while [ -z "$var_version" ]; do - if [ "$var_default_version" == "20.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - elif [ "$var_default_version" == "22.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" ON \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - elif [ "$var_default_version" == "24.04" ]; then - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" ON \ - "24.10" "Oracular" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - else - if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" OFF \ - "24.04" "Noble" OFF \ - "24.10" "Oracular" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$var_version" ]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - fi - else - exit_script - fi - fi - done - fi + # if [ "$var_os" == "ubuntu" ]; then + # var_default_version="${var_version}" + # var_version="" + # while [ -z "$var_version" ]; do + # if [ "$var_default_version" == "20.04" ]; then + # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + # "20.04" "Focal" ON \ + # "22.04" "Jammy" OFF \ + # "24.04" "Noble" OFF \ + # "24.10" "Oracular" OFF \ + # 3>&1 1>&2 2>&3); then + # if [ -n "$var_version" ]; then + # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + # fi + # else + # exit_script + # fi + # elif [ "$var_default_version" == "22.04" ]; then + # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + # "20.04" "Focal" OFF \ + # "22.04" "Jammy" ON \ + # "24.04" "Noble" OFF \ + # "24.10" "Oracular" OFF \ + # 3>&1 1>&2 2>&3); then + # if [ -n "$var_version" ]; then + # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + # fi + # else + # exit_script + # fi + # elif [ "$var_default_version" == "24.04" ]; then + # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + # "20.04" "Focal" OFF \ + # "22.04" "Jammy" OFF \ + # "24.04" "Noble" ON \ + # "24.10" "Oracular" OFF \ + # 3>&1 1>&2 2>&3); then + # if [ -n "$var_version" ]; then + # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + # fi + # else + # exit_script + # fi + # else + # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + # "20.04" "Focal" OFF \ + # "22.04" "Jammy" OFF \ + # "24.04" "Noble" OFF \ + # "24.10" "Oracular" ON \ + # 3>&1 1>&2 2>&3); then + # if [ -n "$var_version" ]; then + # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + # fi + # else + # exit_script + # fi + # fi + # done + # fi # Setting Default Tag for Advanced Settings TAGS="community-script-dev;${var_tags:-}" CT_DEFAULT_TYPE="${CT_TYPE}" From 7d4b2277edd80b2a3fd57574ccacfbf6e24ce8d4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:19:07 +0200 Subject: [PATCH 0371/1614] Update build.func --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 9229116..6ef1cab 100644 --- a/misc/build.func +++ b/misc/build.func @@ -433,7 +433,7 @@ exit_script() { # This function allows the user to configure advanced settings for the script. advanced_settings() { whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n" 10 58 # if [ "$var_os" != "alpine" ]; then # var_default_os="${var_os}" # var_os="" From 01a0162dadc5e11a752e98d8b423ff095a59db5f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:24:57 +0200 Subject: [PATCH 0372/1614] Update build.func --- misc/build.func | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 6ef1cab..846d1a9 100644 --- a/misc/build.func +++ b/misc/build.func @@ -432,8 +432,7 @@ exit_script() { # This function allows the user to configure advanced settings for the script. advanced_settings() { - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n" 10 58 + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar. \n The default distribution for $APP is: ${var_os} ${var_version} \n" 8 58 # if [ "$var_os" != "alpine" ]; then # var_default_os="${var_os}" # var_os="" @@ -570,6 +569,8 @@ advanced_settings() { if [ "$CT_TYPE" -eq 0 ]; then CT_TYPE_DESC="Privileged" fi + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" fi else From c41f48a2dc84215ec0935778a26e8dca562be53d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:29:11 +0200 Subject: [PATCH 0373/1614] Update build.func --- misc/build.func | 58 ++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/misc/build.func b/misc/build.func index 846d1a9..4321bf6 100644 --- a/misc/build.func +++ b/misc/build.func @@ -558,40 +558,40 @@ advanced_settings() { TAGS="community-script-dev;${var_tags:-}" CT_DEFAULT_TYPE="${CT_TYPE}" CT_TYPE="" + while [ -z "$CT_TYPE" ]; do + TITLE="CONTAINER TYPE" + BACKTITLE="[dev] Proxmox VE Helper Scripts" + HEIGHT=10 + WIDTH=58 + MENU_HEIGHT=2 + if [ "$CT_DEFAULT_TYPE" == "1" ]; then - if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$CT_TYPE" ]; then - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - fi - else - exit_script - fi + DEFAULT_ON="ON" + DEFAULT_OFF="OFF" + else + DEFAULT_ON="OFF" + DEFAULT_OFF="ON" fi - if [ "$CT_DEFAULT_TYPE" == "0" ]; then - if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$CT_TYPE" ]; then - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - fi + CT_TYPE=$(whiptail --backtitle "$BACKTITLE" --title "$TITLE" \ + --radiolist "Choose Type" $HEIGHT $WIDTH $MENU_HEIGHT \ + "1" "Unprivileged" $DEFAULT_ON \ + "0" "Privileged" $DEFAULT_OFF \ + 3>&1 1>&2 2>&3) + RET=$? + if [ $RET -ne 0 ]; then + exit_script + fi + + if [ -n "$CT_TYPE" ]; then + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" else - exit_script + CT_TYPE_DESC="Unprivileged" fi + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" fi done From d8109e02c1d4020020780a5f68cea60167fd9462 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:30:26 +0200 Subject: [PATCH 0374/1614] Update build.func --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 4321bf6..5c5eab8 100644 --- a/misc/build.func +++ b/misc/build.func @@ -432,7 +432,7 @@ exit_script() { # This function allows the user to configure advanced settings for the script. advanced_settings() { - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar. \n The default distribution for $APP is: ${var_os} ${var_version} \n" 8 58 + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 # if [ "$var_os" != "alpine" ]; then # var_default_os="${var_os}" # var_os="" From 18dd89fe18b065bafa06ec92cc67361db447af70 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:33:50 +0200 Subject: [PATCH 0375/1614] Update build.func --- misc/build.func | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 5c5eab8..14d2eae 100644 --- a/misc/build.func +++ b/misc/build.func @@ -559,6 +559,9 @@ advanced_settings() { CT_DEFAULT_TYPE="${CT_TYPE}" CT_TYPE="" + TMP_OUTPUT_FILE=$(mktemp) + trap 'rm -f "$TMP_OUTPUT_FILE"' EXIT + while [ -z "$CT_TYPE" ]; do TITLE="CONTAINER TYPE" BACKTITLE="[dev] Proxmox VE Helper Scripts" @@ -573,22 +576,28 @@ advanced_settings() { DEFAULT_ON="OFF" DEFAULT_OFF="ON" fi - CT_TYPE=$(whiptail --backtitle "$BACKTITLE" --title "$TITLE" \ + + whiptail --backtitle "$BACKTITLE" --title "$TITLE" \ --radiolist "Choose Type" $HEIGHT $WIDTH $MENU_HEIGHT \ "1" "Unprivileged" $DEFAULT_ON \ "0" "Privileged" $DEFAULT_OFF \ - 3>&1 1>&2 2>&3) + 3>&1 1>"$TMP_OUTPUT_FILE" 2>&3 + RET=$? + if [ $RET -ne 0 ]; then exit_script fi + CT_TYPE=$(<"$TMP_OUTPUT_FILE") + if [ -n "$CT_TYPE" ]; then if [ "$CT_TYPE" -eq 0 ]; then CT_TYPE_DESC="Privileged" else CT_TYPE_DESC="Unprivileged" fi + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" From 95387c19bbe91af50a9a747f3c0c3f63129a60fd Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:37:21 +0200 Subject: [PATCH 0376/1614] Update build.func --- misc/build.func | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/misc/build.func b/misc/build.func index 14d2eae..e56e56b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -591,17 +591,18 @@ advanced_settings() { CT_TYPE=$(<"$TMP_OUTPUT_FILE") - if [ -n "$CT_TYPE" ]; then - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - else - CT_TYPE_DESC="Unprivileged" - fi - - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + if [ "$CT_TYPE" == "0" ]; then + CT_TYPE_DESC="Privileged" + elif [ "$CT_TYPE" == "1" ]; then + CT_TYPE_DESC="Unprivileged" + else + CT_TYPE="" + continue fi + + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" done while true; do From 933a94f0fd50a899052b63339b5d1ead7cf2199a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:41:47 +0200 Subject: [PATCH 0377/1614] Update build.func --- misc/build.func | 72 +++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 41 deletions(-) diff --git a/misc/build.func b/misc/build.func index e56e56b..4c11e09 100644 --- a/misc/build.func +++ b/misc/build.func @@ -558,51 +558,41 @@ advanced_settings() { TAGS="community-script-dev;${var_tags:-}" CT_DEFAULT_TYPE="${CT_TYPE}" CT_TYPE="" - - TMP_OUTPUT_FILE=$(mktemp) - trap 'rm -f "$TMP_OUTPUT_FILE"' EXIT - while [ -z "$CT_TYPE" ]; do - TITLE="CONTAINER TYPE" - BACKTITLE="[dev] Proxmox VE Helper Scripts" - HEIGHT=10 - WIDTH=58 - MENU_HEIGHT=2 - if [ "$CT_DEFAULT_TYPE" == "1" ]; then - DEFAULT_ON="ON" - DEFAULT_OFF="OFF" - else - DEFAULT_ON="OFF" - DEFAULT_OFF="ON" + if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$CT_TYPE" ]; then + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + fi + else + exit_script + fi fi - - whiptail --backtitle "$BACKTITLE" --title "$TITLE" \ - --radiolist "Choose Type" $HEIGHT $WIDTH $MENU_HEIGHT \ - "1" "Unprivileged" $DEFAULT_ON \ - "0" "Privileged" $DEFAULT_OFF \ - 3>&1 1>"$TMP_OUTPUT_FILE" 2>&3 - - RET=$? - - if [ $RET -ne 0 ]; then - exit_script + if [ "$CT_DEFAULT_TYPE" == "0" ]; then + if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$CT_TYPE" ]; then + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + fi + else + exit_script + fi fi - - CT_TYPE=$(<"$TMP_OUTPUT_FILE") - - if [ "$CT_TYPE" == "0" ]; then - CT_TYPE_DESC="Privileged" - elif [ "$CT_TYPE" == "1" ]; then - CT_TYPE_DESC="Unprivileged" - else - CT_TYPE="" - continue - fi - - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" done while true; do From fdeebe8f440bd140d42f3a73e8f70d9c869a2e5c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:42:47 +0200 Subject: [PATCH 0378/1614] backup dialogue --- misc/build.func | 849 --------------------------------------------- misc/dialogue.bak | 850 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 850 insertions(+), 849 deletions(-) create mode 100644 misc/dialogue.bak diff --git a/misc/build.func b/misc/build.func index 4c11e09..25debc4 100644 --- a/misc/build.func +++ b/misc/build.func @@ -872,855 +872,6 @@ advanced_settings() { fi } -# dialog_input() { -# local title="$1" -# local prompt="$2" -# local default="$3" -# local result -# apt-get install -y dialog -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "$title" \ -# --extra-button --extra-label "Back" \ -# --ok-label "Next" --cancel-label "Exit" \ -# --inputbox "$prompt" 10 58 "$default" 2>&1 >/dev/tty) - -# local exitcode=$? - -# case $exitcode in -# 0) -# REPLY_RESULT="$result" -# return 0 -# ;; # OK -# 3) return 2 ;; # Back -# *) return 1 ;; # Cancel/Exit -# esac -# } - -# advanced_settings() { -# local step=1 - -# while true; do -# case $step in -# 1) -# show_intro_messages && ((step++)) -# ;; -# 2) -# select_distribution -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 3) -# select_version -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 4) -# select_container_type -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 5) -# set_root_password -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 6) -# set_container_id -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 7) -# set_hostname -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 8) -# set_disk_size -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 9) -# set_cpu_cores -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 10) -# set_ram_size -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 11) -# set_bridge -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 12) -# set_ip_address -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 13) -# set_gateway -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 14) -# set_apt_cacher -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 15) -# toggle_ipv6 -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 16) -# set_mtu -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 17) -# set_dns_search_domain -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 18) -# set_dns_server -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 19) -# set_mac_address -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 20) -# set_vlan -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 21) -# set_tags -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 22) -# set_ssh_access -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 23) -# set_fuse -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 24) -# set_verbose -# result=$? -# [[ $result -eq 0 ]] && ((step++)) -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# 25) -# confirm_creation -# result=$? -# [[ $result -eq 0 ]] && break -# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) -# [[ $result -eq 1 ]] && return -# ;; -# esac -# done -# } - -# show_intro_messages() { -# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "Instructional Tip" \ -# --msgbox "To make a selection, use the Spacebar." 8 58 || return 1 - -# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "Default distribution for $APP" \ -# --msgbox "Default is: ${var_os} ${var_version}\n\nIf the default Linux distribution is not adhered to, script support will be discontinued." 10 58 || return 1 -# return 0 -# } - -# select_distribution() { -# [[ "$var_os" == "alpine" ]] && return 0 - -# local default result exitcode -# default="${var_os:-debian}" -# var_os="" - -# local debian_flag ubuntu_flag -# [[ "$default" == "debian" ]] && debian_flag="on" || debian_flag="off" -# [[ "$default" == "ubuntu" ]] && ubuntu_flag="on" || ubuntu_flag="off" - -# while [[ -z "$var_os" ]]; do -# exec 3>&1 -# result=$(dialog --clear \ -# --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "DISTRIBUTION" \ -# --radiolist "Choose Distribution:" 15 60 4 \ -# "debian" "" "$debian_flag" \ -# "ubuntu" "" "$ubuntu_flag" \ -# --ok-label "Next" \ -# --cancel-label "Exit" \ -# --extra-button \ -# --extra-label "Back" \ -# 2>&1 1>&3) -# exitcode=$? -# exec 3>&- - -# case "$exitcode" in -# 0) -# if [[ "$result" =~ ^(debian|ubuntu)$ ]]; then -# var_os="$result" -# printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" -# return 0 -# else -# printf "[DEBUG] No valid selection made (result='%s'), repeating...\n" "$result" -# fi -# ;; -# 3) -# return 2 -# ;; -# 1 | 255) -# return 1 -# ;; -# *) -# printf "[DEBUG] Unexpected exit code: %s\n" "$exitcode" >&2 -# return 1 -# ;; -# esac -# done -# } - -# select_version() { -# local default="${var_version}" -# var_version="" -# local list result exitcode - -# if [[ "$var_os" == "debian" ]]; then -# case "$default" in -# 11) list=("11" "Bullseye" on "12" "Bookworm" off) ;; -# 12) list=("11" "Bullseye" off "12" "Bookworm" on) ;; -# *) list=("11" "Bullseye" off "12" "Bookworm" off) ;; -# esac -# elif [[ "$var_os" == "ubuntu" ]]; then -# case "$default" in -# 20.04) list=("20.04" "Focal" on "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" off) ;; -# 22.04) list=("20.04" "Focal" off "22.04" "Jammy" on "24.04" "Noble" off "24.10" "Oracular" off) ;; -# 24.04) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" on "24.10" "Oracular" off) ;; -# 24.10) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" on) ;; -# *) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" off) ;; -# esac -# fi - -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "VERSION" \ -# --radiolist "Choose Version:" 15 58 5 \ -# "${list[@]}" \ -# --ok-label "Next" \ -# --cancel-label "Exit" \ -# --extra-button --extra-label "Back" \ -# 3>&1 1>&2 2>&3) - -# exitcode=$? - -# case $exitcode in -# 0) -# var_version="$result" -# printf "%bVersion: %b%s%b\n" "$OSVERSION$BOLD$DGN" "$BGN" "$var_version" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# select_container_type() { -# local default="${CT_TYPE}" -# CT_TYPE="" -# local list result exitcode - -# [[ "$default" == "1" ]] && list=("1" "Unprivileged" on "0" "Privileged" off) || list=("1" "Unprivileged" off "0" "Privileged" on) - -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "CONTAINER TYPE" \ -# --radiolist "Choose Type:" 10 58 2 "${list[@]}" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) - -# exitcode=$? - -# case $exitcode in -# 0) -# CT_TYPE="$result" -# [[ "$CT_TYPE" == "0" ]] && desc="Privileged" || desc="Unprivileged" -# printf "%bContainer Type: %b%s%b\n" "$CONTAINERTYPE$BOLD$DGN" "$BGN" "$desc" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } -# set_root_password() { -# local pw1 pw2 exitcode - -# while true; do -# pw1=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "PASSWORD (leave blank for automatic login)" \ -# --insecure --passwordbox "\nSet Root Password (needed for root ssh access)" 10 58 \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# if [[ -z "$pw1" ]]; then -# PW1="Automatic Login" -# PW="" -# printf "%bRoot Password: %b%s%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$PW1" "$CL" -# return 0 -# fi -# if [[ "$pw1" == *" "* ]]; then -# dialog --msgbox "Password cannot contain spaces. Please try again." 8 58 -# continue -# fi -# if [[ ${#pw1} -lt 5 ]]; then -# dialog --msgbox "Password must be at least 5 characters long. Please try again." 8 58 -# continue -# fi -# pw2=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "PASSWORD VERIFICATION" \ -# --insecure --passwordbox "\nVerify Root Password" 10 58 \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? -# case $exitcode in -# 0) -# if [[ "$pw1" == "$pw2" ]]; then -# PW="-password $pw1" -# printf "%bRoot Password: %b********%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$CL" -# return 0 -# else -# dialog --msgbox "Passwords do not match. Please try again." 8 58 -# continue -# fi -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# done -# } - -# set_container_id() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "CONTAINER ID" \ -# --inputbox "Set Container ID" 8 58 "$NEXTID" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# CT_ID="${result:-$NEXTID}" -# printf "%bContainer ID: %b%s%b\n" "$CONTAINERID$BOLD$DGN" "$BGN" "$CT_ID" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_hostname() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "HOSTNAME" \ -# --inputbox "Set Hostname" 8 58 "$NSAPP" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# if [[ -z "$result" ]]; then -# HN="$NSAPP" -# else -# HN=$(tr -d ' ' <<<"${result,,}") -# fi -# printf "%bHostname: %b%s%b\n" "$HOSTNAME$BOLD$DGN" "$BGN" "$HN" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_disk_size() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "DISK SIZE" \ -# --inputbox "Set Disk Size in GB" 8 58 "$var_disk" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# if [[ -z "$result" ]]; then -# DISK_SIZE="$var_disk" -# elif [[ "$result" =~ ^[0-9]+$ ]]; then -# DISK_SIZE="$result" -# else -# dialog --msgbox "Disk size must be an integer!" 8 58 -# return 2 -# fi -# printf "%bDisk Size: %b%s GB%b\n" "$DISKSIZE$BOLD$DGN" "$BGN" "$DISK_SIZE" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_cpu_cores() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "CORE COUNT" \ -# --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# CORE_COUNT="${result:-$var_cpu}" -# printf "%bCPU Cores: %b%s%b\n" "$CPUCORE$BOLD$DGN" "$BGN" "$CORE_COUNT" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_ram_size() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "RAM" \ -# --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# RAM_SIZE="${result:-$var_ram}" -# printf "%bRAM Size: %b%s MiB%b\n" "$RAMSIZE$BOLD$DGN" "$BGN" "$RAM_SIZE" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_bridge() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "BRIDGE" \ -# --inputbox "Set a Bridge" 8 58 "vmbr0" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# BRG="${result:-vmbr0}" -# printf "%bBridge: %b%s%b\n" "$BRIDGE$BOLD$DGN" "$BGN" "$BRG" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_ip_address() { -# local result exitcode -# while true; do -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "IP ADDRESS" \ -# --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 "dhcp" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# if [[ "$result" == "dhcp" ]]; then -# NET="dhcp" -# printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" -# return 0 -# elif [[ "$result" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then -# NET="$result" -# printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" -# return 0 -# else -# dialog --msgbox "$result is an invalid IPv4 CIDR address. Please enter a valid address or 'dhcp'." 8 58 -# continue -# fi -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# done -# } - -# set_gateway() { -# local result exitcode -# if [[ "$NET" == "dhcp" ]]; then -# GATE="" -# printf "%bGateway IP Address: %bDefault%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$CL" -# return 0 -# fi - -# while true; do -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "Gateway IP" \ -# --inputbox "Enter gateway IP address" 8 58 \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# if [[ -z "$result" ]]; then -# dialog --msgbox "Gateway IP address cannot be empty" 8 58 -# continue -# elif [[ "$result" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then -# GATE=",gw=$result" -# printf "%bGateway IP Address: %b%s%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$result" "$CL" -# return 0 -# else -# dialog --msgbox "Invalid IP address format" 8 58 -# fi -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# done -# } - -# set_apt_cacher() { -# local result exitcode -# if [[ "$var_os" == "alpine" ]]; then -# APT_CACHER="" -# APT_CACHER_IP="" -# return 0 -# fi - -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "APT-Cacher IP" \ -# --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# APT_CACHER_IP="$result" -# APT_CACHER="${APT_CACHER_IP:+yes}" -# printf "%bAPT-Cacher IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "${APT_CACHER_IP:-Default}" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# toggle_ipv6() { -# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "IPv6" \ -# --yesno "Disable IPv6?" 10 58 \ -# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" -# case $? in -# 0) DISABLEIP6="yes" ;; -# 1) DISABLEIP6="no" ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# printf "%bDisable IPv6: %b%s%b\n" "$DISABLEIPV6$BOLD$DGN" "$BGN" "$DISABLEIP6" "$CL" -# return 0 -# } -# set_mtu() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "MTU SIZE" \ -# --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 "" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# if [[ -z "$result" ]]; then -# MTU1="Default" -# MTU="" -# else -# MTU1="$result" -# MTU=",mtu=$MTU1" -# fi -# printf "%bInterface MTU Size: %b%s%b\n" "$DEFAULT$BOLD$DGN" "$BGN" "$MTU1" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_dns_search_domain() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "DNS Search Domain" \ -# --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 "" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# if [[ -z "$result" ]]; then -# SX="Host" -# SD="" -# else -# SX="$result" -# SD="-searchdomain=$result" -# fi -# printf "%bDNS Search Domain: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$SX" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_dns_server() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "DNS SERVER IP" \ -# --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 "" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# if [[ -z "$result" ]]; then -# NX="Host" -# NS="" -# else -# NX="$result" -# NS="-nameserver=$result" -# fi -# printf "%bDNS Server IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NX" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_mac_address() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "MAC ADDRESS" \ -# --inputbox "Set a MAC Address (leave blank for generated MAC)" 8 58 "" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# if [[ -z "$result" ]]; then -# MAC1="Default" -# MAC="" -# else -# MAC1="$result" -# MAC=",hwaddr=$MAC1" -# fi -# printf "%bMAC Address: %b%s%b\n" "$MACADDRESS$BOLD$DGN" "$BGN" "$MAC1" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_vlan() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "VLAN" \ -# --inputbox "Set a VLAN (leave blank for no VLAN)" 8 58 "" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# if [[ -z "$result" ]]; then -# VLAN1="Default" -# VLAN="" -# else -# VLAN1="$result" -# VLAN=",tag=$VLAN1" -# fi -# printf "%bVlan: %b%s%b\n" "$VLANTAG$BOLD$DGN" "$BGN" "$VLAN1" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_tags() { -# local result exitcode -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "Advanced Tags" \ -# --inputbox "Set Custom Tags? [If you remove all, there will be no tags!]" 8 58 "$TAGS" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? - -# case $exitcode in -# 0) -# if [[ -n "$result" ]]; then -# ADV_TAGS=$(tr -d '[:space:]' <<<"$result") -# TAGS="$ADV_TAGS" -# else -# TAGS=";" -# fi -# printf "%bTags: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$TAGS" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } - -# set_ssh_access() { -# local result exitcode - -# if [[ "$PW" == -password* ]]; then -# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "SSH ACCESS" \ -# --yesno "Enable Root SSH Access?" 10 58 \ -# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" -# exitcode=$? -# case $exitcode in -# 0) SSH="yes" ;; -# 1) SSH="no" ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# else -# SSH="no" -# fi - -# printf "%bRoot SSH Access: %b%s%b\n" "$ROOTSSH$BOLD$DGN" "$BGN" "$SSH" "$CL" - -# if [[ "$SSH" == "yes" ]]; then -# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "SSH Key" \ -# --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 "" \ -# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) -# exitcode=$? -# case $exitcode in -# 0) -# SSH_AUTHORIZED_KEY="$result" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# else -# SSH_AUTHORIZED_KEY="" -# return 0 -# fi -# } - -# set_fuse() { -# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "FUSE Support" \ -# --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58 \ -# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" -# case $? in -# 0) ENABLE_FUSE="yes" ;; -# 1) ENABLE_FUSE="no" ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# printf "%bFUSE (Filesystem in Userspace) Support: %b%s%b\n" "$FUSE$BOLD$DGN" "$BGN" "$ENABLE_FUSE" "$CL" -# return 0 -# } - -# set_verbose() { -# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "VERBOSE MODE" \ -# --yesno "Enable Verbose Mode?" 10 58 \ -# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" -# case $? in -# 0) VERB="yes" ;; -# 1) VERB="no" ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# printf "%bVerbose Mode: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$VERB" "$CL" -# return 0 -# } - -# confirm_creation() { -# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ -# --title "ADVANCED SETTINGS COMPLETE" \ -# --yesno "Ready to create ${APP} LXC?" 10 58 \ -# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" -# case $? in -# 0) -# printf "%bCreating a %s LXC using the above advanced settings%b\n" "$CREATING$BOLD$RD" "$APP" "$CL" -# return 0 -# ;; -# 3) return 2 ;; -# *) return 1 ;; -# esac -# } diagnostics_check() { if ! [ -d "/usr/local/community-scripts" ]; then diff --git a/misc/dialogue.bak b/misc/dialogue.bak new file mode 100644 index 0000000..497b5fe --- /dev/null +++ b/misc/dialogue.bak @@ -0,0 +1,850 @@ + +# dialog_input() { +# local title="$1" +# local prompt="$2" +# local default="$3" +# local result +# apt-get install -y dialog +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "$title" \ +# --extra-button --extra-label "Back" \ +# --ok-label "Next" --cancel-label "Exit" \ +# --inputbox "$prompt" 10 58 "$default" 2>&1 >/dev/tty) + +# local exitcode=$? + +# case $exitcode in +# 0) +# REPLY_RESULT="$result" +# return 0 +# ;; # OK +# 3) return 2 ;; # Back +# *) return 1 ;; # Cancel/Exit +# esac +# } + +# advanced_settings() { +# local step=1 + +# while true; do +# case $step in +# 1) +# show_intro_messages && ((step++)) +# ;; +# 2) +# select_distribution +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 3) +# select_version +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 4) +# select_container_type +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 5) +# set_root_password +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 6) +# set_container_id +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 7) +# set_hostname +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 8) +# set_disk_size +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 9) +# set_cpu_cores +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 10) +# set_ram_size +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 11) +# set_bridge +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 12) +# set_ip_address +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 13) +# set_gateway +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 14) +# set_apt_cacher +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 15) +# toggle_ipv6 +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 16) +# set_mtu +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 17) +# set_dns_search_domain +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 18) +# set_dns_server +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 19) +# set_mac_address +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 20) +# set_vlan +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 21) +# set_tags +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 22) +# set_ssh_access +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 23) +# set_fuse +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 24) +# set_verbose +# result=$? +# [[ $result -eq 0 ]] && ((step++)) +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# 25) +# confirm_creation +# result=$? +# [[ $result -eq 0 ]] && break +# [[ $result -eq 2 && $step -gt 1 ]] && ((step--)) +# [[ $result -eq 1 ]] && return +# ;; +# esac +# done +# } + +# show_intro_messages() { +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "Instructional Tip" \ +# --msgbox "To make a selection, use the Spacebar." 8 58 || return 1 + +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "Default distribution for $APP" \ +# --msgbox "Default is: ${var_os} ${var_version}\n\nIf the default Linux distribution is not adhered to, script support will be discontinued." 10 58 || return 1 +# return 0 +# } + +# select_distribution() { +# [[ "$var_os" == "alpine" ]] && return 0 + +# local default result exitcode +# default="${var_os:-debian}" +# var_os="" + +# local debian_flag ubuntu_flag +# [[ "$default" == "debian" ]] && debian_flag="on" || debian_flag="off" +# [[ "$default" == "ubuntu" ]] && ubuntu_flag="on" || ubuntu_flag="off" + +# while [[ -z "$var_os" ]]; do +# exec 3>&1 +# result=$(dialog --clear \ +# --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "DISTRIBUTION" \ +# --radiolist "Choose Distribution:" 15 60 4 \ +# "debian" "" "$debian_flag" \ +# "ubuntu" "" "$ubuntu_flag" \ +# --ok-label "Next" \ +# --cancel-label "Exit" \ +# --extra-button \ +# --extra-label "Back" \ +# 2>&1 1>&3) +# exitcode=$? +# exec 3>&- + +# case "$exitcode" in +# 0) +# if [[ "$result" =~ ^(debian|ubuntu)$ ]]; then +# var_os="$result" +# printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL" +# return 0 +# else +# printf "[DEBUG] No valid selection made (result='%s'), repeating...\n" "$result" +# fi +# ;; +# 3) +# return 2 +# ;; +# 1 | 255) +# return 1 +# ;; +# *) +# printf "[DEBUG] Unexpected exit code: %s\n" "$exitcode" >&2 +# return 1 +# ;; +# esac +# done +# } + +# select_version() { +# local default="${var_version}" +# var_version="" +# local list result exitcode + +# if [[ "$var_os" == "debian" ]]; then +# case "$default" in +# 11) list=("11" "Bullseye" on "12" "Bookworm" off) ;; +# 12) list=("11" "Bullseye" off "12" "Bookworm" on) ;; +# *) list=("11" "Bullseye" off "12" "Bookworm" off) ;; +# esac +# elif [[ "$var_os" == "ubuntu" ]]; then +# case "$default" in +# 20.04) list=("20.04" "Focal" on "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" off) ;; +# 22.04) list=("20.04" "Focal" off "22.04" "Jammy" on "24.04" "Noble" off "24.10" "Oracular" off) ;; +# 24.04) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" on "24.10" "Oracular" off) ;; +# 24.10) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" on) ;; +# *) list=("20.04" "Focal" off "22.04" "Jammy" off "24.04" "Noble" off "24.10" "Oracular" off) ;; +# esac +# fi + +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "VERSION" \ +# --radiolist "Choose Version:" 15 58 5 \ +# "${list[@]}" \ +# --ok-label "Next" \ +# --cancel-label "Exit" \ +# --extra-button --extra-label "Back" \ +# 3>&1 1>&2 2>&3) + +# exitcode=$? + +# case $exitcode in +# 0) +# var_version="$result" +# printf "%bVersion: %b%s%b\n" "$OSVERSION$BOLD$DGN" "$BGN" "$var_version" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# select_container_type() { +# local default="${CT_TYPE}" +# CT_TYPE="" +# local list result exitcode + +# [[ "$default" == "1" ]] && list=("1" "Unprivileged" on "0" "Privileged" off) || list=("1" "Unprivileged" off "0" "Privileged" on) + +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "CONTAINER TYPE" \ +# --radiolist "Choose Type:" 10 58 2 "${list[@]}" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) + +# exitcode=$? + +# case $exitcode in +# 0) +# CT_TYPE="$result" +# [[ "$CT_TYPE" == "0" ]] && desc="Privileged" || desc="Unprivileged" +# printf "%bContainer Type: %b%s%b\n" "$CONTAINERTYPE$BOLD$DGN" "$BGN" "$desc" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } +# set_root_password() { +# local pw1 pw2 exitcode + +# while true; do +# pw1=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "PASSWORD (leave blank for automatic login)" \ +# --insecure --passwordbox "\nSet Root Password (needed for root ssh access)" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$pw1" ]]; then +# PW1="Automatic Login" +# PW="" +# printf "%bRoot Password: %b%s%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$PW1" "$CL" +# return 0 +# fi +# if [[ "$pw1" == *" "* ]]; then +# dialog --msgbox "Password cannot contain spaces. Please try again." 8 58 +# continue +# fi +# if [[ ${#pw1} -lt 5 ]]; then +# dialog --msgbox "Password must be at least 5 characters long. Please try again." 8 58 +# continue +# fi +# pw2=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "PASSWORD VERIFICATION" \ +# --insecure --passwordbox "\nVerify Root Password" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? +# case $exitcode in +# 0) +# if [[ "$pw1" == "$pw2" ]]; then +# PW="-password $pw1" +# printf "%bRoot Password: %b********%b\n" "$VERIFYPW$BOLD$DGN" "$BGN" "$CL" +# return 0 +# else +# dialog --msgbox "Passwords do not match. Please try again." 8 58 +# continue +# fi +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# done +# } + +# set_container_id() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "CONTAINER ID" \ +# --inputbox "Set Container ID" 8 58 "$NEXTID" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# CT_ID="${result:-$NEXTID}" +# printf "%bContainer ID: %b%s%b\n" "$CONTAINERID$BOLD$DGN" "$BGN" "$CT_ID" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_hostname() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "HOSTNAME" \ +# --inputbox "Set Hostname" 8 58 "$NSAPP" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# HN="$NSAPP" +# else +# HN=$(tr -d ' ' <<<"${result,,}") +# fi +# printf "%bHostname: %b%s%b\n" "$HOSTNAME$BOLD$DGN" "$BGN" "$HN" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_disk_size() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "DISK SIZE" \ +# --inputbox "Set Disk Size in GB" 8 58 "$var_disk" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# DISK_SIZE="$var_disk" +# elif [[ "$result" =~ ^[0-9]+$ ]]; then +# DISK_SIZE="$result" +# else +# dialog --msgbox "Disk size must be an integer!" 8 58 +# return 2 +# fi +# printf "%bDisk Size: %b%s GB%b\n" "$DISKSIZE$BOLD$DGN" "$BGN" "$DISK_SIZE" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_cpu_cores() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "CORE COUNT" \ +# --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# CORE_COUNT="${result:-$var_cpu}" +# printf "%bCPU Cores: %b%s%b\n" "$CPUCORE$BOLD$DGN" "$BGN" "$CORE_COUNT" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_ram_size() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "RAM" \ +# --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# RAM_SIZE="${result:-$var_ram}" +# printf "%bRAM Size: %b%s MiB%b\n" "$RAMSIZE$BOLD$DGN" "$BGN" "$RAM_SIZE" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_bridge() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "BRIDGE" \ +# --inputbox "Set a Bridge" 8 58 "vmbr0" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# BRG="${result:-vmbr0}" +# printf "%bBridge: %b%s%b\n" "$BRIDGE$BOLD$DGN" "$BGN" "$BRG" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_ip_address() { +# local result exitcode +# while true; do +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "IP ADDRESS" \ +# --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 "dhcp" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ "$result" == "dhcp" ]]; then +# NET="dhcp" +# printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" +# return 0 +# elif [[ "$result" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then +# NET="$result" +# printf "%bIP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NET" "$CL" +# return 0 +# else +# dialog --msgbox "$result is an invalid IPv4 CIDR address. Please enter a valid address or 'dhcp'." 8 58 +# continue +# fi +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# done +# } + +# set_gateway() { +# local result exitcode +# if [[ "$NET" == "dhcp" ]]; then +# GATE="" +# printf "%bGateway IP Address: %bDefault%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$CL" +# return 0 +# fi + +# while true; do +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "Gateway IP" \ +# --inputbox "Enter gateway IP address" 8 58 \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# dialog --msgbox "Gateway IP address cannot be empty" 8 58 +# continue +# elif [[ "$result" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then +# GATE=",gw=$result" +# printf "%bGateway IP Address: %b%s%b\n" "$GATEWAY$BOLD$DGN" "$BGN" "$result" "$CL" +# return 0 +# else +# dialog --msgbox "Invalid IP address format" 8 58 +# fi +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# done +# } + +# set_apt_cacher() { +# local result exitcode +# if [[ "$var_os" == "alpine" ]]; then +# APT_CACHER="" +# APT_CACHER_IP="" +# return 0 +# fi + +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "APT-Cacher IP" \ +# --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# APT_CACHER_IP="$result" +# APT_CACHER="${APT_CACHER_IP:+yes}" +# printf "%bAPT-Cacher IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "${APT_CACHER_IP:-Default}" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# toggle_ipv6() { +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "IPv6" \ +# --yesno "Disable IPv6?" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" +# case $? in +# 0) DISABLEIP6="yes" ;; +# 1) DISABLEIP6="no" ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# printf "%bDisable IPv6: %b%s%b\n" "$DISABLEIPV6$BOLD$DGN" "$BGN" "$DISABLEIP6" "$CL" +# return 0 +# } +# set_mtu() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "MTU SIZE" \ +# --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# MTU1="Default" +# MTU="" +# else +# MTU1="$result" +# MTU=",mtu=$MTU1" +# fi +# printf "%bInterface MTU Size: %b%s%b\n" "$DEFAULT$BOLD$DGN" "$BGN" "$MTU1" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_dns_search_domain() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "DNS Search Domain" \ +# --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# SX="Host" +# SD="" +# else +# SX="$result" +# SD="-searchdomain=$result" +# fi +# printf "%bDNS Search Domain: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$SX" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_dns_server() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "DNS SERVER IP" \ +# --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# NX="Host" +# NS="" +# else +# NX="$result" +# NS="-nameserver=$result" +# fi +# printf "%bDNS Server IP Address: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$NX" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_mac_address() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "MAC ADDRESS" \ +# --inputbox "Set a MAC Address (leave blank for generated MAC)" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# MAC1="Default" +# MAC="" +# else +# MAC1="$result" +# MAC=",hwaddr=$MAC1" +# fi +# printf "%bMAC Address: %b%s%b\n" "$MACADDRESS$BOLD$DGN" "$BGN" "$MAC1" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_vlan() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "VLAN" \ +# --inputbox "Set a VLAN (leave blank for no VLAN)" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -z "$result" ]]; then +# VLAN1="Default" +# VLAN="" +# else +# VLAN1="$result" +# VLAN=",tag=$VLAN1" +# fi +# printf "%bVlan: %b%s%b\n" "$VLANTAG$BOLD$DGN" "$BGN" "$VLAN1" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_tags() { +# local result exitcode +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "Advanced Tags" \ +# --inputbox "Set Custom Tags? [If you remove all, there will be no tags!]" 8 58 "$TAGS" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? + +# case $exitcode in +# 0) +# if [[ -n "$result" ]]; then +# ADV_TAGS=$(tr -d '[:space:]' <<<"$result") +# TAGS="$ADV_TAGS" +# else +# TAGS=";" +# fi +# printf "%bTags: %b%s%b\n" "$NETWORK$BOLD$DGN" "$BGN" "$TAGS" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } + +# set_ssh_access() { +# local result exitcode + +# if [[ "$PW" == -password* ]]; then +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "SSH ACCESS" \ +# --yesno "Enable Root SSH Access?" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" +# exitcode=$? +# case $exitcode in +# 0) SSH="yes" ;; +# 1) SSH="no" ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# else +# SSH="no" +# fi + +# printf "%bRoot SSH Access: %b%s%b\n" "$ROOTSSH$BOLD$DGN" "$BGN" "$SSH" "$CL" + +# if [[ "$SSH" == "yes" ]]; then +# result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "SSH Key" \ +# --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 "" \ +# --extra-button --extra-label "Back" --ok-label "Next" --cancel-label "Exit" 3>&1 1>&2 2>&3) +# exitcode=$? +# case $exitcode in +# 0) +# SSH_AUTHORIZED_KEY="$result" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# else +# SSH_AUTHORIZED_KEY="" +# return 0 +# fi +# } + +# set_fuse() { +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "FUSE Support" \ +# --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" +# case $? in +# 0) ENABLE_FUSE="yes" ;; +# 1) ENABLE_FUSE="no" ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# printf "%bFUSE (Filesystem in Userspace) Support: %b%s%b\n" "$FUSE$BOLD$DGN" "$BGN" "$ENABLE_FUSE" "$CL" +# return 0 +# } + +# set_verbose() { +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "VERBOSE MODE" \ +# --yesno "Enable Verbose Mode?" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" +# case $? in +# 0) VERB="yes" ;; +# 1) VERB="no" ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# printf "%bVerbose Mode: %b%s%b\n" "$SEARCH$BOLD$DGN" "$BGN" "$VERB" "$CL" +# return 0 +# } + +# confirm_creation() { +# dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ +# --title "ADVANCED SETTINGS COMPLETE" \ +# --yesno "Ready to create ${APP} LXC?" 10 58 \ +# --extra-button --extra-label "Back" --ok-label "Yes" --cancel-label "No" +# case $? in +# 0) +# printf "%bCreating a %s LXC using the above advanced settings%b\n" "$CREATING$BOLD$RD" "$APP" "$CL" +# return 0 +# ;; +# 3) return 2 ;; +# *) return 1 ;; +# esac +# } From 13f3a97929c946564e40628bc8472ab24665411a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:47:25 +0200 Subject: [PATCH 0379/1614] Update build.func --- misc/build.func | 121 ------------------------------------------------ 1 file changed, 121 deletions(-) diff --git a/misc/build.func b/misc/build.func index 25debc4..25bcb43 100644 --- a/misc/build.func +++ b/misc/build.func @@ -433,127 +433,6 @@ exit_script() { # This function allows the user to configure advanced settings for the script. advanced_settings() { whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 - # if [ "$var_os" != "alpine" ]; then - # var_default_os="${var_os}" - # var_os="" - # while [ -z "$var_os" ]; do - # if [ "$var_default_os" == "debian" ]; then - # if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - # "debian" "" ON \ - # "ubuntu" "" OFF \ - # 3>&1 1>&2 2>&3); then - # if [ -n "$var_os" ]; then - # echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - # fi - # else - # exit_script - # fi - # fi - # if [ "$var_default_os" == "ubuntu" ]; then - # if var_os=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \ - # "debian" "" OFF \ - # "ubuntu" "" ON \ - # 3>&1 1>&2 2>&3); then - # if [ -n "$var_os" ]; then - # echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - # fi - # else - # exit_script - # fi - # fi - # done - # fi - - # if [ "$var_os" == "debian" ]; then - # var_default_version="${var_version}" - # var_version="" - # while [ -z "$var_version" ]; do - # if [ "$var_default_version" == "11" ]; then - # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ - # "11" "Bullseye" ON \ - # "12" "Bookworm" OFF \ - # 3>&1 1>&2 2>&3); then - # if [ -n "$var_version" ]; then - # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - # fi - # else - # exit_script - # fi - # fi - # if [ "$var_default_version" == "12" ]; then - # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ - # "11" "Bullseye" OFF \ - # "12" "Bookworm" ON \ - # 3>&1 1>&2 2>&3); then - # if [ -n "$var_version" ]; then - # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - # fi - # else - # exit_script - # fi - # fi - # done - # fi - - # if [ "$var_os" == "ubuntu" ]; then - # var_default_version="${var_version}" - # var_version="" - # while [ -z "$var_version" ]; do - # if [ "$var_default_version" == "20.04" ]; then - # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - # "20.04" "Focal" ON \ - # "22.04" "Jammy" OFF \ - # "24.04" "Noble" OFF \ - # "24.10" "Oracular" OFF \ - # 3>&1 1>&2 2>&3); then - # if [ -n "$var_version" ]; then - # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - # fi - # else - # exit_script - # fi - # elif [ "$var_default_version" == "22.04" ]; then - # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - # "20.04" "Focal" OFF \ - # "22.04" "Jammy" ON \ - # "24.04" "Noble" OFF \ - # "24.10" "Oracular" OFF \ - # 3>&1 1>&2 2>&3); then - # if [ -n "$var_version" ]; then - # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - # fi - # else - # exit_script - # fi - # elif [ "$var_default_version" == "24.04" ]; then - # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - # "20.04" "Focal" OFF \ - # "22.04" "Jammy" OFF \ - # "24.04" "Noble" ON \ - # "24.10" "Oracular" OFF \ - # 3>&1 1>&2 2>&3); then - # if [ -n "$var_version" ]; then - # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - # fi - # else - # exit_script - # fi - # else - # if var_version=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - # "20.04" "Focal" OFF \ - # "22.04" "Jammy" OFF \ - # "24.04" "Noble" OFF \ - # "24.10" "Oracular" ON \ - # 3>&1 1>&2 2>&3); then - # if [ -n "$var_version" ]; then - # echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - # fi - # else - # exit_script - # fi - # fi - # done - # fi # Setting Default Tag for Advanced Settings TAGS="community-script-dev;${var_tags:-}" CT_DEFAULT_TYPE="${CT_TYPE}" From 8c0934f9050a0a7ac47e6e8cbeb95eb581081bdf Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:47:45 +0200 Subject: [PATCH 0380/1614] Update build.func --- misc/build.func | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 25bcb43..162f36b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -466,6 +466,8 @@ advanced_settings() { if [ "$CT_TYPE" -eq 0 ]; then CT_TYPE_DESC="Privileged" fi + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" fi else @@ -751,7 +753,6 @@ advanced_settings() { fi } - diagnostics_check() { if ! [ -d "/usr/local/community-scripts" ]; then mkdir -p /usr/local/community-scripts From 30b2ba9454bd5d42c379906270a236a71319ad46 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 12:58:21 +0200 Subject: [PATCH 0381/1614] Update debian-install.sh --- install/debian-install.sh | 86 +++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/install/debian-install.sh b/install/debian-install.sh index b5797b0..da3b55b 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -30,54 +30,54 @@ apt-get update $STD apt-get install -y postgresql msg_ok "Set up PostgreSQL Repository" -msg_info "Setting up Matrix Server" -curl -fsSL https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg -o /usr/share/keyrings/matrix-org-archive-keyring.gpg -echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian ${DISTRO} main" >/etc/apt/sources.list.d/matrix-org.list -apt-get update -$STD apt-get install -y matrix-synapse-py3 -msg_info "Set up Matrix Server" +# msg_info "Setting up Matrix Server" +# curl -fsSL https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg -o /usr/share/keyrings/matrix-org-archive-keyring.gpg +# echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian ${DISTRO} main" >/etc/apt/sources.list.d/matrix-org.list +# apt-get update +# $STD apt-get install -y matrix-synapse-py3 +# msg_info "Set up Matrix Server" -msg_info "Setup EVCC" -curl -fsSL https://dl.evcc.io/public/evcc/stable/gpg.EAD5D0E07B0EC0FD.key | gpg --dearmor -o /etc/apt/keyrings/evcc-stable.gpg -echo "deb [signed-by=/etc/apt/keyrings/evcc-stable.gpg] https://dl.evcc.io/public/evcc/stable/deb/debian ${DISTRO} main" >/etc/apt/sources.list.d/evcc-stable.list -apt-get update -$STD apt-get install -y evcc -msg_ok "Setup EVCC" +# msg_info "Setup EVCC" +# curl -fsSL https://dl.evcc.io/public/evcc/stable/gpg.EAD5D0E07B0EC0FD.key | gpg --dearmor -o /etc/apt/keyrings/evcc-stable.gpg +# echo "deb [signed-by=/etc/apt/keyrings/evcc-stable.gpg] https://dl.evcc.io/public/evcc/stable/deb/debian ${DISTRO} main" >/etc/apt/sources.list.d/evcc-stable.list +# apt-get update +# $STD apt-get install -y evcc +# msg_ok "Setup EVCC" -msg_info "Setup PHP" -curl -fsSL https://packages.sury.org/php/apt.gpg -o /usr/share/keyrings/deb.sury.org-php.gpg -echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ ${DISTRO} main" >/etc/apt/sources.list.d/php.list -apt-get update -$STD apt-get install -y php -msg_ok "Setup PHP" +# msg_info "Setup PHP" +# curl -fsSL https://packages.sury.org/php/apt.gpg -o /usr/share/keyrings/deb.sury.org-php.gpg +# echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ ${DISTRO} main" >/etc/apt/sources.list.d/php.list +# apt-get update +# $STD apt-get install -y php +# msg_ok "Setup PHP" -msg_info "Adding Adoptium repository" -curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /etc/apt/trusted.gpg.d/adoptium.gpg -echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb ${DISTRO} main" > /etc/apt/sources.list.d/adoptium.list -apt-get update -$STD apt-get install -y temurin-11-jdk -msg_ok "Adoptium installed" +# msg_info "Adding Adoptium repository" +# curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /etc/apt/trusted.gpg.d/adoptium.gpg +# echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb ${DISTRO} main" > /etc/apt/sources.list.d/adoptium.list +# apt-get update +# $STD apt-get install -y temurin-11-jdk +# msg_ok "Adoptium installed" -msg_info "Adding Nginx repository" -curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /usr/share/keyrings/nginx-archive-keyring.gpg -echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian ${DISTRO} nginx" > /etc/apt/sources.list.d/nginx.list -apt-get update -$STD apt-get install -y nginx=1.26.3* -msg_ok "Nginx installed" +# msg_info "Adding Nginx repository" +# curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /usr/share/keyrings/nginx-archive-keyring.gpg +# echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian ${DISTRO} nginx" > /etc/apt/sources.list.d/nginx.list +# apt-get update +# $STD apt-get install -y nginx=1.26.3* +# msg_ok "Nginx installed" -msg_info "Adding MongoDB repository" -curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg -echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian ${DISTRO}/mongodb-org/7.0 main" > /etc/apt/sources.list.d/mongodb-org-7.0.list -apt-get update -$STD apt-get install -y mongodb-org -msg_ok "MongoDB installed" +# msg_info "Adding MongoDB repository" +# curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg +# echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian ${DISTRO}/mongodb-org/7.0 main" > /etc/apt/sources.list.d/mongodb-org-7.0.list +# apt-get update +# $STD apt-get install -y mongodb-org +# msg_ok "MongoDB installed" -msg_info "Adding SFTPGo repository" -curl -fsSL https://ftp.osuosl.org/pub/sftpgo/apt/gpg.key | gpg --dearmor -o /usr/share/keyrings/sftpgo-archive-keyring.gpg -echo "deb [signed-by=/usr/share/keyrings/sftpgo-archive-keyring.gpg] https://ftp.osuosl.org/pub/sftpgo/apt ${DISTRO} main" > /etc/apt/sources.list.d/sftpgo.list -apt-get update -$STD apt-get install -y sftpgo -msg_ok "SFTPGo installed" +# msg_info "Adding SFTPGo repository" +# curl -fsSL https://ftp.osuosl.org/pub/sftpgo/apt/gpg.key | gpg --dearmor -o /usr/share/keyrings/sftpgo-archive-keyring.gpg +# echo "deb [signed-by=/usr/share/keyrings/sftpgo-archive-keyring.gpg] https://ftp.osuosl.org/pub/sftpgo/apt ${DISTRO} main" > /etc/apt/sources.list.d/sftpgo.list +# apt-get update +# $STD apt-get install -y sftpgo +# msg_ok "SFTPGo installed" motd_ssh customize From a96827dac02945a2a469bde545c7225778372acd Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:21:57 +0200 Subject: [PATCH 0382/1614] dev --- ct/rclone.sh | 43 ++++++++++++++++++++++++++++++ install/rclone-install.sh | 50 +++++++++++++++++++++++++++++++++++ misc/build.func | 9 +++---- scripts/tools/grafana-loki.sh | 32 ++++++++++++++++++++++ 4 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 ct/rclone.sh create mode 100644 install/rclone-install.sh create mode 100644 scripts/tools/grafana-loki.sh diff --git a/ct/rclone.sh b/ct/rclone.sh new file mode 100644 index 0000000..0b251f5 --- /dev/null +++ b/ct/rclone.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://rclone.org/ + +APP="Rclone" +var_tags="${var_tags:-os}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-2}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" +var_fuse="${var_fuse:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "Updated $APP LXC" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" diff --git a/install/rclone-install.sh b/install/rclone-install.sh new file mode 100644 index 0000000..6159b79 --- /dev/null +++ b/install/rclone-install.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE + +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 \ + gnupg2 \ + fuse +msg_ok "Installed Dependencies" + +msg_info "Installing rclone" +wget https://downloads.rclone.org/v1.69.1/rclone-v1.69.1-linux-amd64.deb +dpkg -i rclone-v1.69.1-linux-amd64.deb +msg_ok "Installed rclone" + +cat </etc/systemd/system/rclone-web.service +[Unit] +Description=Rclone Web GUI +After=network-online.target + +[Service] +Type=simple +User=root +ExecStart=/usr/bin/rclone rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-user admin --rc-pass 12345 +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable -q --now rclone-web + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/misc/build.func b/misc/build.func index 162f36b..60ce07c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -388,8 +388,7 @@ base_settings() { RAM_SIZE=${var_ram:-$RAM_SIZE} VERB=${var_verbose:-$VERBOSE} TAGS="${TAGS}${var_tags:-}" - # 26.03.2025 disabled - #ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} + ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts if [ -z "$var_os" ]; then @@ -1398,9 +1397,9 @@ build_container() { FEATURES="nesting=1" fi # 26.03.2025 disabled - #if [ "$ENABLE_FUSE" == "yes" ]; then - # FEATURES+=",fuse=1" - #fi + if [ "$ENABLE_FUSE" == "yes" ]; then + FEATURES+=",fuse=1" + fi if [[ $DIAGNOSTICS == "yes" ]]; then post_to_api diff --git a/scripts/tools/grafana-loki.sh b/scripts/tools/grafana-loki.sh new file mode 100644 index 0000000..b68a804 --- /dev/null +++ b/scripts/tools/grafana-loki.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE + +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 gnupg2 +msg_ok "Installed Dependencies" + +msg_info "Setting up rclone" +wget https://github.com/rclone/rclone/releases/download/v1.69.1/rclone-v1.69.1-linux-amd64.de +dpkg -i rclone-v1.69.1-linux-amd64.deb +rclone rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-user admin --rc-pass 12345 +msg_ok "Set up Grafana" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 10a6694c3f416d581db2c6c57d3b68a10d898e44 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 8 Apr 2025 11:22:15 +0000 Subject: [PATCH 0383/1614] Update .app files --- ct/headers/rclone | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/rclone diff --git a/ct/headers/rclone b/ct/headers/rclone new file mode 100644 index 0000000..90ef6df --- /dev/null +++ b/ct/headers/rclone @@ -0,0 +1,6 @@ + ____ __ + / __ \_____/ /___ ____ ___ + / /_/ / ___/ / __ \/ __ \/ _ \ + / _, _/ /__/ / /_/ / / / / __/ +/_/ |_|\___/_/\____/_/ /_/\___/ + From e5adee28bb8d0bea4cac734cc4c62997e6cda60f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:26:28 +0200 Subject: [PATCH 0384/1614] Update build.func --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 60ce07c..3e978ab 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1397,7 +1397,7 @@ build_container() { FEATURES="nesting=1" fi # 26.03.2025 disabled - if [ "$ENABLE_FUSE" == "yes" ]; then + if [ "$ENABLE_FUSE" == "1" ]; then FEATURES+=",fuse=1" fi From 2a090c7e498fec59545ff88b9ad2f622ee563d66 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:26:52 +0200 Subject: [PATCH 0385/1614] Update build.func --- misc/build.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 3e978ab..45f833a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -729,9 +729,9 @@ advanced_settings() { fi if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then - ENABLE_FUSE="yes" + ENABLE_FUSE="1" else - ENABLE_FUSE="no" + ENABLE_FUSE="0" fi echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" From b30165360aeab53a1cea15ee5bfdc0e38e8c7ce5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:27:06 +0200 Subject: [PATCH 0386/1614] Update build.func --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 45f833a..d5a793b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -733,7 +733,7 @@ advanced_settings() { else ENABLE_FUSE="0" fi - echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" + echo -e "${FUSE}${BOLD}${DGN}FUSE (filesystem in userspace) Support: ${BGN}$ENABLE_FUSE${CL}" if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then VERB="yes" From 66c5048f0c35135f8aa277784e7eac950afd0ea6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:33:30 +0200 Subject: [PATCH 0387/1614] fixes --- ct/rclone.sh | 1 - install/rclone-install.sh | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ct/rclone.sh b/ct/rclone.sh index 0b251f5..2bb24de 100644 --- a/ct/rclone.sh +++ b/ct/rclone.sh @@ -13,7 +13,6 @@ var_disk="${var_disk:-2}" var_os="${var_os:-debian}" var_version="${var_version:-12}" var_unprivileged="${var_unprivileged:-1}" -var_fuse="${var_fuse:-1}" header_info "$APP" variables diff --git a/install/rclone-install.sh b/install/rclone-install.sh index 6159b79..c6ea068 100644 --- a/install/rclone-install.sh +++ b/install/rclone-install.sh @@ -14,13 +14,11 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y \ - gnupg2 \ - fuse +$STD apt-get install -y gnupg2 msg_ok "Installed Dependencies" msg_info "Installing rclone" -wget https://downloads.rclone.org/v1.69.1/rclone-v1.69.1-linux-amd64.deb +$STD fetch_and_deploy_gh_release rclone/rclone dpkg -i rclone-v1.69.1-linux-amd64.deb msg_ok "Installed rclone" From d5a34b994802da1ccb9c5bd316114460a7bbd9e4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:35:26 +0200 Subject: [PATCH 0388/1614] Update build.func --- misc/build.func | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/misc/build.func b/misc/build.func index d5a793b..162f36b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -388,7 +388,8 @@ base_settings() { RAM_SIZE=${var_ram:-$RAM_SIZE} VERB=${var_verbose:-$VERBOSE} TAGS="${TAGS}${var_tags:-}" - ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} + # 26.03.2025 disabled + #ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts if [ -z "$var_os" ]; then @@ -729,11 +730,11 @@ advanced_settings() { fi if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then - ENABLE_FUSE="1" + ENABLE_FUSE="yes" else - ENABLE_FUSE="0" + ENABLE_FUSE="no" fi - echo -e "${FUSE}${BOLD}${DGN}FUSE (filesystem in userspace) Support: ${BGN}$ENABLE_FUSE${CL}" + echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then VERB="yes" @@ -1397,9 +1398,9 @@ build_container() { FEATURES="nesting=1" fi # 26.03.2025 disabled - if [ "$ENABLE_FUSE" == "1" ]; then - FEATURES+=",fuse=1" - fi + #if [ "$ENABLE_FUSE" == "yes" ]; then + # FEATURES+=",fuse=1" + #fi if [[ $DIAGNOSTICS == "yes" ]]; then post_to_api From 41a5aada876b4f0d188a67e332c9f9ffab58bb8d Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Tue, 8 Apr 2025 12:36:46 +0000 Subject: [PATCH 0389/1614] Update versions.json --- frontend/public/json/versions.json | 115 ++++++++++++++--------------- 1 file changed, 55 insertions(+), 60 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index ce8bd8e..0d9423a 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,4 +1,49 @@ [ + { + "name": "semaphoreui/semaphore", + "version": "v2.13.11-beta1", + "date": "2025-04-08T10:56:42Z" + }, + { + "name": "n8n-io/n8n", + "version": "n8n@1.84.3", + "date": "2025-03-27T11:54:33Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-08T10:34:47Z" + }, + { + "name": "openobserve/openobserve", + "version": "v0.14.6-rc1", + "date": "2025-04-08T08:50:03Z" + }, + { + "name": "prometheus/prometheus", + "version": "v0.303.0-rc.1", + "date": "2025-04-07T04:39:38Z" + }, + { + "name": "NLnetLabs/unbound", + "version": "release-1.23.0rc1", + "date": "2025-04-08T06:39:46Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1744", + "date": "2025-04-08T06:09:14Z" + }, + { + "name": "StarFleetCPTN/GoMFT", + "version": "v0.2.6", + "date": "2025-04-08T02:23:38Z" + }, + { + "name": "coder/code-server", + "version": "v4.99.0", + "date": "2025-04-08T00:55:36Z" + }, { "name": "pelican-dev/panel", "version": "v1.0.0-beta19", @@ -9,11 +54,6 @@ "version": "v1.0.0-beta11", "date": "2025-04-07T23:02:00Z" }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-07T20:30:04Z" - }, { "name": "Threadfin/Threadfin", "version": "1.2.32", @@ -34,26 +74,26 @@ "version": "v2.4.0b4", "date": "2025-04-07T19:14:53Z" }, + { + "name": "wazuh/wazuh", + "version": "coverity-w15-4.12.0", + "date": "2025-04-07T17:50:14Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" + }, { "name": "Brandawg93/PeaNUT", "version": "v5.7.0", "date": "2025-04-07T16:14:10Z" }, - { - "name": "openobserve/openobserve", - "version": "v0.14.5", - "date": "2025-04-07T16:09:11Z" - }, { "name": "thomiceli/opengist", "version": "v1.10.0", "date": "2025-04-07T14:32:15Z" }, - { - "name": "n8n-io/n8n", - "version": "n8n@1.84.3", - "date": "2025-03-27T11:54:33Z" - }, { "name": "apache/cassandra", "version": "5.0.4-tentative", @@ -69,11 +109,6 @@ "version": "pmm-6401-v1.115.0", "date": "2025-04-07T11:15:53Z" }, - { - "name": "semaphoreui/semaphore", - "version": "v2.13.10", - "date": "2025-04-07T11:05:41Z" - }, { "name": "syncthing/syncthing", "version": "v1.29.4", @@ -99,11 +134,6 @@ "version": "7.4.0beta1", "date": "2025-04-07T08:14:13Z" }, - { - "name": "StarFleetCPTN/GoMFT", - "version": "v0.2.5", - "date": "2025-04-07T07:43:29Z" - }, { "name": "nzbgetcom/nzbget", "version": "v24.8", @@ -119,16 +149,6 @@ "version": "v1.5.1", "date": "2025-01-01T16:15:52Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1740", - "date": "2025-04-07T05:56:22Z" - }, - { - "name": "prometheus/prometheus", - "version": "v0.303.0-rc.1", - "date": "2025-04-07T04:39:38Z" - }, { "name": "open-webui/open-webui", "version": "v0.6.2", @@ -239,11 +259,6 @@ "version": "v1.0.2", "date": "2025-04-05T17:40:25Z" }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, { "name": "bastienwirtz/homer", "version": "v25.04.1", @@ -279,11 +294,6 @@ "version": "debian/12.0.13", "date": "2025-04-04T20:05:45Z" }, - { - "name": "coder/code-server", - "version": "v4.98.2", - "date": "2025-03-15T02:11:28Z" - }, { "name": "homarr-labs/homarr", "version": "v1.14.0", @@ -314,11 +324,6 @@ "version": "0.49.12", "date": "2025-04-04T07:31:08Z" }, - { - "name": "wazuh/wazuh", - "version": "coverity-w14-4.12.0", - "date": "2025-04-04T00:03:06Z" - }, { "name": "minio/minio", "version": "RELEASE.2025-04-03T14-56-28Z", @@ -458,15 +463,5 @@ "name": "openhab/openhab-core", "version": "4.3.4", "date": "2025-03-30T13:32:38Z" - }, - { - "name": "pocketbase/pocketbase", - "version": "v0.26.6", - "date": "2025-03-30T08:02:19Z" - }, - { - "name": "Readarr/Readarr", - "version": "v2.0.0.4645", - "date": "2017-03-07T18:56:06Z" } ] From afe927269df847e7013faf9c426c54150d336f01 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:03:59 +0200 Subject: [PATCH 0390/1614] Update alpine-postgresql-install.sh --- install/alpine-postgresql-install.sh | 71 ++++++++++++---------------- 1 file changed, 29 insertions(+), 42 deletions(-) diff --git a/install/alpine-postgresql-install.sh b/install/alpine-postgresql-install.sh index b91f499..8bc317c 100644 --- a/install/alpine-postgresql-install.sh +++ b/install/alpine-postgresql-install.sh @@ -36,50 +36,37 @@ sed -i '/^host\s\+all\s\+all\s\+127.0.0.1\/32\s\+md5/ s/.*/host all all 0.0.0.0\ rc-service postgresql restart msg_ok "Configured and Restarted PostgreSQL" -read -p "Do you want to install Adminer with Lighttpd? (y/N): " install_adminer -if [[ "$install_adminer" =~ ^[Yy]$ ]]; then - msg_info "Installing Adminer with Lighttpd" - apk add --no-cache php php-pdo_pgsql php-session php-json php-mbstring lighttpd - msg_ok "Installed Lighttpd and PHP" +read -r -p "Would you like to install Adminer with lighttpd? : " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing Adminer and dependencies" + $STD apk add --no-cache \ + lighttpd \ + lighttpd-openrc \ + php83 \ + php83-cgi \ + php83-common \ + php83-curl \ + php83-gd \ + php83-mbstring \ + php83-mysqli \ + php83-mysqlnd \ + php83-openssl \ + php83-zip \ + php83-session \ + jq - msg_info "Downloading Adminer" - mkdir -p /var/www/adminer - curl -fsSL "https://www.adminer.org/latest.php" -o /var/www/adminer/index.php - chown -R lighttpd:lighttpd /var/www/adminer - msg_ok "Installed Adminer" + sed -i 's|# *include "mod_fastcgi.conf"|include "mod_fastcgi.conf"|' /etc/lighttpd/lighttpd.conf + mkdir -p /var/www/localhost/htdocs + ADMINER_VERSION=$(curl -fsSL https://api.github.com/repos/vrana/adminer/releases/latest | jq -r '.tag_name' | sed 's/^v//') + curl -fsSL "https://github.com/vrana/adminer/releases/download/v${ADMINER_VERSION}/adminer-${ADMINER_VERSION}.php" -o /var/www/localhost/htdocs/adminer.php + chown lighttpd:lighttpd /var/www/localhost/htdocs/adminer.php + chmod 755 /var/www/localhost/htdocs/adminer.php + msg_ok "Adminer Installed" - msg_info "Configuring Lighttpd" - echo 'server.modules = ( - "mod_access", - "mod_alias", - "mod_fastcgi" -) - -server.document-root = "/var/www/adminer" -server.port = 9000 -server.bind = "0.0.0.0" -index-file.names = ("index.php") - -fastcgi.server = ( ".php" => (( - "bin-path" => "/usr/bin/php-cgi", - "socket" => "/var/run/php-fcgi.sock" -))) - -server.dir-listing = "disable" - -accesslog.filename = "/var/log/lighttpd/access.log" -server.errorlog = "/var/log/lighttpd/error.log" - -include "modules.conf"' >/etc/lighttpd/lighttpd.conf - - rc-update add lighttpd default - msg_ok "Configured Lighttpd" - - msg_info "Starting Lighttpd" - service lighttpd start - msg_ok "Started Lighttpd (Adminer available on Port 8080)" -else - msg_ok "Skipped Adminer and Lighttpd installation." + msg_info "Starting Lighttpd" + $STD rc-update add lighttpd default + $STD rc-service lighttpd restart + msg_ok "Lighttpd Started" fi motd_ssh From 96b2170e941fc3025e13807bb071002fd5a8da1b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:11:01 +0200 Subject: [PATCH 0391/1614] Update alpine-postgresql-install.sh --- install/alpine-postgresql-install.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/install/alpine-postgresql-install.sh b/install/alpine-postgresql-install.sh index 8bc317c..464dac2 100644 --- a/install/alpine-postgresql-install.sh +++ b/install/alpine-postgresql-install.sh @@ -14,26 +14,23 @@ network_check update_os msg_info "Installing PostgreSQL" -$STD apk add --no-cache postgresql16 postgresql16-contrib postgresql16-openrc +$STD apk add --no-cache postgresql16 postgresql16-contrib postgresql16-openrc sudo msg_ok "Installed PostgreSQL" msg_info "Enabling PostgreSQL Service" -rc-update add postgresql default +$STD rc-update add postgresql default msg_ok "Enabled PostgreSQL Service" msg_info "Starting PostgreSQL" -rc-service postgresql start +$STD rc-service postgresql start msg_ok "Started PostgreSQL" msg_info "Configuring PostgreSQL for External Access" conf_file="/etc/postgresql16/postgresql.conf" hba_file="/etc/postgresql16/pg_hba.conf" - sed -i 's/^#listen_addresses =.*/listen_addresses = '\''*'\''/' "$conf_file" - sed -i '/^host\s\+all\s\+all\s\+127.0.0.1\/32\s\+md5/ s/.*/host all all 0.0.0.0\/0 md5/' "$hba_file" - -rc-service postgresql restart +$STD rc-service postgresql restart msg_ok "Configured and Restarted PostgreSQL" read -r -p "Would you like to install Adminer with lighttpd? : " prompt From 81cbd0db5d9363159fa57db56de9c60bbe56d410 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:14:12 +0200 Subject: [PATCH 0392/1614] Update alpine-postgresql-install.sh --- install/alpine-postgresql-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-postgresql-install.sh b/install/alpine-postgresql-install.sh index 464dac2..b8cf021 100644 --- a/install/alpine-postgresql-install.sh +++ b/install/alpine-postgresql-install.sh @@ -45,8 +45,8 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then php83-curl \ php83-gd \ php83-mbstring \ - php83-mysqli \ - php83-mysqlnd \ + php83-pdo \ + php83-pgsql \ php83-openssl \ php83-zip \ php83-session \ From 279c72c94346c796540ded1f531f0fb421302ff4 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Tue, 8 Apr 2025 11:16:44 -0400 Subject: [PATCH 0393/1614] Immich: fix unfixed formatting --- install/immich-install.sh | 130 +++++++++++++++++++------------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/install/immich-install.sh b/install/immich-install.sh index 4706b38..58e3395 100644 --- a/install/immich-install.sh +++ b/install/immich-install.sh @@ -21,8 +21,8 @@ echo "deb http://deb.debian.org/debian testing main contrib" >/etc/apt/sources.l echo "Pin-Priority: -10" } >/etc/apt/preferences.d/immich -"$STD" apt-get update -"$STD" apt-get install --no-install-recommends -y \ +$STD apt-get update +$STD apt-get install --no-install-recommends -y \ git \ redis \ python3-venv \ @@ -68,7 +68,7 @@ echo "deb http://deb.debian.org/debian testing main contrib" >/etc/apt/sources.l zlib1g \ ocl-icd-libopencl1 \ intel-media-va-driver -"$STD" apt-get install -y \ +$STD apt-get install -y \ libgdk-pixbuf-2.0-dev librsvg2-dev libtool curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg DPKG_ARCHITECTURE="$(dpkg --print-architecture)" @@ -81,8 +81,8 @@ Components: main Architectures: ${DPKG_ARCHITECTURE} Signed-By: /etc/apt/keyrings/jellyfin.gpg EOF -"$STD" apt-get update -"$STD" apt-get install -y jellyfin-ffmpeg7 +$STD apt-get update +$STD apt-get install -y jellyfin-ffmpeg7 ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe tmp_dir=$(mktemp -d) @@ -91,20 +91,20 @@ curl -fsSL https://github.com/intel/intel-graphics-compiler/releases/download/ig curl -fsSL https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17193.4/intel-igc-opencl_1.0.17193.4_amd64.deb -O curl -fsSL https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/intel-opencl-icd_24.26.30049.6_amd64.deb -O curl -fsSL https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/libigdgmm12_22.3.20_amd64.deb -O -"$STD" dpkg -i ./*.deb +$STD dpkg -i ./*.deb msg_ok "Base Dependencies Installed" msg_info "Setting up Postgresql Database" -"$STD" apt-get install -y postgresql-common +$STD apt-get install -y postgresql-common echo "YES" | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh &>/dev/null -"$STD" apt-get install -y postgresql-17 postgresql-17-pgvector +$STD apt-get install -y postgresql-17 postgresql-17-pgvector DB_NAME="immich" DB_USER="immich" DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c18) -"$STD" sudo -u postgres psql -c "CREATE USER $DB_USER WITH ENCRYPTED PASSWORD '$DB_PASS';" -"$STD" sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" -"$STD" sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;" -"$STD" sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" +$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH ENCRYPTED PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;" +$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" { echo "${APPLICATION} DB Credentials" echo "Database User: $DB_USER" @@ -116,14 +116,14 @@ msg_ok "Set up Postgresql Database" msg_info "Installing NodeJS" curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -"$STD" apt-get update -"$STD" apt-get install -y nodejs +$STD apt-get update +$STD apt-get install -y nodejs msg_ok "Installed NodeJS" msg_info "Installing Packages from Testing Repo" export APT_LISTCHANGES_FRONTEND=none export DEBIAN_FRONTEND=noninteractive -"$STD" apt-get install -t testing --no-install-recommends -y \ +$STD apt-get install -t testing --no-install-recommends -y \ libio-compress-brotli-perl \ libwebp7 \ libwebpdemux2 \ @@ -135,15 +135,15 @@ export DEBIAN_FRONTEND=noninteractive msg_ok "Packages from Testing Repo Installed" # Fix default DB collation issue -"$STD" sudo -u postgres psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;" -"$STD" sudo -u postgres psql -c "ALTER DATABASE $DB_NAME REFRESH COLLATION VERSION;" +$STD sudo -u postgres psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;" +$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME REFRESH COLLATION VERSION;" msg_info "Compiling Custom Photo-processing Library (extreme patience)" STAGING_DIR=/opt/staging BASE_REPO="https://github.com/immich-app/base-images" BASE_DIR=${STAGING_DIR}/base-images SOURCE_DIR=${STAGING_DIR}/image-source -"$STD" git clone -b main "$BASE_REPO" "$BASE_DIR" # TODO: convert this git clone into a TAG download +$STD git clone -b main "$BASE_REPO" "$BASE_DIR" # TODO: convert this git clone into a TAG download mkdir -p "$SOURCE_DIR" cd "$STAGING_DIR" || exit @@ -151,15 +151,15 @@ SOURCE=${SOURCE_DIR}/libjxl JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62" JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0" : "${LIBJXL_REVISION:=$(jq -cr '.sources[] | select(.name == "libjxl").revision' $BASE_DIR/server/bin/build-lock.json)}" -"$STD" git clone https://github.com/libjxl/libjxl.git "$SOURCE" +$STD git clone https://github.com/libjxl/libjxl.git "$SOURCE" cd "$SOURCE" || exit -"$STD" git reset --hard "$LIBJXL_REVISION" -"$STD" git submodule update --init --recursive --depth 1 --recommend-shallow -"$STD" git apply "$BASE_DIR"/server/bin/patches/jpegli-empty-dht-marker.patch -"$STD" git apply "$BASE_DIR"/server/bin/patches/jpegli-icc-warning.patch +$STD git reset --hard "$LIBJXL_REVISION" +$STD git submodule update --init --recursive --depth 1 --recommend-shallow +$STD git apply "$BASE_DIR"/server/bin/patches/jpegli-empty-dht-marker.patch +$STD git apply "$BASE_DIR"/server/bin/patches/jpegli-icc-warning.patch mkdir build cd build || exit -"$STD" cmake \ +$STD cmake \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING=OFF \ -DJPEGXL_ENABLE_DOXYGEN=OFF \ @@ -177,21 +177,21 @@ cd build || exit -DJPEGLI_LIBJPEG_LIBRARY_VERSION="$JPEGLI_LIBJPEG_LIBRARY_VERSION" \ -DLIBJPEG_TURBO_VERSION_NUMBER=2001005 \ .. -"$STD" cmake --build . -- -j"$(nproc)" -"$STD" cmake --install . -"$STD" ldconfig /usr/local/lib -"$STD" make clean +$STD cmake --build . -- -j"$(nproc)" +$STD cmake --install . +$STD ldconfig /usr/local/lib +$STD make clean cd "$STAGING_DIR" || exit rm -rf "$SOURCE"/{build,third_party} SOURCE=${SOURCE_DIR}/libheif : "${LIBHEIF_REVISION:=$(jq -cr '.sources[] | select(.name == "libheif").revision' $BASE_DIR/server/bin/build-lock.json)}" -"$STD" git clone https://github.com/strukturag/libheif.git "$SOURCE" +$STD git clone https://github.com/strukturag/libheif.git "$SOURCE" cd "$SOURCE" || exit -"$STD" git reset --hard "$LIBHEIF_REVISION" +$STD git reset --hard "$LIBHEIF_REVISION" mkdir build cd build || exit -"$STD" cmake --preset=release-noplugins \ +$STD cmake --preset=release-noplugins \ -DWITH_DAV1D=ON \ -DENABLE_PARALLEL_TILE_DECODING=ON \ -DWITH_LIBSHARPYUV=ON \ @@ -201,46 +201,46 @@ cd build || exit -DWITH_X265=OFF \ -DWITH_EXAMPLES=OFF \ .. -"$STD" make install +$STD make install ldconfig /usr/local/lib -"$STD" make clean +$STD make clean cd "$STAGING_DIR" || exit rm -rf "$SOURCE"/build SOURCE=${SOURCE_DIR}/libraw : "${LIBRAW_REVISION:=$(jq -cr '.sources[] | select(.name == "libraw").revision' $BASE_DIR/server/bin/build-lock.json)}" -"$STD" git clone https://github.com/libraw/libraw.git "$SOURCE" +$STD git clone https://github.com/libraw/libraw.git "$SOURCE" cd "$SOURCE" || exit -"$STD" git reset --hard "$LIBRAW_REVISION" -"$STD" autoreconf --install -"$STD" ./configure -"$STD" make -j"$(nproc)" -"$STD" make install +$STD git reset --hard "$LIBRAW_REVISION" +$STD autoreconf --install +$STD ./configure +$STD make -j"$(nproc)" +$STD make install ldconfig /usr/local/lib -"$STD" make clean +$STD make clean cd "$STAGING_DIR" || exit SOURCE=$SOURCE_DIR/imagemagick : "${IMAGEMAGICK_REVISION:=$(jq -cr '.sources[] | select(.name == "imagemagick").revision' $BASE_DIR/server/bin/build-lock.json)}" -"$STD" git clone https://github.com/ImageMagick/ImageMagick.git "$SOURCE" +$STD git clone https://github.com/ImageMagick/ImageMagick.git "$SOURCE" cd "$SOURCE" || exit -"$STD" git reset --hard "$IMAGEMAGICK_REVISION" -"$STD" ./configure --with-modules -"$STD" make -j"$(nproc)" -"$STD" make install +$STD git reset --hard "$IMAGEMAGICK_REVISION" +$STD ./configure --with-modules +$STD make -j"$(nproc)" +$STD make install ldconfig /usr/local/lib -"$STD" make clean +$STD make clean cd "$STAGING_DIR" || exit SOURCE=$SOURCE_DIR/libvips : "${LIBVIPS_REVISION:=$(jq -cr '.sources[] | select(.name == "libvips").revision' $BASE_DIR/server/bin/build-lock.json)}" -"$STD" git clone https://github.com/libvips/libvips.git "$SOURCE" +$STD git clone https://github.com/libvips/libvips.git "$SOURCE" cd "$SOURCE" || exit -"$STD" git reset --hard "$LIBVIPS_REVISION" -"$STD" meson setup build --buildtype=release --libdir=lib -Dintrospection=disabled -Dtiff=disabled +$STD git reset --hard "$LIBVIPS_REVISION" +$STD meson setup build --buildtype=release --libdir=lib -Dintrospection=disabled -Dtiff=disabled cd build || exit -"$STD" ninja install -"$STD" ldconfig /usr/local/lib +$STD ninja install +$STD ldconfig /usr/local/lib cd "$STAGING_DIR" || exit rm -rf "$SOURCE"/build msg_ok "Custom Photo-processing Library Compiled" @@ -261,15 +261,15 @@ mv "$APPLICATION-$RELEASE"/ "$SRC_DIR" mkdir -p "{$APP_DIR,$UPLOAD_DIR,$GEO_DIR,$ML_DIR,$INSTALL_DIR/.cache}" cd "$SRC_DIR"/server || exit -"$STD" npm ci -"$STD" npm run build -"$STD" npm prune --omit=dev --omit=optional +$STD npm ci +$STD npm run build +$STD npm prune --omit=dev --omit=optional cd "$SRC_DIR"/open-api/typescript-sdk || exit -"$STD" npm ci -"$STD" npm run build +$STD npm ci +$STD npm run build cd "$SRC_DIR"/web || exit -"$STD" npm ci -"$STD" npm run build +$STD npm ci +$STD npm run build cd "$SRC_DIR" || exit cp -a server/{node_modules,dist,bin,resources,package.json,package-lock.json,start*.sh} "$APP_DIR"/ cp -a web/build "$APP_DIR"/www @@ -277,11 +277,11 @@ cp LICENSE "$APP_DIR" cp "$BASE_DIR"/server/bin/build-lock.json "$APP_DIR" cd "$SRC_DIR"/machine-learning || exit -"$STD" python3 -m venv "$ML_DIR"/ml-venv +$STD python3 -m venv "$ML_DIR"/ml-venv ( . "$ML_DIR"/ml-venv/bin/activate - "$STD" pip3 install uv - "$STD" uv sync --extra cpu --active + $STD pip3 install uv + $STD uv sync --extra cpu --active ) cd "$SRC_DIR" || exit cp -a machine-learning/{ann,immich_ml} "$ML_DIR" @@ -296,9 +296,9 @@ ln -s "$UPLOAD_DIR" "$APP_DIR"/upload ln -s "$UPLOAD_DIR" "$ML_DIR"/upload msg_info "Installing Immich CLI" -"$STD" npm install --build-from-source sharp +$STD npm install --build-from-source sharp rm -rf "$APP_DIR"/node_modules/@img/sharp-{libvips*,linuxmusl-x64} -"$STD" npm i -g @immich/cli +$STD npm i -g @immich/cli msg_ok "Installed Immich CLI" msg_info "Installing GeoNames data" @@ -397,6 +397,6 @@ customize msg_info "Cleaning up" rm -f "$tmp_file" rm -rf "$tmp_dir" -"$STD" apt-get -y autoremove -"$STD" apt-get -y autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" From ab3b6aa147ee4b4805ed0e888e289b8bda11e7e5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 11:12:04 +0200 Subject: [PATCH 0394/1614] add new alpine installs --- ct/alpine-adguard.sh | 46 ++++++++++++++++++ ct/alpine-postgresql.sh | 46 ------------------ ct/alpine-syncthing.sh | 46 ++++++++++++++++++ install/alpine-adguard-install.sh | 47 +++++++++++++++++++ install/alpine-postgresql-install.sh | 70 ---------------------------- install/alpine-syncthing-install.sh | 29 ++++++++++++ 6 files changed, 168 insertions(+), 116 deletions(-) create mode 100644 ct/alpine-adguard.sh delete mode 100644 ct/alpine-postgresql.sh create mode 100644 ct/alpine-syncthing.sh create mode 100644 install/alpine-adguard-install.sh delete mode 100644 install/alpine-postgresql-install.sh create mode 100644 install/alpine-syncthing-install.sh diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh new file mode 100644 index 0000000..99481f1 --- /dev/null +++ b/ct/alpine-adguard.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://adguardhome.com/ + +APP="Alpine-AdGuard" +var_tags="${var_tags:-alpine;networking}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + msg_info "Updating Alpine Packages" + $STD apk update + $STD apk upgrade + msg_ok "Updated Alpine Packages" + + msg_info "Updating AdGuard Home" + $STD /opt/adguardhome/AdGuardHome --update + msg_ok "Updated AdGuard Home" + + msg_info "Restarting AdGuard Home" + $STD rc-service adguardhome restart + msg_ok "Restarted AdGuard Home" + + exit 0 +} + +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}:3000${CL}" diff --git a/ct/alpine-postgresql.sh b/ct/alpine-postgresql.sh deleted file mode 100644 index 2ebb0aa..0000000 --- a/ct/alpine-postgresql.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/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://postgresql.org/ - -APP="Alpine-Postgresql" -var_tags="${var_tags:-alpine;database}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-256}" -var_disk="${var_disk:-1}" -var_os="${var_os:-alpine}" -var_version="${var_version:-3.21}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade - msg_ok "Updated Alpine Packages" - - msg_info "Updating PostgreSQL" - $STD apk upgrade postgresql postgresql-contrib - msg_ok "Updated PostgreSQL" - - msg_info "Restarting PostgreSQL" - $STD rc-service postgresql restart - msg_ok "Restarted PostgreSQL" - - exit 0 -} - -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 IP:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}${IP}:5432${CL}" diff --git a/ct/alpine-syncthing.sh b/ct/alpine-syncthing.sh new file mode 100644 index 0000000..b48c3bf --- /dev/null +++ b/ct/alpine-syncthing.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://syncthing.net/ + +APP="Alpine-Syncthing" +var_tags="${var_tags:-alpine;networking}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + msg_info "Updating Alpine Packages" + $STD apk update + $STD apk upgrade + msg_ok "Updated Alpine Packages" + + msg_info "Updating Syncthing" + $STD $STD apk upgrade syncthing + msg_ok "Updated Syncthing" + + msg_info "Restarting Syncthing" + $STD rc-service syncthing restart + msg_ok "Restarted Syncthing" + + exit 0 +} + +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}:8384${CL}" diff --git a/install/alpine-adguard-install.sh b/install/alpine-adguard-install.sh new file mode 100644 index 0000000..fa0d5ba --- /dev/null +++ b/install/alpine-adguard-install.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://adguardhome.com/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Downloading AdGuard Home" +$STD curl -fsSL -o /tmp/AdGuardHome_linux_amd64.tar.gz \ + "https://github.com/AdguardTeam/AdGuardHome/releases/latest/download/AdGuardHome_linux_amd64.tar.gz" +msg_ok "Downloaded AdGuard Home" + +msg_info "Installing AdGuard Home" +$STD tar -xzf /tmp/AdGuardHome_linux_amd64.tar.gz -C /opt +$STD rm /tmp/AdGuardHome_linux_amd64.tar.gz +msg_ok "Installed AdGuard Home" + +msg_info "Creating AdGuard Home Service" +cat </etc/init.d/adguardhome +#!/sbin/openrc-run +name="AdGuardHome" +description="AdGuard Home Service" +command="/opt/AdGuardHome/AdGuardHome" +command_background="yes" +pidfile="/run/adguardhome.pid" +EOF +$STD chmod +x /etc/init.d/adguardhome +msg_ok "Created AdGuard Home Service" + +msg_info "Enabling AdGuard Home Service" +$STD rc-update add adguardhome default +msg_ok "Enabled AdGuard Home Service" + +msg_info "Starting AdGuard Home" +$STD rc-service adguardhome start +msg_ok "Started AdGuard Home" + +motd_ssh +customize diff --git a/install/alpine-postgresql-install.sh b/install/alpine-postgresql-install.sh deleted file mode 100644 index b8cf021..0000000 --- a/install/alpine-postgresql-install.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.postgresql.org/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing PostgreSQL" -$STD apk add --no-cache postgresql16 postgresql16-contrib postgresql16-openrc sudo -msg_ok "Installed PostgreSQL" - -msg_info "Enabling PostgreSQL Service" -$STD rc-update add postgresql default -msg_ok "Enabled PostgreSQL Service" - -msg_info "Starting PostgreSQL" -$STD rc-service postgresql start -msg_ok "Started PostgreSQL" - -msg_info "Configuring PostgreSQL for External Access" -conf_file="/etc/postgresql16/postgresql.conf" -hba_file="/etc/postgresql16/pg_hba.conf" -sed -i 's/^#listen_addresses =.*/listen_addresses = '\''*'\''/' "$conf_file" -sed -i '/^host\s\+all\s\+all\s\+127.0.0.1\/32\s\+md5/ s/.*/host all all 0.0.0.0\/0 md5/' "$hba_file" -$STD rc-service postgresql restart -msg_ok "Configured and Restarted PostgreSQL" - -read -r -p "Would you like to install Adminer with lighttpd? : " prompt -if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - msg_info "Installing Adminer and dependencies" - $STD apk add --no-cache \ - lighttpd \ - lighttpd-openrc \ - php83 \ - php83-cgi \ - php83-common \ - php83-curl \ - php83-gd \ - php83-mbstring \ - php83-pdo \ - php83-pgsql \ - php83-openssl \ - php83-zip \ - php83-session \ - jq - - sed -i 's|# *include "mod_fastcgi.conf"|include "mod_fastcgi.conf"|' /etc/lighttpd/lighttpd.conf - mkdir -p /var/www/localhost/htdocs - ADMINER_VERSION=$(curl -fsSL https://api.github.com/repos/vrana/adminer/releases/latest | jq -r '.tag_name' | sed 's/^v//') - curl -fsSL "https://github.com/vrana/adminer/releases/download/v${ADMINER_VERSION}/adminer-${ADMINER_VERSION}.php" -o /var/www/localhost/htdocs/adminer.php - chown lighttpd:lighttpd /var/www/localhost/htdocs/adminer.php - chmod 755 /var/www/localhost/htdocs/adminer.php - msg_ok "Adminer Installed" - - msg_info "Starting Lighttpd" - $STD rc-update add lighttpd default - $STD rc-service lighttpd restart - msg_ok "Lighttpd Started" -fi - -motd_ssh -customize diff --git a/install/alpine-syncthing-install.sh b/install/alpine-syncthing-install.sh new file mode 100644 index 0000000..701c052 --- /dev/null +++ b/install/alpine-syncthing-install.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://syncthing.net/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Setup Syncthing" +$STD apk add --no-cache syncthing +msg_ok "Setup Syncthing" + +msg_info "Enabling Syncthing Service" +$STD rc-update add syncthing default +msg_ok "Enabled Syncthing Service" + +msg_info "Starting Syncthing" +$STD rc-service syncthing start +msg_ok "Started Syncthing" + +motd_ssh +customize From 98abd67aa9abe5379f04d6a27f8b45d3eb8423c8 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 9 Apr 2025 09:12:22 +0000 Subject: [PATCH 0395/1614] Update .app files --- ct/headers/alpine-adguard | 6 ++++++ ct/headers/alpine-postgresql | 6 ------ ct/headers/alpine-syncthing | 6 ++++++ 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 ct/headers/alpine-adguard delete mode 100644 ct/headers/alpine-postgresql create mode 100644 ct/headers/alpine-syncthing diff --git a/ct/headers/alpine-adguard b/ct/headers/alpine-adguard new file mode 100644 index 0000000..64d1d6a --- /dev/null +++ b/ct/headers/alpine-adguard @@ -0,0 +1,6 @@ + ___ __ _ ___ ________ __ + / | / /___ (_)___ ___ / | ____/ / ____/_ ______ __________/ / + / /| | / / __ \/ / __ \/ _ \______/ /| |/ __ / / __/ / / / __ `/ ___/ __ / + / ___ |/ / /_/ / / / / / __/_____/ ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / +/_/ |_/_/ .___/_/_/ /_/\___/ /_/ |_\__,_/\____/\__,_/\__,_/_/ \__,_/ + /_/ diff --git a/ct/headers/alpine-postgresql b/ct/headers/alpine-postgresql deleted file mode 100644 index 3ce43b9..0000000 --- a/ct/headers/alpine-postgresql +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ _ ____ __ __ - / | / /___ (_)___ ___ / __ \____ _____/ /_____ _________ _________ _/ / - / /| | / / __ \/ / __ \/ _ \______/ /_/ / __ \/ ___/ __/ __ `/ ___/ _ \/ ___/ __ `/ / - / ___ |/ / /_/ / / / / / __/_____/ ____/ /_/ (__ ) /_/ /_/ / / / __(__ ) /_/ / / -/_/ |_/_/ .___/_/_/ /_/\___/ /_/ \____/____/\__/\__, /_/ \___/____/\__, /_/ - /_/ /____/ /_/ diff --git a/ct/headers/alpine-syncthing b/ct/headers/alpine-syncthing new file mode 100644 index 0000000..8d684d6 --- /dev/null +++ b/ct/headers/alpine-syncthing @@ -0,0 +1,6 @@ + ___ __ _ _____ __ __ _ + / | / /___ (_)___ ___ / ___/__ ______ _____/ /_/ /_ (_)___ ____ _ + / /| | / / __ \/ / __ \/ _ \______\__ \/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ + / ___ |/ / /_/ / / / / / __/_____/__/ / /_/ / / / / /__/ /_/ / / / / / / / /_/ / +/_/ |_/_/ .___/_/_/ /_/\___/ /____/\__, /_/ /_/\___/\__/_/ /_/_/_/ /_/\__, / + /_/ /____/ /____/ From 2671c388d0c36488ad479dd51c4b26e22be47376 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:21:55 +0200 Subject: [PATCH 0396/1614] fix paths --- ct/alpine-duplicati.sh | 41 +++++++++++++++++++ install/alpine-duplicati-install.sh | 24 +++++++++++ {scripts => tools}/tools/add-iptag.sh | 0 {scripts => tools}/tools/code-server.sh | 0 .../tools/container-restore-from-backup.sh | 0 .../tools/core-restore-from-backup.sh | 0 {scripts => tools}/tools/filebrowser.sh | 0 {scripts => tools}/tools/frigate-support.sh | 0 {scripts => tools}/tools/gpu-amd.func | 0 {scripts => tools}/tools/gpu-intel.func | 0 {scripts => tools}/tools/gpu-nvidia.func | 0 {scripts => tools}/tools/grafana-loki.sh | 0 {scripts => tools}/tools/host-backup.sh | 0 {scripts => tools}/tools/hw-acceleration.sh | 0 {scripts => tools}/tools/kernel-clean.sh | 0 {scripts => tools}/tools/pyenv.sh | 0 .../tools/switch_from_VED_to_VE.sh | 0 {scripts => tools}/tools/usb-passthrough.sh | 0 {scripts/vms => vms}/debian-vm-test-helper.sh | 0 {scripts/vms => vms}/debian-vm.sh | 0 20 files changed, 65 insertions(+) create mode 100644 ct/alpine-duplicati.sh create mode 100644 install/alpine-duplicati-install.sh rename {scripts => tools}/tools/add-iptag.sh (100%) rename {scripts => tools}/tools/code-server.sh (100%) rename {scripts => tools}/tools/container-restore-from-backup.sh (100%) rename {scripts => tools}/tools/core-restore-from-backup.sh (100%) rename {scripts => tools}/tools/filebrowser.sh (100%) rename {scripts => tools}/tools/frigate-support.sh (100%) rename {scripts => tools}/tools/gpu-amd.func (100%) rename {scripts => tools}/tools/gpu-intel.func (100%) rename {scripts => tools}/tools/gpu-nvidia.func (100%) rename {scripts => tools}/tools/grafana-loki.sh (100%) rename {scripts => tools}/tools/host-backup.sh (100%) rename {scripts => tools}/tools/hw-acceleration.sh (100%) rename {scripts => tools}/tools/kernel-clean.sh (100%) rename {scripts => tools}/tools/pyenv.sh (100%) rename {scripts => tools}/tools/switch_from_VED_to_VE.sh (100%) rename {scripts => tools}/tools/usb-passthrough.sh (100%) rename {scripts/vms => vms}/debian-vm-test-helper.sh (100%) rename {scripts/vms => vms}/debian-vm.sh (100%) diff --git a/ct/alpine-duplicati.sh b/ct/alpine-duplicati.sh new file mode 100644 index 0000000..ceacf54 --- /dev/null +++ b/ct/alpine-duplicati.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) + +APP="Alpine-Duplicati" +var_tags="${var_tags:-alpine}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + msg_info "Updating Alpine Packages" + $STD apk update + $STD apk upgrade + msg_ok "Updated Alpine Packages" + + msg_info "Updating Duplicati" + $STD apk upgrade duplicati + msg_ok "Updated Duplicati" + + msg_info "Restarting Duplicati" + $STD rc-service duplicati restart || true + msg_ok "Restarted Duplicati" + + exit 0 +} + +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 info will vary based on service config. CLI access likely available. ${CL}" diff --git a/install/alpine-duplicati-install.sh b/install/alpine-duplicati-install.sh new file mode 100644 index 0000000..18cbd45 --- /dev/null +++ b/install/alpine-duplicati-install.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apk add --no-cache duplicati +msg_ok "Installed duplicati" + +msg_info "Enabling duplicati Service" +$STD rc-update add duplicati default || true +msg_ok "Enabled duplicati Service" + +msg_info "Starting duplicati" +$STD rc-service duplicati start || true +msg_ok "Started duplicati" + +motd_ssh +customize diff --git a/scripts/tools/add-iptag.sh b/tools/tools/add-iptag.sh similarity index 100% rename from scripts/tools/add-iptag.sh rename to tools/tools/add-iptag.sh diff --git a/scripts/tools/code-server.sh b/tools/tools/code-server.sh similarity index 100% rename from scripts/tools/code-server.sh rename to tools/tools/code-server.sh diff --git a/scripts/tools/container-restore-from-backup.sh b/tools/tools/container-restore-from-backup.sh similarity index 100% rename from scripts/tools/container-restore-from-backup.sh rename to tools/tools/container-restore-from-backup.sh diff --git a/scripts/tools/core-restore-from-backup.sh b/tools/tools/core-restore-from-backup.sh similarity index 100% rename from scripts/tools/core-restore-from-backup.sh rename to tools/tools/core-restore-from-backup.sh diff --git a/scripts/tools/filebrowser.sh b/tools/tools/filebrowser.sh similarity index 100% rename from scripts/tools/filebrowser.sh rename to tools/tools/filebrowser.sh diff --git a/scripts/tools/frigate-support.sh b/tools/tools/frigate-support.sh similarity index 100% rename from scripts/tools/frigate-support.sh rename to tools/tools/frigate-support.sh diff --git a/scripts/tools/gpu-amd.func b/tools/tools/gpu-amd.func similarity index 100% rename from scripts/tools/gpu-amd.func rename to tools/tools/gpu-amd.func diff --git a/scripts/tools/gpu-intel.func b/tools/tools/gpu-intel.func similarity index 100% rename from scripts/tools/gpu-intel.func rename to tools/tools/gpu-intel.func diff --git a/scripts/tools/gpu-nvidia.func b/tools/tools/gpu-nvidia.func similarity index 100% rename from scripts/tools/gpu-nvidia.func rename to tools/tools/gpu-nvidia.func diff --git a/scripts/tools/grafana-loki.sh b/tools/tools/grafana-loki.sh similarity index 100% rename from scripts/tools/grafana-loki.sh rename to tools/tools/grafana-loki.sh diff --git a/scripts/tools/host-backup.sh b/tools/tools/host-backup.sh similarity index 100% rename from scripts/tools/host-backup.sh rename to tools/tools/host-backup.sh diff --git a/scripts/tools/hw-acceleration.sh b/tools/tools/hw-acceleration.sh similarity index 100% rename from scripts/tools/hw-acceleration.sh rename to tools/tools/hw-acceleration.sh diff --git a/scripts/tools/kernel-clean.sh b/tools/tools/kernel-clean.sh similarity index 100% rename from scripts/tools/kernel-clean.sh rename to tools/tools/kernel-clean.sh diff --git a/scripts/tools/pyenv.sh b/tools/tools/pyenv.sh similarity index 100% rename from scripts/tools/pyenv.sh rename to tools/tools/pyenv.sh diff --git a/scripts/tools/switch_from_VED_to_VE.sh b/tools/tools/switch_from_VED_to_VE.sh similarity index 100% rename from scripts/tools/switch_from_VED_to_VE.sh rename to tools/tools/switch_from_VED_to_VE.sh diff --git a/scripts/tools/usb-passthrough.sh b/tools/tools/usb-passthrough.sh similarity index 100% rename from scripts/tools/usb-passthrough.sh rename to tools/tools/usb-passthrough.sh diff --git a/scripts/vms/debian-vm-test-helper.sh b/vms/debian-vm-test-helper.sh similarity index 100% rename from scripts/vms/debian-vm-test-helper.sh rename to vms/debian-vm-test-helper.sh diff --git a/scripts/vms/debian-vm.sh b/vms/debian-vm.sh similarity index 100% rename from scripts/vms/debian-vm.sh rename to vms/debian-vm.sh From d0d7030b14b073bcb42214a52cb9a36c909757b6 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 9 Apr 2025 12:22:10 +0000 Subject: [PATCH 0397/1614] Update .app files --- ct/headers/alpine-duplicati | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/alpine-duplicati diff --git a/ct/headers/alpine-duplicati b/ct/headers/alpine-duplicati new file mode 100644 index 0000000..b2fca39 --- /dev/null +++ b/ct/headers/alpine-duplicati @@ -0,0 +1,6 @@ + ___ __ _ ____ ___ __ _ + / | / /___ (_)___ ___ / __ \__ ______ / (_)________ _/ /_(_) + / /| | / / __ \/ / __ \/ _ \______/ / / / / / / __ \/ / / ___/ __ `/ __/ / + / ___ |/ / /_/ / / / / / __/_____/ /_/ / /_/ / /_/ / / / /__/ /_/ / /_/ / +/_/ |_/_/ .___/_/_/ /_/\___/ /_____/\__,_/ .___/_/_/\___/\__,_/\__/_/ + /_/ /_/ From b67b565d2339205a9cd18aeeaaa63b1c158ea2e1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:23:35 +0200 Subject: [PATCH 0398/1614] fixes --- tools/{tools => addon}/add-iptag.sh | 0 tools/{tools => addon}/code-server.sh | 0 tools/{tools => addon}/filebrowser.sh | 0 tools/{tools => addon}/grafana-loki.sh | 0 tools/addon/phpmyadmin.sh | 123 ++++++++++++++++++ .../container-restore-from-backup.sh | 0 .../core-restore-from-backup.sh | 0 tools/{tools => pve}/frigate-support.sh | 0 tools/{tools => pve}/gpu-amd.func | 0 tools/{tools => pve}/gpu-intel.func | 0 tools/{tools => pve}/gpu-nvidia.func | 0 tools/{tools => pve}/host-backup.sh | 0 tools/{tools => pve}/hw-acceleration.sh | 0 tools/{tools => pve}/kernel-clean.sh | 0 tools/{tools => pve}/pyenv.sh | 0 tools/{tools => pve}/switch_from_VED_to_VE.sh | 0 tools/{tools => pve}/usb-passthrough.sh | 0 17 files changed, 123 insertions(+) rename tools/{tools => addon}/add-iptag.sh (100%) rename tools/{tools => addon}/code-server.sh (100%) rename tools/{tools => addon}/filebrowser.sh (100%) rename tools/{tools => addon}/grafana-loki.sh (100%) create mode 100644 tools/addon/phpmyadmin.sh rename tools/{tools => pve}/container-restore-from-backup.sh (100%) rename tools/{tools => pve}/core-restore-from-backup.sh (100%) rename tools/{tools => pve}/frigate-support.sh (100%) rename tools/{tools => pve}/gpu-amd.func (100%) rename tools/{tools => pve}/gpu-intel.func (100%) rename tools/{tools => pve}/gpu-nvidia.func (100%) rename tools/{tools => pve}/host-backup.sh (100%) rename tools/{tools => pve}/hw-acceleration.sh (100%) rename tools/{tools => pve}/kernel-clean.sh (100%) rename tools/{tools => pve}/pyenv.sh (100%) rename tools/{tools => pve}/switch_from_VED_to_VE.sh (100%) rename tools/{tools => pve}/usb-passthrough.sh (100%) diff --git a/tools/tools/add-iptag.sh b/tools/addon/add-iptag.sh similarity index 100% rename from tools/tools/add-iptag.sh rename to tools/addon/add-iptag.sh diff --git a/tools/tools/code-server.sh b/tools/addon/code-server.sh similarity index 100% rename from tools/tools/code-server.sh rename to tools/addon/code-server.sh diff --git a/tools/tools/filebrowser.sh b/tools/addon/filebrowser.sh similarity index 100% rename from tools/tools/filebrowser.sh rename to tools/addon/filebrowser.sh diff --git a/tools/tools/grafana-loki.sh b/tools/addon/grafana-loki.sh similarity index 100% rename from tools/tools/grafana-loki.sh rename to tools/addon/grafana-loki.sh diff --git a/tools/addon/phpmyadmin.sh b/tools/addon/phpmyadmin.sh new file mode 100644 index 0000000..c4edf08 --- /dev/null +++ b/tools/addon/phpmyadmin.sh @@ -0,0 +1,123 @@ +#!/usr/bin/env bash + +# community-scripts ORG | phpMyAdmin Installer +# Author: MickLesk +# License: MIT + +function header_info { + clear + cat <<"EOF" + ____ __ __ ___ ___ __ _ + / __ \/ /_ ____ / |/ /_ __/ | ____/ /___ ___ (_)___ + / /_/ / __ \/ __ \/ /|_/ / / / / /| |/ __ / __ `__ \/ / __ \ + / ____/ / / / /_/ / / / / /_/ / ___ / /_/ / / / / / / / / / / +/_/ /_/ /_/ .___/_/ /_/\__, /_/ |_\__,_/_/ /_/ /_/_/_/ /_/ + /_/ /____/ +EOF +} + +YW=$(echo "\033[33m") +GN=$(echo "\033[1;92m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +CL=$(echo "\033[m") +CM="${GN}✔️${CL}" +CROSS="${RD}✖️${CL}" +INFO="${BL}ℹ️${CL}" + +APP="phpMyAdmin" +PORT=8081 +WEBROOT="/usr/share/phpmyadmin" + +IFACE=$(ip -4 route | awk '/default/ {print $5; exit}') +IP=$(ip -4 addr show "$IFACE" | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1) +[[ -z "$IP" ]] && IP="127.0.0.1" + +if [[ -f "/etc/alpine-release" ]]; then + OS="Alpine" + SERVICE_PATH="/etc/init.d/phpmyadmin" + PKG_MANAGER="apk add --no-cache" + PHP_SERVICE="php81" +elif [[ -f "/etc/debian_version" ]]; then + OS="Debian" + SERVICE_PATH="/etc/systemd/system/phpmyadmin.service" + PKG_MANAGER="apt-get install -y" + PHP_SERVICE="php" +else + echo -e "${CROSS} Unsupported OS" + exit 1 +fi + +header_info + +function msg_info() { echo -e "${INFO} ${YW}${1}...${CL}"; } +function msg_ok() { echo -e "${CM} ${GN}${1}${CL}"; } +function msg_error() { echo -e "${CROSS} ${RD}${1}${CL}"; } + +read -r -p "Install ${APP}? (y/n): " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing dependencies" + $PKG_MANAGER lighttpd ${PHP_SERVICE} ${PHP_SERVICE}-session ${PHP_SERVICE}-mysqli ${PHP_SERVICE}-mbstring ${PHP_SERVICE}-gettext curl unzip &>/dev/null + msg_ok "Dependencies installed" + + msg_info "Fetching latest phpMyAdmin" + mkdir -p "$WEBROOT" + curl -fsSL https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip -o /tmp/pma.zip + unzip -q /tmp/pma.zip -d /usr/share/ + mv /usr/share/phpMyAdmin-* "$WEBROOT" + rm -f /tmp/pma.zip + msg_ok "phpMyAdmin installed to $WEBROOT" + + msg_info "Creating Lighttpd config" + cat </etc/lighttpd/lighttpd.conf +server.modules = ("mod_access", "mod_alias", "mod_redirect") +server.document-root = "$WEBROOT" +server.port = $PORT +index-file.names = ( "index.php", "index.html" ) +alias.url = ( "/phpmyadmin/" => "$WEBROOT/" ) +mimetype.assign = ( ".html" => "text/html", ".php" => "text/html" ) +server.modules += ( "mod_fastcgi" ) +fastcgi.server = ( ".php" => (( + "bin-path" => "/usr/bin/${PHP_SERVICE}-cgi", + "socket" => "/tmp/php-fastcgi.socket" +))) +EOF + msg_ok "Config created" + + msg_info "Creating service" + if [[ "$OS" == "Debian" ]]; then + cat <"$SERVICE_PATH" +[Unit] +Description=phpMyAdmin Lighttpd +After=network.target + +[Service] +ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf +Restart=always + +[Install] +WantedBy=multi-user.target +EOF + systemctl enable --now phpmyadmin &>/dev/null + else + cat <"$SERVICE_PATH" +#!/sbin/openrc-run + +command="/usr/sbin/lighttpd" +command_args="-D -f /etc/lighttpd/lighttpd.conf" +command_background=true + +depend() { + need net +} +EOF + chmod +x "$SERVICE_PATH" + rc-update add phpmyadmin default &>/dev/null + rc-service phpmyadmin start &>/dev/null + fi + msg_ok "Service ready" + echo -e "${CM} ${GN}${APP} is reachable at: ${BL}http://$IP:$PORT${CL}" +else + echo -e "${YW}⚠️ Installation skipped. Exiting.${CL}" + exit 0 +fi diff --git a/tools/tools/container-restore-from-backup.sh b/tools/pve/container-restore-from-backup.sh similarity index 100% rename from tools/tools/container-restore-from-backup.sh rename to tools/pve/container-restore-from-backup.sh diff --git a/tools/tools/core-restore-from-backup.sh b/tools/pve/core-restore-from-backup.sh similarity index 100% rename from tools/tools/core-restore-from-backup.sh rename to tools/pve/core-restore-from-backup.sh diff --git a/tools/tools/frigate-support.sh b/tools/pve/frigate-support.sh similarity index 100% rename from tools/tools/frigate-support.sh rename to tools/pve/frigate-support.sh diff --git a/tools/tools/gpu-amd.func b/tools/pve/gpu-amd.func similarity index 100% rename from tools/tools/gpu-amd.func rename to tools/pve/gpu-amd.func diff --git a/tools/tools/gpu-intel.func b/tools/pve/gpu-intel.func similarity index 100% rename from tools/tools/gpu-intel.func rename to tools/pve/gpu-intel.func diff --git a/tools/tools/gpu-nvidia.func b/tools/pve/gpu-nvidia.func similarity index 100% rename from tools/tools/gpu-nvidia.func rename to tools/pve/gpu-nvidia.func diff --git a/tools/tools/host-backup.sh b/tools/pve/host-backup.sh similarity index 100% rename from tools/tools/host-backup.sh rename to tools/pve/host-backup.sh diff --git a/tools/tools/hw-acceleration.sh b/tools/pve/hw-acceleration.sh similarity index 100% rename from tools/tools/hw-acceleration.sh rename to tools/pve/hw-acceleration.sh diff --git a/tools/tools/kernel-clean.sh b/tools/pve/kernel-clean.sh similarity index 100% rename from tools/tools/kernel-clean.sh rename to tools/pve/kernel-clean.sh diff --git a/tools/tools/pyenv.sh b/tools/pve/pyenv.sh similarity index 100% rename from tools/tools/pyenv.sh rename to tools/pve/pyenv.sh diff --git a/tools/tools/switch_from_VED_to_VE.sh b/tools/pve/switch_from_VED_to_VE.sh similarity index 100% rename from tools/tools/switch_from_VED_to_VE.sh rename to tools/pve/switch_from_VED_to_VE.sh diff --git a/tools/tools/usb-passthrough.sh b/tools/pve/usb-passthrough.sh similarity index 100% rename from tools/tools/usb-passthrough.sh rename to tools/pve/usb-passthrough.sh From 0406049c892fb7ce5835ad067ce833f8c2587131 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:27:09 +0200 Subject: [PATCH 0399/1614] website --- .../json-editor/_components/InstallMethod.tsx | 60 ++-- .../src/app/json-editor/_components/Note.tsx | 2 +- .../src/app/json-editor/_schemas/schemas.ts | 4 +- frontend/src/app/json-editor/page.tsx | 157 +++------- frontend/src/app/page.tsx | 199 ++++++------ .../scripts/_components/ResourceDisplay.tsx | 42 +++ .../scripts/_components/ScriptInfoBlocks.tsx | 57 +--- .../app/scripts/_components/ScriptItem.tsx | 286 +++++++++--------- .../_components/ScriptItems/Alerts.tsx | 2 +- .../_components/ScriptItems/Buttons.tsx | 141 +++++---- .../ScriptItems/DefaultPassword.tsx | 13 +- .../ScriptItems/DefaultSettings.tsx | 42 +-- .../_components/ScriptItems/Description.tsx | 12 +- .../ScriptItems/InstallCommand.tsx | 136 ++++----- .../_components/ScriptItems/InterFaces.tsx | 45 +-- .../app/scripts/_components/VersionBadge.tsx | 13 + frontend/src/app/scripts/page.tsx | 2 +- frontend/src/lib/utils/resource-utils.ts | 7 + 18 files changed, 567 insertions(+), 653 deletions(-) create mode 100644 frontend/src/app/scripts/_components/ResourceDisplay.tsx create mode 100644 frontend/src/app/scripts/_components/VersionBadge.tsx create mode 100644 frontend/src/lib/utils/resource-utils.ts diff --git a/frontend/src/app/json-editor/_components/InstallMethod.tsx b/frontend/src/app/json-editor/_components/InstallMethod.tsx index 8a597c5..3f3a7f4 100644 --- a/frontend/src/app/json-editor/_components/InstallMethod.tsx +++ b/frontend/src/app/json-editor/_components/InstallMethod.tsx @@ -1,12 +1,6 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from "@/components/ui/select"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { OperatingSystems } from "@/config/siteConfig"; import { PlusCircle, Trash2 } from "lucide-react"; import { memo, useCallback, useRef } from "react"; @@ -20,21 +14,29 @@ type InstallMethodProps = { setZodErrors: (zodErrors: z.ZodError | null) => void; }; -function InstallMethod({ - script, - setScript, - setIsValid, - setZodErrors, -}: InstallMethodProps) { +function InstallMethod({ script, setScript, setIsValid, setZodErrors }: InstallMethodProps) { const cpuRefs = useRef<(HTMLInputElement | null)[]>([]); const ramRefs = useRef<(HTMLInputElement | null)[]>([]); const hddRefs = useRef<(HTMLInputElement | null)[]>([]); const addInstallMethod = useCallback(() => { setScript((prev) => { + const { type, slug } = prev; + const newMethodType = "default"; + + let scriptPath = ""; + + if (type === "pve") { + scriptPath = `tools/pve/${slug}.sh`; + } else if (type === "addon") { + scriptPath = `tools/addon/${slug}.sh`; + } else { + scriptPath = `${type}/${slug}.sh`; + } + const method = InstallMethodSchema.parse({ - type: "default", - script: `${prev.type}/${prev.slug}.sh`, + type: newMethodType, + script: scriptPath, resources: { cpu: null, ram: null, @@ -43,6 +45,7 @@ function InstallMethod({ version: null, }, }); + return { ...prev, install_methods: [...prev.install_methods, method], @@ -63,9 +66,7 @@ function InstallMethod({ if (key === "type") { updatedMethod.script = - value === "alpine" - ? `${prev.type}/alpine-${prev.slug}.sh` - : `${prev.type}/${prev.slug}.sh`; + value === "alpine" ? `${prev.type}/alpine-${prev.slug}.sh` : `${prev.type}/${prev.slug}.sh`; // Set OS to Alpine and reset version if type is alpine if (value === "alpine") { @@ -112,10 +113,7 @@ function InstallMethod({

Install Methods

{script.install_methods.map((method, index) => (
- updateInstallMethod(index, "type", value)}> @@ -205,9 +203,7 @@ function InstallMethod({ - {OperatingSystems.find( - (os) => os.name === method.resources.os, - )?.versions.map((version) => ( + {OperatingSystems.find((os) => os.name === method.resources.os)?.versions.map((version) => ( {version.name} @@ -215,22 +211,12 @@ function InstallMethod({
- ))} - diff --git a/frontend/src/app/json-editor/_components/Note.tsx b/frontend/src/app/json-editor/_components/Note.tsx index cc4c8ed..5827285 100644 --- a/frontend/src/app/json-editor/_components/Note.tsx +++ b/frontend/src/app/json-editor/_components/Note.tsx @@ -147,4 +147,4 @@ const NoteItem = memo( NoteItem.displayName = 'NoteItem'; -export default memo(Note); +export default memo(Note); \ No newline at end of file diff --git a/frontend/src/app/json-editor/_schemas/schemas.ts b/frontend/src/app/json-editor/_schemas/schemas.ts index ad9d16b..9ffe8f3 100644 --- a/frontend/src/app/json-editor/_schemas/schemas.ts +++ b/frontend/src/app/json-editor/_schemas/schemas.ts @@ -24,8 +24,8 @@ export const ScriptSchema = z.object({ slug: z.string().min(1, "Slug is required"), categories: z.array(z.number()), date_created: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be in YYYY-MM-DD format").min(1, "Date is required"), - type: z.enum(["vm", "ct", "misc", "turnkey"], { - errorMap: () => ({ message: "Type must be either 'vm', 'ct', 'misc' or 'turnkey'" }) + type: z.enum(["vm", "ct", "pve", "addon", "turnkey"], { + errorMap: () => ({ message: "Type must be either 'vm', 'ct', 'pve', 'addon' or 'turnkey'" }) }), updateable: z.boolean(), privileged: z.boolean(), diff --git a/frontend/src/app/json-editor/page.tsx b/frontend/src/app/json-editor/page.tsx index 4e16155..1789b0a 100644 --- a/frontend/src/app/json-editor/page.tsx +++ b/frontend/src/app/json-editor/page.tsx @@ -5,18 +5,8 @@ import { Button } from "@/components/ui/button"; import { Calendar } from "@/components/ui/calendar"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; -import { - Popover, - PopoverContent, - PopoverTrigger, -} from "@/components/ui/popover"; -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from "@/components/ui/select"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Switch } from "@/components/ui/switch"; import { Textarea } from "@/components/ui/textarea"; import { fetchCategories } from "@/lib/data"; @@ -66,29 +56,37 @@ export default function JSONGenerator() { .catch((error) => console.error("Error fetching categories:", error)); }, []); - const updateScript = useCallback( - (key: keyof Script, value: Script[keyof Script]) => { - setScript((prev) => { - const updated = { ...prev, [key]: value }; + const updateScript = useCallback((key: keyof Script, value: Script[keyof Script]) => { + setScript((prev) => { + const updated = { ...prev, [key]: value }; - if (key === "type" || key === "slug") { - updated.install_methods = updated.install_methods.map((method) => ({ + if (updated.slug && updated.type) { + updated.install_methods = updated.install_methods.map((method) => { + let scriptPath = ""; + + if (updated.type === "pve") { + scriptPath = `tools/pve/${updated.slug}.sh`; + } else if (updated.type === "addon") { + scriptPath = `tools/addon/${updated.slug}.sh`; + } else if (method.type === "alpine") { + scriptPath = `${updated.type}/alpine-${updated.slug}.sh`; + } else { + scriptPath = `${updated.type}/${updated.slug}.sh`; + } + + return { ...method, - script: - method.type === "alpine" - ? `${updated.type}/alpine-${updated.slug}.sh` - : `${updated.type}/${updated.slug}.sh`, - })); - } + script: scriptPath, + }; + }); + } - const result = ScriptSchema.safeParse(updated); - setIsValid(result.success); - setZodErrors(result.success ? null : result.error); - return updated; - }); - }, - [], - ); + const result = ScriptSchema.safeParse(updated); + setIsValid(result.success); + setZodErrors(result.success ? null : result.error); + return updated; + }); + }, []); const handleCopy = useCallback(() => { navigator.clipboard.writeText(JSON.stringify(script, null, 2)); @@ -101,13 +99,13 @@ export default function JSONGenerator() { const jsonString = JSON.stringify(script, null, 2); const blob = new Blob([jsonString], { type: "application/json" }); const url = URL.createObjectURL(blob); - + const a = document.createElement("a"); a.href = url; a.download = `${script.slug || "script"}.json`; document.body.appendChild(a); a.click(); - + URL.revokeObjectURL(url); document.body.removeChild(a); }, [script]); @@ -120,16 +118,13 @@ export default function JSONGenerator() { ); const formattedDate = useMemo( - () => - script.date_created ? format(script.date_created, "PPP") : undefined, + () => (script.date_created ? format(script.date_created, "PPP") : undefined), [script.date_created], ); const validationAlert = useMemo( () => ( - + {isValid ? "Valid JSON" : "Invalid JSON"} {isValid @@ -160,21 +155,13 @@ export default function JSONGenerator() { - updateScript("name", e.target.value)} - /> + updateScript("name", e.target.value)} />
- updateScript("slug", e.target.value)} - /> + updateScript("slug", e.target.value)} />
@@ -197,11 +184,7 @@ export default function JSONGenerator() { onChange={(e) => updateScript("description", e.target.value)} />
- +
@@ -209,10 +192,7 @@ export default function JSONGenerator() {
- updateScript("type", value)}> LXC Container Virtual Machine - Miscellaneous + PVE-Tool + Add-On
- - updateScript("updateable", checked) - } - /> + updateScript("updateable", checked)} />
- - updateScript("privileged", checked) - } - /> + updateScript("privileged", checked)} />
@@ -269,12 +237,7 @@ export default function JSONGenerator() { placeholder="Interface Port" type="number" value={script.interface_port || ""} - onChange={(e) => - updateScript( - "interface_port", - e.target.value ? Number(e.target.value) : null, - ) - } + onChange={(e) => updateScript("interface_port", e.target.value ? Number(e.target.value) : null)} />
- updateScript("documentation", e.target.value || null) - } + onChange={(e) => updateScript("documentation", e.target.value || null)} />
- +

Default Credentials

- +
{validationAlert}
- -
- +
             {JSON.stringify(script, null, 2)}
           
diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 247b649..d06b557 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,4 +1,5 @@ "use client"; +import FAQ from "@/components/FAQ"; import AnimatedGradientText from "@/components/ui/animated-gradient-text"; import { Button } from "@/components/ui/button"; import { CardFooter } from "@/components/ui/card"; @@ -34,99 +35,109 @@ export default function Page() { }, [theme]); return ( -
- -
-
- - -
- -
- ❤️ - - Develop Instance - - -
- - - - Thank You! - - A big thank you to tteck and the many contributors who have - made this project possible. Your hard work is truly - appreciated by the entire Proxmox community! - - - - - - - -
+ <> +
+ +
+
+ + +
+ +
+ ❤️ + + Scripts by tteck + + +
+ + + + Thank You! + + A big thank you to tteck and the many contributors who have made this project possible. Your hard + work is truly appreciated by the entire Proxmox community! + + + + + + + +
-
-

- Beta Scripts -

-
-

- On this Website you can find a collection of scripts that are under development and only for testing. - We do not provide any support for these scripts when run in production, but you can help us by testing them and providing feedback. -

-
-
-
- - - -
-
-
-
- ); +
+

+ Make managing your Homelab a breeze +

+
+

+ We are a community-driven initiative that simplifies the setup of Proxmox Virtual Environment (VE). +

+

+ With 300+ scripts to help you manage your Proxmox VE environment. Whether you're a seasoned + user or a newcomer, we've got you covered. +

+
+
+
+ + + +
+
+ + {/* FAQ Section */} +
+
+
+

Frequently Asked Questions

+

+ Find answers to common questions about our Proxmox VE scripts +

+
+ +
+
+
+
+ + ); } diff --git a/frontend/src/app/scripts/_components/ResourceDisplay.tsx b/frontend/src/app/scripts/_components/ResourceDisplay.tsx new file mode 100644 index 0000000..7c9ed63 --- /dev/null +++ b/frontend/src/app/scripts/_components/ResourceDisplay.tsx @@ -0,0 +1,42 @@ +import { CPUIcon, HDDIcon, RAMIcon } from "@/components/icons/resource-icons"; +import { getDisplayValueFromRAM } from "@/lib/utils/resource-utils"; + +interface ResourceDisplayProps { + title: string; + cpu: number | null; + ram: number | null; + hdd: number | null; +} + +interface IconTextProps { + icon: React.ReactNode; + label: string; +} + +function IconText({ icon, label }: IconTextProps) { + return ( + + {icon} + {label} + + ); +} + +export function ResourceDisplay({ title, cpu, ram, hdd }: ResourceDisplayProps) { + const hasCPU = typeof cpu === "number" && cpu > 0; + const hasRAM = typeof ram === "number" && ram > 0; + const hasHDD = typeof hdd === "number" && hdd > 0; + + if (!hasCPU && !hasRAM && !hasHDD) return null; + + return ( +
+ {title} +
+ {hasCPU && } label={`${cpu} vCPU`} />} + {hasRAM && } label={getDisplayValueFromRAM(ram!)} />} + {hasHDD && } label={`${hdd} GB`} />} +
+
+ ); +} diff --git a/frontend/src/app/scripts/_components/ScriptInfoBlocks.tsx b/frontend/src/app/scripts/_components/ScriptInfoBlocks.tsx index 3713a16..7ee300a 100644 --- a/frontend/src/app/scripts/_components/ScriptInfoBlocks.tsx +++ b/frontend/src/app/scripts/_components/ScriptInfoBlocks.tsx @@ -1,12 +1,5 @@ import { Button } from "@/components/ui/button"; -import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/components/ui/card"; +import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"; import { basePath, mostPopularScripts } from "@/config/siteConfig"; import { extractDate } from "@/lib/time"; import { Category, Script } from "@/lib/types"; @@ -23,7 +16,8 @@ export const getDisplayValueFromType = (type: string) => { return "LXC"; case "vm": return "VM"; - case "misc": + case "pve": + case "addon": return ""; default: return ""; @@ -35,7 +29,7 @@ export function LatestScripts({ items }: { items: Category[] }) { const latestScripts = useMemo(() => { if (!items) return []; - + const scripts = items.flatMap((category) => category.scripts || []); // Filter out duplicates by slug @@ -47,8 +41,7 @@ export function LatestScripts({ items }: { items: Category[] }) { }); return Array.from(uniqueScriptsMap.values()).sort( - (a, b) => - new Date(b.date_created).getTime() - new Date(a.date_created).getTime(), + (a, b) => new Date(b.date_created).getTime() - new Date(a.date_created).getTime(), ); }, [items]); @@ -59,7 +52,7 @@ export function LatestScripts({ items }: { items: Category[] }) { const goToPreviousPage = () => { setPage((prevPage) => prevPage - 1); }; - + const startIndex = (page - 1) * ITEMS_PER_PAGE; const endIndex = page * ITEMS_PER_PAGE; @@ -74,18 +67,12 @@ export function LatestScripts({ items }: { items: Category[] }) {

Newest Scripts

{page > 1 && ( -
+
Previous
)} {endIndex < latestScripts.length && ( -
+
{page === 1 ? "More.." : "Next"}
)} @@ -94,10 +81,7 @@ export function LatestScripts({ items }: { items: Category[] }) { )}
{latestScripts.slice(startIndex, endIndex).map((script) => ( - +
@@ -107,10 +91,7 @@ export function LatestScripts({ items }: { items: Category[] }) { height={64} width={64} alt="" - onError={(e) => - ((e.currentTarget as HTMLImageElement).src = - `/${basePath}/logo.png`) - } + onError={(e) => ((e.currentTarget as HTMLImageElement).src = `/${basePath}/logo.png`)} className="h-11 w-11 object-contain" />
@@ -126,9 +107,7 @@ export function LatestScripts({ items }: { items: Category[] }) {
- - {script.description} - + {script.description} - {linksVisible && } - -
-
-
- -
-
- - -
-
-
-

- How to {item.type == "misc" ? "use" : "install"} -

- -
- - -
-
- -
-
-
+ return ( +
+
+
+ ((e.currentTarget as HTMLImageElement).src = `/${basePath}/logo.png`)} + height={400} + alt={item.name} + unoptimized + />
- ); +
+
+
+
+

+ {item.name} + + + {getDisplayValueFromType(item.type)} + +

+
+ Added {extractDate(item.date_created)} + + + {os} {version} + +
+
+ {/* */} +
+
+ {defaultInstallMethod?.resources && ( + + )} + {item.install_methods.find((method) => method.type === "alpine")?.resources && ( + method.type === "alpine")!.resources!} + /> + )} +
+
+
+
+
+ +
+ +
+
+
+ ); } -export default ScriptItem; +function VersionInfo({ item }: { item: Script }) { + const { data: versions = [], isLoading } = useVersions(); + + if (isLoading || versions.length === 0) { + return

Loading versions...

; + } + + const matchedVersion = versions.find((v: AppVersion) => { + const cleanName = v.name.replace(/[^a-z0-9]/gi, "").toLowerCase(); + return cleanName === cleanSlug(item.slug) || cleanName.includes(cleanSlug(item.slug)); + }); + + if (!matchedVersion) return null; + + return {matchedVersion.version}; +} + +export function ScriptItem({ item, setSelectedScript }: ScriptItemProps) { + const closeScript = () => { + window.history.pushState({}, document.title, window.location.pathname); + setSelectedScript(null); + }; + + return ( +
+
+
+

Selected Script

+ +
+ +
+
+ }> + + + + + + +
+
+

+ How to {item.type === "pve" ? "use" : item.type === "addon" ? "apply" : "install"} +

+ +
+ +
+ +
+
+ + +
+
+
+
+ ); +} diff --git a/frontend/src/app/scripts/_components/ScriptItems/Alerts.tsx b/frontend/src/app/scripts/_components/ScriptItems/Alerts.tsx index b915be3..c4c2902 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/Alerts.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/Alerts.tsx @@ -14,7 +14,7 @@ export default function Alerts({ item }: { item: Script }) { <> {item?.notes?.length > 0 && item.notes.map((note: NoteProps, index: number) => ( -
+

{ - const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; - return `${baseUrl}/install/${slug}-install.sh`; + const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; + return `${baseUrl}/install/${slug}-install.sh`; }; const generateSourceUrl = (slug: string, type: string) => { - const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; - return type === "vm" ? `${baseUrl}/vm/${slug}.sh` : `${baseUrl}/misc/${slug}.sh`; - return `${baseUrl}/misc/${slug}.sh`; + const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; + + switch (type) { + case "vm": + return `${baseUrl}/vm/${slug}.sh`; + case "pve": + return `${baseUrl}/tools/pve/${slug}.sh`; + case "addon": + return `${baseUrl}/tools/addon/${slug}.sh`; + default: + return `${baseUrl}/ct/${slug}.sh`; // fallback for "ct" + } }; const generateUpdateUrl = (slug: string) => { - const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; - return `${baseUrl}/ct/${slug}.sh`; + const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; + return `${baseUrl}/ct/${slug}.sh`; }; -interface ButtonLinkProps { - href: string; - icon: React.ReactNode; - text: string; +interface LinkItem { + href: string; + icon: React.ReactNode; + text: string; } -const ButtonLink = ({ href, icon, text }: ButtonLinkProps) => ( - -); - export default function Buttons({ item }: { item: Script }) { - const isCtOrDefault = ["ct"].includes(item.type); - const installSourceUrl = isCtOrDefault ? generateInstallSourceUrl(item.slug) : null; - const updateSourceUrl = isCtOrDefault ? generateUpdateUrl(item.slug) : null; - const sourceUrl = !isCtOrDefault ? generateSourceUrl(item.slug, item.type) : null; + const isCtOrDefault = ["ct"].includes(item.type); + const installSourceUrl = isCtOrDefault ? generateInstallSourceUrl(item.slug) : null; + const updateSourceUrl = isCtOrDefault ? generateUpdateUrl(item.slug) : null; + const sourceUrl = !isCtOrDefault ? generateSourceUrl(item.slug, item.type) : null; - const buttons = [ - item.website && { - href: item.website, - icon: , - text: "Website", - }, - item.documentation && { - href: item.documentation, - icon: , - text: "Documentation", - }, - installSourceUrl && { - href: installSourceUrl, - icon: , - text: "Install-Source", - }, - updateSourceUrl && { - href: updateSourceUrl, - icon: , - text: "Update-Source", - }, - sourceUrl && { - href: sourceUrl, - icon: , - text: "Source Code", - }, - ].filter(Boolean) as ButtonLinkProps[]; + const links = [ + item.website && { + href: item.website, + icon: , + text: "Website", + }, + item.documentation && { + href: item.documentation, + icon: , + text: "Documentation", + }, + installSourceUrl && { + href: installSourceUrl, + icon: , + text: "Install Source", + }, + updateSourceUrl && { + href: updateSourceUrl, + icon: , + text: "Update Source", + }, + sourceUrl && { + href: sourceUrl, + icon: , + text: "Source Code", + }, + ].filter(Boolean) as LinkItem[]; - return ( + if (links.length === 0) return null; -

- {buttons.map((props, index) => ( - - ))} -
- ); + return ( + + + + + + {links.map((link, index) => ( + + + {link.icon} + {link.text} + + + ))} + + + ); } diff --git a/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx b/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx index 15a9623..5034bc9 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx @@ -14,24 +14,19 @@ export default function DefaultPassword({ item }: { item: Script }) { }; return ( -
-
+
+

Default Login Credentials

- You can use the following credentials to login to the {item.name}{" "} - {item.type}. + You can use the following credentials to login to the {item.name} {item.type}.

{["username", "password"].map((type) => (
{type.charAt(0).toUpperCase() + type.slice(1)}:{" "} -
diff --git a/frontend/src/app/scripts/_components/ScriptItems/DefaultSettings.tsx b/frontend/src/app/scripts/_components/ScriptItems/DefaultSettings.tsx index bfa6175..33ae0b8 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/DefaultSettings.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/DefaultSettings.tsx @@ -1,51 +1,29 @@ import { Script } from "@/lib/types"; export default function DefaultSettings({ item }: { item: Script }) { - const getDisplayValueFromRAM = (ram: number) => - ram >= 1024 ? `${Math.floor(ram / 1024)}GB` : `${ram}MB`; + const getDisplayValueFromRAM = (ram: number) => (ram >= 1024 ? `${Math.floor(ram / 1024)}GB` : `${ram}MB`); - const ResourceDisplay = ({ - settings, - title, - }: { - settings: (typeof item.install_methods)[0]; - title: string; - }) => { + const ResourceDisplay = ({ settings, title }: { settings: (typeof item.install_methods)[0]; title: string }) => { const { cpu, ram, hdd } = settings.resources; return (

{title}

CPU: {cpu}vCPU

-

- RAM: {getDisplayValueFromRAM(ram ?? 0)} -

+

RAM: {getDisplayValueFromRAM(ram ?? 0)}

HDD: {hdd}GB

); }; - const defaultSettings = item.install_methods.find( - (method) => method.type === "default", - ); - const defaultAlpineSettings = item.install_methods.find( - (method) => method.type === "alpine", - ); + const defaultSettings = item.install_methods.find((method) => method.type === "default"); + const defaultAlpineSettings = item.install_methods.find((method) => method.type === "alpine"); - const hasDefaultSettings = - defaultSettings?.resources && - Object.values(defaultSettings.resources).some(Boolean); + const hasDefaultSettings = defaultSettings?.resources && Object.values(defaultSettings.resources).some(Boolean); return ( - <> - {hasDefaultSettings && ( - - )} - {defaultAlpineSettings && ( - - )} - +
+ {hasDefaultSettings && } + {defaultAlpineSettings && } +
); } diff --git a/frontend/src/app/scripts/_components/ScriptItems/Description.tsx b/frontend/src/app/scripts/_components/ScriptItems/Description.tsx index d87277d..6a09f0a 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/Description.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/Description.tsx @@ -1,21 +1,11 @@ import TextCopyBlock from "@/components/TextCopyBlock"; import { Script } from "@/lib/types"; -import { AlertColors } from "@/config/siteConfig"; -import { AlertCircle, NotepadText } from "lucide-react"; -import { cn } from "@/lib/utils"; export default function Description({ item }: { item: Script }) { return (

Description

-

- - Only use for testing, not in production! -

-

+

{TextCopyBlock(item.description)}

diff --git a/frontend/src/app/scripts/_components/ScriptItems/InstallCommand.tsx b/frontend/src/app/scripts/_components/ScriptItems/InstallCommand.tsx index 48b5a2a..ff95097 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/InstallCommand.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/InstallCommand.tsx @@ -5,85 +5,73 @@ import { Script } from "@/lib/types"; import { getDisplayValueFromType } from "../ScriptInfoBlocks"; const getInstallCommand = (scriptPath = "", isAlpine = false) => { - const url = `https://github.com/community-scripts/${basePath}/raw/main/${scriptPath}`; - return isAlpine - ? `bash -c "$(curl -fsSL ${url})"` - : `bash -c "$(curl -fsSL ${url})"`; + const url = `https://raw.githubusercontent.com/community-scripts/${basePath}/main/${scriptPath}`; + return isAlpine ? `bash -c "$(curl -fsSL ${url})"` : `bash -c "$(curl -fsSL ${url})"`; }; - export default function InstallCommand({ item }: { item: Script }) { - const alpineScript = item.install_methods.find( - (method) => method.type === "alpine", - ); + const alpineScript = item.install_methods.find((method) => method.type === "alpine"); - const defaultScript = item.install_methods.find( - (method) => method.type === "default", - ); + const defaultScript = item.install_methods.find((method) => method.type === "default"); - const renderInstructions = (isAlpine = false) => ( + const renderInstructions = (isAlpine = false) => ( + <> +

+ {isAlpine ? ( + <> + As an alternative option, you can use Alpine Linux and the {item.name} package to create a {item.name}{" "} + {getDisplayValueFromType(item.type)} container with faster creation time and minimal system resource usage. + You are also obliged to adhere to updates provided by the package maintainer. + + ) : item.type === "pve" ? ( + <> + To use the {item.name} script, run the command below **only** in the Proxmox VE Shell. This script is + intended for managing or enhancing the host system directly. + + ) : item.type === "addon" ? ( + <> + This script enhances an existing setup. You can use it inside a running LXC container or directly on the + Proxmox VE host to extend functionality with {item.name}. + + ) : ( + <> + To create a new Proxmox VE {item.name} {getDisplayValueFromType(item.type)}, run the command below in the + Proxmox VE Shell. + + )} +

+ {isAlpine && ( +

+ To create a new Proxmox VE Alpine-{item.name} {getDisplayValueFromType(item.type)}, run the command below in + the Proxmox VE Shell. +

+ )} + + ); + + return ( +
+ {alpineScript ? ( + + + Default + Alpine Linux + + + {renderInstructions()} + {getInstallCommand(defaultScript?.script)} + + + {renderInstructions(true)} + {getInstallCommand(alpineScript.script, true)} + + + ) : defaultScript?.script ? ( <> -

- {isAlpine ? ( - <> - As an alternative option, you can use Alpine Linux and the{" "} - {item.name} package to create a {item.name}{" "} - {getDisplayValueFromType(item.type)} container with faster creation - time and minimal system resource usage. You are also obliged to - adhere to updates provided by the package maintainer. - - ) : item.type == "misc" ? ( - <> - To use the {item.name} script, run the command below in the shell. - - ) : ( - <> - {" "} - To create a new Proxmox VE {item.name}{" "} - {getDisplayValueFromType(item.type)}, run the command below in the - Proxmox VE Shell. - - )} -

- {isAlpine && ( -

- To create a new Proxmox VE Alpine-{item.name}{" "} - {getDisplayValueFromType(item.type)}, run the command below in the - Proxmox VE Shell -

- )} + {renderInstructions()} + {getInstallCommand(defaultScript.script)} - ); - - return ( -
- {alpineScript ? ( - - - Default - Alpine Linux - - - {renderInstructions()} - - {getInstallCommand(defaultScript?.script)} - - - - {renderInstructions(true)} - - {getInstallCommand(alpineScript.script, true)} - - - - ) : defaultScript?.script ? ( - <> - {renderInstructions()} - - {getInstallCommand(defaultScript.script)} - - - ) : null} -
- ); + ) : null} +
+ ); } diff --git a/frontend/src/app/scripts/_components/ScriptItems/InterFaces.tsx b/frontend/src/app/scripts/_components/ScriptItems/InterFaces.tsx index ea4e6c0..d7ea148 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/InterFaces.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/InterFaces.tsx @@ -4,39 +4,18 @@ import { Script } from "@/lib/types"; import { cn } from "@/lib/utils"; import { ClipboardIcon } from "lucide-react"; -const CopyButton = ({ - label, - value, -}: { - label: string; - value: string | number; -}) => ( - - {value} - handleCopy(label, String(value))} - className="size-4 cursor-pointer" - /> - -); - export default function InterFaces({ item }: { item: Script }) { - return ( -
- {item.interface_port !== null ? ( -
-

- {"Default Interface:"} -

{" "} - - -
- ) : null} + return ( +
+ {item.interface_port !== null ? ( +
+

Default Interface:

+ + {item.interface_port} + handleCopy("default interface", String(item.interface_port))} className="size-4 cursor-pointer" /> +
- ); + ) : null} +
+ ); } diff --git a/frontend/src/app/scripts/_components/VersionBadge.tsx b/frontend/src/app/scripts/_components/VersionBadge.tsx new file mode 100644 index 0000000..712893d --- /dev/null +++ b/frontend/src/app/scripts/_components/VersionBadge.tsx @@ -0,0 +1,13 @@ +import { AppVersion } from "@/lib/types"; + +interface VersionBadgeProps { + version: AppVersion; +} + +export function VersionBadge({ version }: VersionBadgeProps) { + return ( +
+ {version.version} +
+ ); +} diff --git a/frontend/src/app/scripts/page.tsx b/frontend/src/app/scripts/page.tsx index a02f80b..590b673 100644 --- a/frontend/src/app/scripts/page.tsx +++ b/frontend/src/app/scripts/page.tsx @@ -2,7 +2,7 @@ export const dynamic = "force-static"; -import ScriptItem from "@/app/scripts/_components/ScriptItem"; +import { ScriptItem } from "@/app/scripts/_components/ScriptItem"; import { fetchCategories } from "@/lib/data"; import { Category, Script } from "@/lib/types"; import { Loader2 } from "lucide-react"; diff --git a/frontend/src/lib/utils/resource-utils.ts b/frontend/src/lib/utils/resource-utils.ts new file mode 100644 index 0000000..25e0966 --- /dev/null +++ b/frontend/src/lib/utils/resource-utils.ts @@ -0,0 +1,7 @@ +export function getDisplayValueFromRAM(ram: number): string { + return ram >= 1024 ? `${Math.floor(ram / 1024)}GB` : `${ram}MB`; +} + +export function cleanSlug(slug: string): string { + return slug.replace(/[^a-z0-9]/gi, "").toLowerCase(); +} From a05d5dba021cc95770b94d9d6f05a94f06b72d0b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:28:40 +0200 Subject: [PATCH 0400/1614] Update add-iptag.json --- frontend/public/json/add-iptag.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/public/json/add-iptag.json b/frontend/public/json/add-iptag.json index 9446d26..fbfe279 100644 --- a/frontend/public/json/add-iptag.json +++ b/frontend/public/json/add-iptag.json @@ -5,7 +5,7 @@ 1 ], "date_created": "2025-04-02", - "type": "misc", + "type": "addon", "updateable": false, "privileged": false, "interface_port": null, @@ -16,7 +16,7 @@ "install_methods": [ { "type": "default", - "script": "scripts/tools/add-iptag.sh", + "script": "tools/addon/add-iptag.sh", "resources": { "cpu": null, "ram": null, From f73d29da1e69cc2d2305f43e04eddcd239d48910 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:31:01 +0200 Subject: [PATCH 0401/1614] frontend --- frontend/src/components/CommandMenu.tsx | 26 +++++++------------ frontend/src/components/FAQ.tsx | 29 ++++++++++++++++++++++ frontend/src/components/query-provider.tsx | 9 +++++++ 3 files changed, 47 insertions(+), 17 deletions(-) create mode 100644 frontend/src/components/FAQ.tsx create mode 100644 frontend/src/components/query-provider.tsx diff --git a/frontend/src/components/CommandMenu.tsx b/frontend/src/components/CommandMenu.tsx index 1f03d6b..166b87a 100644 --- a/frontend/src/components/CommandMenu.tsx +++ b/frontend/src/components/CommandMenu.tsx @@ -6,6 +6,7 @@ import { CommandItem, CommandList, } from "@/components/ui/command"; +import { basePath } from "@/config/siteConfig"; import { fetchCategories } from "@/lib/data"; import { Category } from "@/lib/types"; import { cn } from "@/lib/utils"; @@ -15,18 +16,17 @@ import React from "react"; import { Badge } from "./ui/badge"; import { Button } from "./ui/button"; import { DialogTitle } from "./ui/dialog"; -import { basePath } from "@/config/siteConfig"; export const formattedBadge = (type: string) => { switch (type) { case "vm": return VM; case "ct": - return ( - LXC - ); - case "misc": - return MISC; + return LXC; + case "pve": + return PVE; + case "addon": + return ADDON; } return null; }; @@ -84,14 +84,9 @@ export default function CommandMenu() { Search scripts - - {isLoading ? "Loading..." : "No scripts found."} - + {isLoading ? "Loading..." : "No scripts found."} {links.map((category) => ( - + {category.scripts.map((script) => ( setOpen(false)}> - ((e.currentTarget as HTMLImageElement).src = - `/${basePath}/logo.png`) - } + onError={(e) => ((e.currentTarget as HTMLImageElement).src = `/${basePath}/logo.png`)} unoptimized width={16} height={16} diff --git a/frontend/src/components/FAQ.tsx b/frontend/src/components/FAQ.tsx new file mode 100644 index 0000000..b90e33b --- /dev/null +++ b/frontend/src/components/FAQ.tsx @@ -0,0 +1,29 @@ +import * as AccordionPrimitive from "@radix-ui/react-accordion"; +import { Plus } from "lucide-react"; +import { FAQ_Items } from "../config/faqConfig"; +import { Accordion, AccordionContent, AccordionItem } from "./ui/accordion"; + +export default function FAQ() { + return ( +
+ + {FAQ_Items.map((item, index) => ( + + + + {item.title} + + + {item.content} + + ))} + +
+ ); +} diff --git a/frontend/src/components/query-provider.tsx b/frontend/src/components/query-provider.tsx new file mode 100644 index 0000000..0c2fe12 --- /dev/null +++ b/frontend/src/components/query-provider.tsx @@ -0,0 +1,9 @@ +"use client"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import React from "react"; + +const queryClient = new QueryClient(); + +export default function QueryProvider({ children }: { children: React.ReactNode }) { + return {children}; +} From 4c26269b681e4b947dabac9a8bfdeeec3b7b80e2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:32:53 +0200 Subject: [PATCH 0402/1614] add more --- .../src/components/icons/resource-icons.tsx | 48 +++++++++++++++++++ frontend/src/config/faqConfig.tsx | 37 ++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 frontend/src/components/icons/resource-icons.tsx create mode 100644 frontend/src/config/faqConfig.tsx diff --git a/frontend/src/components/icons/resource-icons.tsx b/frontend/src/components/icons/resource-icons.tsx new file mode 100644 index 0000000..981c36f --- /dev/null +++ b/frontend/src/components/icons/resource-icons.tsx @@ -0,0 +1,48 @@ +export function CPUIcon() { + return ( + + + + + ); +} + +export function RAMIcon() { + return ( + + + + + ); +} + +export function HDDIcon() { + return ( + + + + + + ); +} diff --git a/frontend/src/config/faqConfig.tsx b/frontend/src/config/faqConfig.tsx new file mode 100644 index 0000000..edbd0be --- /dev/null +++ b/frontend/src/config/faqConfig.tsx @@ -0,0 +1,37 @@ +export const FAQ_Items = [ + { + title: "Why do you use tarballs instead of git pull for installation?", + content: + "Our LXC scripts install applications using release tarballs. Tarballs contain stable code versions tested for release. Using `git pull` directly fetches the latest development code, which might be unstable or contain bugs. Tarballs offer a more reliable installation.", + }, + { + title: "Why do the scripts install applications using HTTP by default?", + content: + "Our LXC scripts install applications using HTTP by default. Setting up HTTPS often requires manual configuration specific to your setup, which our automated scripts cannot handle reliably. If an application requires HTTPS, the script will configure it. For others, you need to enable HTTPS yourself, often following the application's official documentation.", + }, + { + title: "Where can I find documentation for the installed application?", + content: + "We link to the official documentation for each application whenever possible. You can usually find this link on the script's information page for the specific LXC script. If you notice a missing link for an application that has official docs, please report it so we can add it.", + }, + { + title: "What should I do if I find a bug in an LXC script?", + content: + "Our LXC scripts are maintained by volunteers in their free time. Bugs can occur due to our errors or changes in the applications themselves. If you find a bug in one of our LXC scripts, please report it on our GitHub issues page. Your feedback helps us improve the scripts.", + }, + { + title: "Why isn't the application updating to the very latest version?", + content: + "Updates via our LXC scripts might not pull the absolute latest version for a few reasons:\n- A bug in the application's release naming on GitHub.\n- A bug in our update script.\n- We intentionally pinned the version. This happens if a newer version has breaking changes or serious bugs that could affect your data or LXC stability. We wait for fixes before allowing the update.", + }, + { + title: 'Why am I getting a "502 Bad Gateway" error?', + content: + 'A "502 Bad Gateway" error usually means the application inside the LXC is not running or responding correctly. Check the application\'s logs first. If you use a reverse proxy, check its logs too. If you still have problems after checking the logs, report the issue, providing details from the logs.', + }, + { + title: "What should I do if a script fails during execution?", + content: + "If an LXC script fails, run it again using Verbose mode. Standard mode hides detailed output for neatness, showing only progress. Verbose mode displays all messages, which helps you (and us) diagnose the error. Include this verbose output if you report the issue.", + }, +]; From 264d0a20ba4a571075420d2ba05b0d642662b0a9 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:37:10 +0200 Subject: [PATCH 0403/1614] Create useVersions.ts --- frontend/src/hooks/useVersions.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 frontend/src/hooks/useVersions.ts diff --git a/frontend/src/hooks/useVersions.ts b/frontend/src/hooks/useVersions.ts new file mode 100644 index 0000000..44404f4 --- /dev/null +++ b/frontend/src/hooks/useVersions.ts @@ -0,0 +1,21 @@ +"use client"; + +import { fetchVersions } from "@/lib/data"; +import { AppVersion } from "@/lib/types"; +import { useQuery } from "@tanstack/react-query"; + +export function useVersions() { + return useQuery({ + queryKey: ["versions"], + queryFn: async () => { + const fetchedVersions = await fetchVersions(); + if (Array.isArray(fetchedVersions)) { + return fetchedVersions; + } + if (fetchedVersions && typeof fetchedVersions === "object") { + return [fetchedVersions]; + } + return []; + }, + }); +} From a4a267514f22a0828462bccce79f0de5330e5aae Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:48:22 +0200 Subject: [PATCH 0404/1614] Update frontend-cicd.yml --- .github/workflows/frontend-cicd.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/frontend-cicd.yml b/.github/workflows/frontend-cicd.yml index dd242f6..4eb3676 100644 --- a/.github/workflows/frontend-cicd.yml +++ b/.github/workflows/frontend-cicd.yml @@ -7,14 +7,12 @@ on: branches: ["main"] paths: - frontend/** - - json/** pull_request: branches: ["main"] types: [opened, synchronize, reopened, edited] paths: - frontend/** - - json/** workflow_dispatch: From 660f1d289c69e4f943ed0489eb1fb36063dc88a3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:50:51 +0200 Subject: [PATCH 0405/1614] Update package-lock.json --- frontend/package-lock.json | 1730 ++++++++++++++++++------------------ 1 file changed, 866 insertions(+), 864 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 1125ea9..cedcbd1 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -9,70 +9,71 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@radix-ui/react-accordion": "^1.1.2", - "@radix-ui/react-dialog": "^1.0.5", - "@radix-ui/react-dropdown-menu": "^2.0.6", - "@radix-ui/react-icons": "^1.3.1", - "@radix-ui/react-label": "^2.1.0", - "@radix-ui/react-navigation-menu": "^1.1.4", - "@radix-ui/react-popover": "^1.1.2", - "@radix-ui/react-select": "^2.1.2", - "@radix-ui/react-separator": "^1.1.0", - "@radix-ui/react-slot": "^1.1.0", - "@radix-ui/react-switch": "^1.1.1", - "@radix-ui/react-tabs": "^1.1.0", - "@radix-ui/react-tooltip": "^1.1.2", - "@vercel/analytics": "^1.2.2", - "chart.js": "^4.4.1", + "@radix-ui/react-accordion": "^1.2.3", + "@radix-ui/react-dialog": "^1.1.6", + "@radix-ui/react-dropdown-menu": "^2.1.6", + "@radix-ui/react-icons": "^1.3.2", + "@radix-ui/react-label": "^2.1.2", + "@radix-ui/react-navigation-menu": "^1.2.5", + "@radix-ui/react-popover": "^1.1.6", + "@radix-ui/react-select": "^2.1.6", + "@radix-ui/react-separator": "^1.1.2", + "@radix-ui/react-slot": "^1.1.2", + "@radix-ui/react-switch": "^1.1.3", + "@radix-ui/react-tabs": "^1.1.3", + "@radix-ui/react-tooltip": "^1.1.8", + "@tanstack/react-query": "^5.71.1", + "chart.js": "^4.4.8", "chartjs-plugin-datalabels": "^2.2.0", - "class-variance-authority": "^0.7.0", + "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", - "cmdk": "^1.0.0", + "cmdk": "^1.1.1", "date-fns": "^4.1.0", - "framer-motion": "^11.11.11", - "fuse.js": "^7.0.0", + "framer-motion": "^11.18.2", + "fuse.js": "^7.1.0", "lucide-react": "^0.453.0", "mini-svg-data-uri": "^1.4.4", "next": "15.2.4", "next-themes": "^0.3.0", - "nuqs": "^2.1.1", - "pocketbase": "^0.21.4", + "nuqs": "^2.4.1", + "pocketbase": "^0.21.5", "prettier-plugin-organize-imports": "^4.1.0", - "react": "19.0.0-rc-02c0e824-20241028", + "react": "19.0.0", "react-chartjs-2": "^5.3.0", "react-code-blocks": "^0.1.6", "react-datepicker": "^7.6.0", "react-day-picker": "8.10.1", - "react-dom": "19.0.0-rc-02c0e824-20241028", - "react-icons": "^5.1.0", + "react-dom": "19.0.0", + "react-icons": "^5.5.0", "react-simple-typewriter": "^5.0.1", "sharp": "^0.33.5", - "simple-icons": "^13.5.0", - "sonner": "^1.5.0", - "tailwind-merge": "^2.3.0", - "zod": "^3.23.8" + "simple-icons": "^13.21.0", + "sonner": "^1.7.4", + "tailwind-merge": "^2.6.0", + "zod": "^3.24.2" }, "devDependencies": { + "@tanstack/eslint-plugin-query": "^5.68.0", "@testing-library/dom": "^10.4.0", - "@testing-library/react": "^16.0.1", - "@types/node": "^22", + "@testing-library/react": "^16.2.0", + "@types/node": "^22.13.16", "@types/react": "npm:types-react@19.0.0-rc.1", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1", - "@typescript-eslint/eslint-plugin": "^8.8.1", - "@typescript-eslint/parser": "^8.8.1", + "@typescript-eslint/eslint-plugin": "^8.29.0", + "@typescript-eslint/parser": "^8.29.0", "@vitejs/plugin-react": "^4.3.4", - "eslint": "^9.13.0", + "eslint": "^9.23.0", "eslint-config-next": "15.0.2", "jsdom": "^25.0.1", - "postcss": "^8", - "prettier": "^3.2.5", - "prettier-plugin-tailwindcss": "^0.6.5", - "tailwindcss": "^3.4.9", + "postcss": "^8.5.3", + "prettier": "^3.5.3", + "prettier-plugin-tailwindcss": "^0.6.11", + "tailwindcss": "^3.4.17", "tailwindcss-animate": "^1.0.7", "tailwindcss-animated": "^1.1.2", - "typescript": "^5", - "vite-tsconfig-paths": "^5.1.3", - "vitest": "^3.0.8" + "typescript": "^5.8.2", + "vite-tsconfig-paths": "^5.1.4", + "vitest": "^3.1.1" } }, "node_modules/@alloc/quick-lru": { @@ -308,27 +309,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", - "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz", + "integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.0" + "@babel/template": "^7.27.0", + "@babel/types": "^7.27.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", - "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz", + "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.26.0" + "@babel/types": "^7.27.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -382,15 +383,15 @@ } }, "node_modules/@babel/template": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", - "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz", + "integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/parser": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.27.0", + "@babel/types": "^7.27.0" }, "engines": { "node": ">=6.9.0" @@ -426,9 +427,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", - "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz", + "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==", "dev": true, "license": "MIT", "dependencies": { @@ -471,9 +472,9 @@ "license": "MIT" }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz", - "integrity": "sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz", + "integrity": "sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==", "cpu": [ "ppc64" ], @@ -488,9 +489,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.1.tgz", - "integrity": "sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.2.tgz", + "integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==", "cpu": [ "arm" ], @@ -505,9 +506,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.1.tgz", - "integrity": "sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz", + "integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==", "cpu": [ "arm64" ], @@ -522,9 +523,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.1.tgz", - "integrity": "sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.2.tgz", + "integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==", "cpu": [ "x64" ], @@ -539,9 +540,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.1.tgz", - "integrity": "sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz", + "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==", "cpu": [ "arm64" ], @@ -556,9 +557,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.1.tgz", - "integrity": "sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz", + "integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==", "cpu": [ "x64" ], @@ -573,9 +574,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.1.tgz", - "integrity": "sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz", + "integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==", "cpu": [ "arm64" ], @@ -590,9 +591,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.1.tgz", - "integrity": "sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz", + "integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==", "cpu": [ "x64" ], @@ -607,9 +608,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.1.tgz", - "integrity": "sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz", + "integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==", "cpu": [ "arm" ], @@ -624,9 +625,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz", - "integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz", + "integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==", "cpu": [ "arm64" ], @@ -641,9 +642,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.1.tgz", - "integrity": "sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz", + "integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==", "cpu": [ "ia32" ], @@ -658,9 +659,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.1.tgz", - "integrity": "sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz", + "integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==", "cpu": [ "loong64" ], @@ -675,9 +676,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.1.tgz", - "integrity": "sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz", + "integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==", "cpu": [ "mips64el" ], @@ -692,9 +693,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.1.tgz", - "integrity": "sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz", + "integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==", "cpu": [ "ppc64" ], @@ -709,9 +710,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.1.tgz", - "integrity": "sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz", + "integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==", "cpu": [ "riscv64" ], @@ -726,9 +727,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.1.tgz", - "integrity": "sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz", + "integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==", "cpu": [ "s390x" ], @@ -743,9 +744,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.1.tgz", - "integrity": "sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz", + "integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==", "cpu": [ "x64" ], @@ -760,9 +761,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.1.tgz", - "integrity": "sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.2.tgz", + "integrity": "sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==", "cpu": [ "arm64" ], @@ -777,9 +778,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.1.tgz", - "integrity": "sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz", + "integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==", "cpu": [ "x64" ], @@ -794,9 +795,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.1.tgz", - "integrity": "sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.2.tgz", + "integrity": "sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==", "cpu": [ "arm64" ], @@ -811,9 +812,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.1.tgz", - "integrity": "sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz", + "integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==", "cpu": [ "x64" ], @@ -828,9 +829,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.1.tgz", - "integrity": "sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz", + "integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==", "cpu": [ "x64" ], @@ -845,9 +846,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.1.tgz", - "integrity": "sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz", + "integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==", "cpu": [ "arm64" ], @@ -862,9 +863,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.1.tgz", - "integrity": "sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz", + "integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==", "cpu": [ "ia32" ], @@ -879,9 +880,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.1.tgz", - "integrity": "sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz", + "integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==", "cpu": [ "x64" ], @@ -925,13 +926,13 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", - "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", + "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/object-schema": "^2.1.4", + "@eslint/object-schema": "^2.1.6", "debug": "^4.3.1", "minimatch": "^3.1.2" }, @@ -963,20 +964,33 @@ "node": "*" } }, - "node_modules/@eslint/core": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", - "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", + "node_modules/@eslint/config-helpers": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.0.tgz", + "integrity": "sha512-yJLLmLexii32mGrhW29qvU3QBVTu0GUmEf/J4XsBtVhp4JkIUFN/BjWqTF63yRvGApIDpZm5fa97LtYtINmfeQ==", "dev": true, "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@eslint/core": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", + "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1022,9 +1036,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.13.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", - "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.23.0.tgz", + "integrity": "sha512-35MJ8vCPU0ZMxo7zfev2pypqTwWTofFZO6m4KAtdoFhRpLJUpHTZZ+KB3C7Hb1d7bULYwO4lJXGCi5Se+8OMbw==", "dev": true, "license": "MIT", "engines": { @@ -1032,9 +1046,9 @@ } }, "node_modules/@eslint/object-schema": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", - "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1042,12 +1056,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz", - "integrity": "sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz", + "integrity": "sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==", "dev": true, "license": "Apache-2.0", "dependencies": { + "@eslint/core": "^0.12.0", "levn": "^0.4.1" }, "engines": { @@ -1822,25 +1837,25 @@ "license": "MIT" }, "node_modules/@radix-ui/primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.0.tgz", - "integrity": "sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.1.tgz", + "integrity": "sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==", "license": "MIT" }, "node_modules/@radix-ui/react-accordion": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.2.1.tgz", - "integrity": "sha512-bg/l7l5QzUjgsh8kjwDFommzAshnUsuVMV5NM56QVCm+7ZckYdd9P/ExR8xG/Oup0OajVxNLaHJ1tb8mXk+nzQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.2.3.tgz", + "integrity": "sha512-RIQ15mrcvqIkDARJeERSuXSry2N8uYnxkdDetpfmalT/+0ntOXLkFOsh9iwlAsCv+qcmhZjbdJogIm6WBa6c4A==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-collapsible": "1.1.1", - "@radix-ui/react-collection": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-collapsible": "1.1.3", + "@radix-ui/react-collection": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", "@radix-ui/react-direction": "1.1.0", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-controllable-state": "1.1.0" }, "peerDependencies": { @@ -1859,12 +1874,12 @@ } }, "node_modules/@radix-ui/react-arrow": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.0.tgz", - "integrity": "sha512-FmlW1rCg7hBpEBwFbjHwCW6AmWLQM6g/v0Sn8XbP9NvmSZ2San1FpQeyPtufzOMSIx7Y4dzjlHoifhp+7NkZhw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.2.tgz", + "integrity": "sha512-G+KcpzXHq24iH0uGG/pF8LyzpFJYGD4RfLjCIBfGdSLXvjLHST31RUiRVrupIBMvIppMgSzQ6l66iAxl03tdlg==", "license": "MIT", "dependencies": { - "@radix-ui/react-primitive": "2.0.0" + "@radix-ui/react-primitive": "2.0.2" }, "peerDependencies": { "@types/react": "*", @@ -1882,17 +1897,17 @@ } }, "node_modules/@radix-ui/react-collapsible": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.1.tgz", - "integrity": "sha512-1///SnrfQHJEofLokyczERxQbWfCGQlQ2XsCZMucVs6it+lq9iw4vXy+uDn1edlb58cOZOWSldnfPAYcT4O/Yg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.3.tgz", + "integrity": "sha512-jFSerheto1X03MUC0g6R7LedNW9EEGWdg9W1+MlpkMLwGkgkbUXLPBH/KIuWKXUoeYRVY11llqbTBDzuLg7qrw==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-presence": "1.1.1", - "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-controllable-state": "1.1.0", "@radix-ui/react-use-layout-effect": "1.1.0" }, @@ -1912,15 +1927,15 @@ } }, "node_modules/@radix-ui/react-collection": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.0.tgz", - "integrity": "sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.2.tgz", + "integrity": "sha512-9z54IEKRxIa9VityapoEYMuByaG42iSy1ZXlY2KcuLSEtq8x4987/N6m15ppoMffgZX72gER2uHe1D9Y6Unlcw==", "license": "MIT", "dependencies": { - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-context": "1.1.0", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-slot": "1.1.0" + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2" }, "peerDependencies": { "@types/react": "*", @@ -1937,25 +1952,10 @@ } } }, - "node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-context": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.0.tgz", - "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-compose-refs": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", - "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", + "integrity": "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==", "license": "MIT", "peerDependencies": { "@types/react": "*", @@ -1983,25 +1983,25 @@ } }, "node_modules/@radix-ui/react-dialog": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.2.tgz", - "integrity": "sha512-Yj4dZtqa2o+kG61fzB0H2qUvmwBA2oyQroGLyNtBj1beo1khoQ3q1a2AO8rrQYjd8256CO9+N8L9tvsS+bnIyA==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.6.tgz", + "integrity": "sha512-/IVhJV5AceX620DUJ4uYVMymzsipdKBzo3edo+omeskCKGm9FRHM0ebIdbPnlQVJqyuHbuBltQUOG2mOTq2IYw==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", - "@radix-ui/react-dismissable-layer": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.5", "@radix-ui/react-focus-guards": "1.1.1", - "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.2", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-portal": "1.1.2", - "@radix-ui/react-presence": "1.1.1", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2", "@radix-ui/react-use-controllable-state": "1.1.0", - "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.6.0" + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", @@ -2034,14 +2034,14 @@ } }, "node_modules/@radix-ui/react-dismissable-layer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.1.tgz", - "integrity": "sha512-QSxg29lfr/xcev6kSz7MAlmDnzbP1eI/Dwn3Tp1ip0KT5CUELsxkekFEMVBEoykI3oV39hKT4TKZzBNMbcTZYQ==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.5.tgz", + "integrity": "sha512-E4TywXY6UsXNRhFrECa5HAvE5/4BFcGyfTyK36gP+pAW1ed7UTK4vKwdr53gAJYwqbfCWC6ATvJa3J3R/9+Qrg==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-callback-ref": "1.1.0", "@radix-ui/react-use-escape-keydown": "1.1.0" }, @@ -2061,17 +2061,17 @@ } }, "node_modules/@radix-ui/react-dropdown-menu": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.2.tgz", - "integrity": "sha512-GVZMR+eqK8/Kes0a36Qrv+i20bAPXSn8rCBTHx30w+3ECnR5o3xixAlqcVaYvLeyKUsm0aqyhWfmUcqufM8nYA==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.6.tgz", + "integrity": "sha512-no3X7V5fD487wab/ZYSHXq3H37u4NVeLDKI/Ks724X/eEFSSEFYZxWgsIlr1UBeEyDaM29HM5x9p1Nv8DuTYPA==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-menu": "2.1.2", - "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-menu": "2.1.6", + "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-controllable-state": "1.1.0" }, "peerDependencies": { @@ -2105,13 +2105,13 @@ } }, "node_modules/@radix-ui/react-focus-scope": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.0.tgz", - "integrity": "sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.2.tgz", + "integrity": "sha512-zxwE80FCU7lcXUGWkdt6XpTTCKPitG1XKOwViTxHVKIJhZl9MvIl2dVHeZENCWD9+EdWv05wlaEkRXUykU27RA==", "license": "MIT", "dependencies": { - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { @@ -2130,11 +2130,12 @@ } }, "node_modules/@radix-ui/react-icons": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-icons/-/react-icons-1.3.1.tgz", - "integrity": "sha512-QvYompk0X+8Yjlo/Fv4McrzxohDdM5GgLHyQcPpcsPvlOSXCGFjdbuyGL5dzRbg0GpknAjQJJZzdiRK7iWVuFQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-icons/-/react-icons-1.3.2.tgz", + "integrity": "sha512-fyQIhGDhzfc9pK2kH6Pl9c4BDJGfMkPqkyIgYDthyNYoNg3wVhoJMMh19WS4Up/1KMPFVpNsT2q3WmXn2N1m6g==", + "license": "MIT", "peerDependencies": { - "react": "^16.x || ^17.x || ^18.x || ^19.x" + "react": "^16.x || ^17.x || ^18.x || ^19.0.0 || ^19.0.0-rc" } }, "node_modules/@radix-ui/react-id": { @@ -2156,12 +2157,12 @@ } }, "node_modules/@radix-ui/react-label": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.0.tgz", - "integrity": "sha512-peLblDlFw/ngk3UWq0VnYaOLy6agTZZ+MUO/WhVfm14vJGML+xH4FAl2XQGLqdefjNb7ApRg6Yn7U42ZhmYXdw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.2.tgz", + "integrity": "sha512-zo1uGMTaNlHehDyFQcDZXRJhUPDuukcnHz0/jnrup0JA6qL+AFpAnty+7VKa9esuU5xTblAZzTGYJKSKaBxBhw==", "license": "MIT", "dependencies": { - "@radix-ui/react-primitive": "2.0.0" + "@radix-ui/react-primitive": "2.0.2" }, "peerDependencies": { "@types/react": "*", @@ -2179,29 +2180,29 @@ } }, "node_modules/@radix-ui/react-menu": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.2.tgz", - "integrity": "sha512-lZ0R4qR2Al6fZ4yCCZzu/ReTFrylHFxIqy7OezIpWF4bL0o9biKo0pFIvkaew3TyZ9Fy5gYVrR5zCGZBVbO1zg==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.6.tgz", + "integrity": "sha512-tBBb5CXDJW3t2mo9WlO7r6GTmWV0F0uzHZVFmlRmYpiSK1CDU5IKojP1pm7oknpBOrFZx/YgBRW9oorPO2S/Lg==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-collection": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-collection": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", "@radix-ui/react-direction": "1.1.0", - "@radix-ui/react-dismissable-layer": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.5", "@radix-ui/react-focus-guards": "1.1.1", - "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.2", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-popper": "1.2.0", - "@radix-ui/react-portal": "1.1.2", - "@radix-ui/react-presence": "1.1.1", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-roving-focus": "1.1.0", - "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-popper": "1.2.2", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-roving-focus": "1.1.2", + "@radix-ui/react-slot": "1.1.2", "@radix-ui/react-use-callback-ref": "1.1.0", - "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.6.0" + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", @@ -2219,25 +2220,25 @@ } }, "node_modules/@radix-ui/react-navigation-menu": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.2.1.tgz", - "integrity": "sha512-egDo0yJD2IK8L17gC82vptkvW1jLeni1VuqCyzY727dSJdk5cDjINomouLoNk8RVF7g2aNIfENKWL4UzeU9c8Q==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.2.5.tgz", + "integrity": "sha512-myMHHQUZ3ZLTi8W381/Vu43Ia0NqakkQZ2vzynMmTUtQQ9kNkjzhOwkZC9TAM5R07OZUVIQyHC06f/9JZJpvvA==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-collection": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-collection": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", "@radix-ui/react-direction": "1.1.0", - "@radix-ui/react-dismissable-layer": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.5", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-presence": "1.1.1", - "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-callback-ref": "1.1.0", "@radix-ui/react-use-controllable-state": "1.1.0", "@radix-ui/react-use-layout-effect": "1.1.0", "@radix-ui/react-use-previous": "1.1.0", - "@radix-ui/react-visually-hidden": "1.1.0" + "@radix-ui/react-visually-hidden": "1.1.2" }, "peerDependencies": { "@types/react": "*", @@ -2255,26 +2256,26 @@ } }, "node_modules/@radix-ui/react-popover": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.2.tgz", - "integrity": "sha512-u2HRUyWW+lOiA2g0Le0tMmT55FGOEWHwPFt1EPfbLly7uXQExFo5duNKqG2DzmFXIdqOeNd+TpE8baHWJCyP9w==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.6.tgz", + "integrity": "sha512-NQouW0x4/GnkFJ/pRqsIS3rM/k97VzKnVb2jB7Gq7VEGPy5g7uNV1ykySFt7eWSp3i2uSGFwaJcvIRJBAHmmFg==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", - "@radix-ui/react-dismissable-layer": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.5", "@radix-ui/react-focus-guards": "1.1.1", - "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.2", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-popper": "1.2.0", - "@radix-ui/react-portal": "1.1.2", - "@radix-ui/react-presence": "1.1.1", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-popper": "1.2.2", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2", "@radix-ui/react-use-controllable-state": "1.1.0", - "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.6.0" + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", @@ -2292,16 +2293,16 @@ } }, "node_modules/@radix-ui/react-popper": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.0.tgz", - "integrity": "sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.2.tgz", + "integrity": "sha512-Rvqc3nOpwseCyj/rgjlJDYAgyfw7OC1tTkKn2ivhaMGcYt8FSBlahHOZak2i3QwkRXUXgGgzeEe2RuqeEHuHgA==", "license": "MIT", "dependencies": { "@floating-ui/react-dom": "^2.0.0", - "@radix-ui/react-arrow": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-context": "1.1.0", - "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-arrow": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-callback-ref": "1.1.0", "@radix-ui/react-use-layout-effect": "1.1.0", "@radix-ui/react-use-rect": "1.1.0", @@ -2323,28 +2324,13 @@ } } }, - "node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-context": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.0.tgz", - "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-portal": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.2.tgz", - "integrity": "sha512-WeDYLGPxJb/5EGBoedyJbT0MpoULmwnIPMJMSldkuiMsBAv7N1cRdsTWZWht9vpPOiN3qyiGAtbK2is47/uMFg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.4.tgz", + "integrity": "sha512-sn2O9k1rPFYVyKd5LAJfo96JlSGVFpa1fS6UuBJfrZadudiw5tAmru+n1x7aMRQ84qDM71Zh1+SzK5QwU0tJfA==", "license": "MIT", "dependencies": { - "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { @@ -2363,12 +2349,12 @@ } }, "node_modules/@radix-ui/react-presence": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.1.tgz", - "integrity": "sha512-IeFXVi4YS1K0wVZzXNrbaaUvIJ3qdY+/Ih4eHFhWA9SwGR9UDX7Ck8abvL57C4cv3wwMvUE0OG69Qc3NCcTe/A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.2.tgz", + "integrity": "sha512-18TFr80t5EVgL9x1SwF/YGtfG+l0BS0PRAlCWBDoBEiDQjeKgnNZRVJp/oVBl24sr3Gbfwc/Qpj4OcWTQMsAEg==", "license": "MIT", "dependencies": { - "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { @@ -2387,12 +2373,12 @@ } }, "node_modules/@radix-ui/react-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", - "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz", + "integrity": "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==", "license": "MIT", "dependencies": { - "@radix-ui/react-slot": "1.1.0" + "@radix-ui/react-slot": "1.1.2" }, "peerDependencies": { "@types/react": "*", @@ -2410,18 +2396,18 @@ } }, "node_modules/@radix-ui/react-roving-focus": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.0.tgz", - "integrity": "sha512-EA6AMGeq9AEeQDeSH0aZgG198qkfHSbvWTf1HvoDmOB5bBG/qTxjYMWUKMnYiV6J/iP/J8MEFSuB2zRU2n7ODA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.2.tgz", + "integrity": "sha512-zgMQWkNO169GtGqRvYrzb0Zf8NhMHS2DuEB/TiEmVnpr5OqPU3i8lfbxaAmC2J/KYuIQxyoQQ6DxepyXp61/xw==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-collection": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", - "@radix-ui/react-context": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-collection": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", "@radix-ui/react-direction": "1.1.0", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-callback-ref": "1.1.0", "@radix-ui/react-use-controllable-state": "1.1.0" }, @@ -2440,48 +2426,33 @@ } } }, - "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.0.tgz", - "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-select": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.1.2.tgz", - "integrity": "sha512-rZJtWmorC7dFRi0owDmoijm6nSJH1tVw64QGiNIZ9PNLyBDtG+iAq+XGsya052At4BfarzY/Dhv9wrrUr6IMZA==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.1.6.tgz", + "integrity": "sha512-T6ajELxRvTuAMWH0YmRJ1qez+x4/7Nq7QIx7zJ0VK3qaEWdnWpNbEDnmWldG1zBDwqrLy5aLMUWcoGirVj5kMg==", "license": "MIT", "dependencies": { "@radix-ui/number": "1.1.0", - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-collection": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-collection": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", "@radix-ui/react-direction": "1.1.0", - "@radix-ui/react-dismissable-layer": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.5", "@radix-ui/react-focus-guards": "1.1.1", - "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.2", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-popper": "1.2.0", - "@radix-ui/react-portal": "1.1.2", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-popper": "1.2.2", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2", "@radix-ui/react-use-callback-ref": "1.1.0", "@radix-ui/react-use-controllable-state": "1.1.0", "@radix-ui/react-use-layout-effect": "1.1.0", "@radix-ui/react-use-previous": "1.1.0", - "@radix-ui/react-visually-hidden": "1.1.0", - "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.6.0" + "@radix-ui/react-visually-hidden": "1.1.2", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", @@ -2499,12 +2470,12 @@ } }, "node_modules/@radix-ui/react-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.0.tgz", - "integrity": "sha512-3uBAs+egzvJBDZAzvb/n4NxxOYpnspmWxO2u5NbZ8Y6FM/NdrGSF9bop3Cf6F6C71z1rTSn8KV0Fo2ZVd79lGA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.2.tgz", + "integrity": "sha512-oZfHcaAp2Y6KFBX6I5P1u7CQoy4lheCGiYj+pGFrHy8E/VNRb5E39TkTr3JrV520csPBTZjkuKFdEsjS5EUNKQ==", "license": "MIT", "dependencies": { - "@radix-ui/react-primitive": "2.0.0" + "@radix-ui/react-primitive": "2.0.2" }, "peerDependencies": { "@types/react": "*", @@ -2522,12 +2493,12 @@ } }, "node_modules/@radix-ui/react-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", - "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", "license": "MIT", "dependencies": { - "@radix-ui/react-compose-refs": "1.1.0" + "@radix-ui/react-compose-refs": "1.1.1" }, "peerDependencies": { "@types/react": "*", @@ -2540,15 +2511,15 @@ } }, "node_modules/@radix-ui/react-switch": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.1.1.tgz", - "integrity": "sha512-diPqDDoBcZPSicYoMWdWx+bCPuTRH4QSp9J+65IvtdS0Kuzt67bI6n32vCj8q6NZmYW/ah+2orOtMwcX5eQwIg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.1.3.tgz", + "integrity": "sha512-1nc+vjEOQkJVsJtWPSiISGT6OKm4SiOdjMo+/icLxo2G4vxz1GntC5MzfL4v8ey9OEfw787QCD1y3mUv0NiFEQ==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", - "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-controllable-state": "1.1.0", "@radix-ui/react-use-previous": "1.1.0", "@radix-ui/react-use-size": "1.1.0" @@ -2569,18 +2540,18 @@ } }, "node_modules/@radix-ui/react-tabs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.1.tgz", - "integrity": "sha512-3GBUDmP2DvzmtYLMsHmpA1GtR46ZDZ+OreXM/N+kkQJOPIgytFWWTfDQmBQKBvaFS0Vno0FktdbVzN28KGrMdw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.3.tgz", + "integrity": "sha512-9mFyI30cuRDImbmFF6O2KUJdgEOsGh9Vmx9x/Dh9tOhL7BngmQPQfwW4aejKm5OHpfWIdmeV6ySyuxoOGjtNng==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", + "@radix-ui/primitive": "1.1.1", "@radix-ui/react-context": "1.1.1", "@radix-ui/react-direction": "1.1.0", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-presence": "1.1.1", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-roving-focus": "1.1.0", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-roving-focus": "1.1.2", "@radix-ui/react-use-controllable-state": "1.1.0" }, "peerDependencies": { @@ -2599,23 +2570,23 @@ } }, "node_modules/@radix-ui/react-tooltip": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.1.3.tgz", - "integrity": "sha512-Z4w1FIS0BqVFI2c1jZvb/uDVJijJjJ2ZMuPV81oVgTZ7g3BZxobplnMVvXtFWgtozdvYJ+MFWtwkM5S2HnAong==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.1.8.tgz", + "integrity": "sha512-YAA2cu48EkJZdAMHC0dqo9kialOcRStbtiY4nJPaht7Ptrhcvpo+eDChaM6BIs8kL6a8Z5l5poiqLnXcNduOkA==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.0", - "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", - "@radix-ui/react-dismissable-layer": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.5", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-popper": "1.2.0", - "@radix-ui/react-portal": "1.1.2", - "@radix-ui/react-presence": "1.1.1", - "@radix-ui/react-primitive": "2.0.0", - "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-popper": "1.2.2", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2", "@radix-ui/react-use-controllable-state": "1.1.0", - "@radix-ui/react-visually-hidden": "1.1.0" + "@radix-ui/react-visually-hidden": "1.1.2" }, "peerDependencies": { "@types/react": "*", @@ -2750,12 +2721,12 @@ } }, "node_modules/@radix-ui/react-visually-hidden": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.1.0.tgz", - "integrity": "sha512-N8MDZqtgCgG5S3aV60INAB475osJousYpZ4cTJ2cFbMpdHS5Y6loLTH8LPtkj2QN0x93J30HT/M3qJXM0+lyeQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.1.2.tgz", + "integrity": "sha512-1SzA4ns2M1aRlvxErqhLHsBHoS5eI5UUcI2awAMgGUp4LoaoWOKYmvqDY2s/tltuPkh3Yk77YF/r3IRj+Amx4Q==", "license": "MIT", "dependencies": { - "@radix-ui/react-primitive": "2.0.0" + "@radix-ui/react-primitive": "2.0.2" }, "peerDependencies": { "@types/react": "*", @@ -2779,9 +2750,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.35.0.tgz", - "integrity": "sha512-uYQ2WfPaqz5QtVgMxfN6NpLD+no0MYHDBywl7itPYd3K5TjjSghNKmX8ic9S8NU8w81NVhJv/XojcHptRly7qQ==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.38.0.tgz", + "integrity": "sha512-ldomqc4/jDZu/xpYU+aRxo3V4mGCV9HeTgUBANI3oIQMOL+SsxB+S2lxMpkFp5UamSS3XuTMQVbsS24R4J4Qjg==", "cpu": [ "arm" ], @@ -2793,9 +2764,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.35.0.tgz", - "integrity": "sha512-FtKddj9XZudurLhdJnBl9fl6BwCJ3ky8riCXjEw3/UIbjmIY58ppWwPEvU3fNu+W7FUsAsB1CdH+7EQE6CXAPA==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.38.0.tgz", + "integrity": "sha512-VUsgcy4GhhT7rokwzYQP+aV9XnSLkkhlEJ0St8pbasuWO/vwphhZQxYEKUP3ayeCYLhk6gEtacRpYP/cj3GjyQ==", "cpu": [ "arm64" ], @@ -2807,9 +2778,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.35.0.tgz", - "integrity": "sha512-Uk+GjOJR6CY844/q6r5DR/6lkPFOw0hjfOIzVx22THJXMxktXG6CbejseJFznU8vHcEBLpiXKY3/6xc+cBm65Q==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.38.0.tgz", + "integrity": "sha512-buA17AYXlW9Rn091sWMq1xGUvWQFOH4N1rqUxGJtEQzhChxWjldGCCup7r/wUnaI6Au8sKXpoh0xg58a7cgcpg==", "cpu": [ "arm64" ], @@ -2821,9 +2792,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.35.0.tgz", - "integrity": "sha512-3IrHjfAS6Vkp+5bISNQnPogRAW5GAV1n+bNCrDwXmfMHbPl5EhTmWtfmwlJxFRUCBZ+tZ/OxDyU08aF6NI/N5Q==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.38.0.tgz", + "integrity": "sha512-Mgcmc78AjunP1SKXl624vVBOF2bzwNWFPMP4fpOu05vS0amnLcX8gHIge7q/lDAHy3T2HeR0TqrriZDQS2Woeg==", "cpu": [ "x64" ], @@ -2835,9 +2806,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.35.0.tgz", - "integrity": "sha512-sxjoD/6F9cDLSELuLNnY0fOrM9WA0KrM0vWm57XhrIMf5FGiN8D0l7fn+bpUeBSU7dCgPV2oX4zHAsAXyHFGcQ==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.38.0.tgz", + "integrity": "sha512-zzJACgjLbQTsscxWqvrEQAEh28hqhebpRz5q/uUd1T7VTwUNZ4VIXQt5hE7ncs0GrF+s7d3S4on4TiXUY8KoQA==", "cpu": [ "arm64" ], @@ -2849,9 +2820,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.35.0.tgz", - "integrity": "sha512-2mpHCeRuD1u/2kruUiHSsnjWtHjqVbzhBkNVQ1aVD63CcexKVcQGwJ2g5VphOd84GvxfSvnnlEyBtQCE5hxVVw==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.38.0.tgz", + "integrity": "sha512-hCY/KAeYMCyDpEE4pTETam0XZS4/5GXzlLgpi5f0IaPExw9kuB+PDTOTLuPtM10TlRG0U9OSmXJ+Wq9J39LvAg==", "cpu": [ "x64" ], @@ -2863,9 +2834,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.35.0.tgz", - "integrity": "sha512-mrA0v3QMy6ZSvEuLs0dMxcO2LnaCONs1Z73GUDBHWbY8tFFocM6yl7YyMu7rz4zS81NDSqhrUuolyZXGi8TEqg==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.38.0.tgz", + "integrity": "sha512-mimPH43mHl4JdOTD7bUMFhBdrg6f9HzMTOEnzRmXbOZqjijCw8LA5z8uL6LCjxSa67H2xiLFvvO67PT05PRKGg==", "cpu": [ "arm" ], @@ -2877,9 +2848,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.35.0.tgz", - "integrity": "sha512-DnYhhzcvTAKNexIql8pFajr0PiDGrIsBYPRvCKlA5ixSS3uwo/CWNZxB09jhIapEIg945KOzcYEAGGSmTSpk7A==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.38.0.tgz", + "integrity": "sha512-tPiJtiOoNuIH8XGG8sWoMMkAMm98PUwlriOFCCbZGc9WCax+GLeVRhmaxjJtz6WxrPKACgrwoZ5ia/uapq3ZVg==", "cpu": [ "arm" ], @@ -2891,9 +2862,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.35.0.tgz", - "integrity": "sha512-uagpnH2M2g2b5iLsCTZ35CL1FgyuzzJQ8L9VtlJ+FckBXroTwNOaD0z0/UF+k5K3aNQjbm8LIVpxykUOQt1m/A==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.38.0.tgz", + "integrity": "sha512-wZco59rIVuB0tjQS0CSHTTUcEde+pXQWugZVxWaQFdQQ1VYub/sTrNdY76D1MKdN2NB48JDuGABP6o6fqos8mA==", "cpu": [ "arm64" ], @@ -2905,9 +2876,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.35.0.tgz", - "integrity": "sha512-XQxVOCd6VJeHQA/7YcqyV0/88N6ysSVzRjJ9I9UA/xXpEsjvAgDTgH3wQYz5bmr7SPtVK2TsP2fQ2N9L4ukoUg==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.38.0.tgz", + "integrity": "sha512-fQgqwKmW0REM4LomQ+87PP8w8xvU9LZfeLBKybeli+0yHT7VKILINzFEuggvnV9M3x1Ed4gUBmGUzCo/ikmFbQ==", "cpu": [ "arm64" ], @@ -2919,9 +2890,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.35.0.tgz", - "integrity": "sha512-5pMT5PzfgwcXEwOaSrqVsz/LvjDZt+vQ8RT/70yhPU06PTuq8WaHhfT1LW+cdD7mW6i/J5/XIkX/1tCAkh1W6g==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.38.0.tgz", + "integrity": "sha512-hz5oqQLXTB3SbXpfkKHKXLdIp02/w3M+ajp8p4yWOWwQRtHWiEOCKtc9U+YXahrwdk+3qHdFMDWR5k+4dIlddg==", "cpu": [ "loong64" ], @@ -2933,9 +2904,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.35.0.tgz", - "integrity": "sha512-c+zkcvbhbXF98f4CtEIP1EBA/lCic5xB0lToneZYvMeKu5Kamq3O8gqrxiYYLzlZH6E3Aq+TSW86E4ay8iD8EA==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.38.0.tgz", + "integrity": "sha512-NXqygK/dTSibQ+0pzxsL3r4Xl8oPqVoWbZV9niqOnIHV/J92fe65pOir0xjkUZDRSPyFRvu+4YOpJF9BZHQImw==", "cpu": [ "ppc64" ], @@ -2947,9 +2918,23 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.35.0.tgz", - "integrity": "sha512-s91fuAHdOwH/Tad2tzTtPX7UZyytHIRR6V4+2IGlV0Cej5rkG0R61SX4l4y9sh0JBibMiploZx3oHKPnQBKe4g==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.38.0.tgz", + "integrity": "sha512-GEAIabR1uFyvf/jW/5jfu8gjM06/4kZ1W+j1nWTSSB3w6moZEBm7iBtzwQ3a1Pxos2F7Gz+58aVEnZHU295QTg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.38.0.tgz", + "integrity": "sha512-9EYTX+Gus2EGPbfs+fh7l95wVADtSQyYw4DfSBcYdUEAmP2lqSZY0Y17yX/3m5VKGGJ4UmIH5LHLkMJft3bYoA==", "cpu": [ "riscv64" ], @@ -2961,9 +2946,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.35.0.tgz", - "integrity": "sha512-hQRkPQPLYJZYGP+Hj4fR9dDBMIM7zrzJDWFEMPdTnTy95Ljnv0/4w/ixFw3pTBMEuuEuoqtBINYND4M7ujcuQw==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.38.0.tgz", + "integrity": "sha512-Mpp6+Z5VhB9VDk7RwZXoG2qMdERm3Jw07RNlXHE0bOnEeX+l7Fy4bg+NxfyN15ruuY3/7Vrbpm75J9QHFqj5+Q==", "cpu": [ "s390x" ], @@ -2975,9 +2960,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.35.0.tgz", - "integrity": "sha512-Pim1T8rXOri+0HmV4CdKSGrqcBWX0d1HoPnQ0uw0bdp1aP5SdQVNBy8LjYncvnLgu3fnnCt17xjWGd4cqh8/hA==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.38.0.tgz", + "integrity": "sha512-vPvNgFlZRAgO7rwncMeE0+8c4Hmc+qixnp00/Uv3ht2x7KYrJ6ERVd3/R0nUtlE6/hu7/HiiNHJ/rP6knRFt1w==", "cpu": [ "x64" ], @@ -2989,9 +2974,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.35.0.tgz", - "integrity": "sha512-QysqXzYiDvQWfUiTm8XmJNO2zm9yC9P/2Gkrwg2dH9cxotQzunBHYr6jk4SujCTqnfGxduOmQcI7c2ryuW8XVg==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.38.0.tgz", + "integrity": "sha512-q5Zv+goWvQUGCaL7fU8NuTw8aydIL/C9abAVGCzRReuj5h30TPx4LumBtAidrVOtXnlB+RZkBtExMsfqkMfb8g==", "cpu": [ "x64" ], @@ -3003,9 +2988,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.35.0.tgz", - "integrity": "sha512-OUOlGqPkVJCdJETKOCEf1mw848ZyJ5w50/rZ/3IBQVdLfR5jk/6Sr5m3iO2tdPgwo0x7VcncYuOvMhBWZq8ayg==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.38.0.tgz", + "integrity": "sha512-u/Jbm1BU89Vftqyqbmxdq14nBaQjQX1HhmsdBWqSdGClNaKwhjsg5TpW+5Ibs1mb8Es9wJiMdl86BcmtUVXNZg==", "cpu": [ "arm64" ], @@ -3017,9 +3002,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.35.0.tgz", - "integrity": "sha512-2/lsgejMrtwQe44glq7AFFHLfJBPafpsTa6JvP2NGef/ifOa4KBoglVf7AKN7EV9o32evBPRqfg96fEHzWo5kw==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.38.0.tgz", + "integrity": "sha512-mqu4PzTrlpNHHbu5qleGvXJoGgHpChBlrBx/mEhTPpnAL1ZAYFlvHD7rLK839LLKQzqEQMFJfGrrOHItN4ZQqA==", "cpu": [ "ia32" ], @@ -3031,9 +3016,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.35.0.tgz", - "integrity": "sha512-PIQeY5XDkrOysbQblSW7v3l1MDZzkTEzAfTPkj5VAu3FW8fS4ynyLg2sINp0fp3SjZ8xkRYpLqoKcYqAkhU1dw==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.38.0.tgz", + "integrity": "sha512-jjqy3uWlecfB98Psxb5cD6Fny9Fupv9LrDSPTQZUROqjvZmcCqNu4UMl7qqhlUUGpwiAkotj6GYu4SZdcr/nLw==", "cpu": [ "x64" ], @@ -3072,6 +3057,49 @@ "tslib": "^2.8.0" } }, + "node_modules/@tanstack/eslint-plugin-query": { + "version": "5.68.0", + "resolved": "https://registry.npmjs.org/@tanstack/eslint-plugin-query/-/eslint-plugin-query-5.68.0.tgz", + "integrity": "sha512-w/+y5LILV1GTWBB2R/lKfUzgocKXU1B7O6jipLUJhmxCKPmJFy5zpfR1Vx7c6yCEsQoKcTbhuR/tIy+1sIGaiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "^8.18.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/@tanstack/query-core": { + "version": "5.71.1", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.71.1.tgz", + "integrity": "sha512-4+ZswCHOfJX+ikhXNoocamTUmJcHtB+Ljjz/oJkC7/eKB5IrzEwR4vEwZUENiPi+wISucJHR5TUbuuJ26w3kdQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.71.1", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.71.1.tgz", + "integrity": "sha512-6BTkaSIGT58MroI4kIGXNdx/NhirXPU+75AJObLq+WBa39WmoxhzSk0YX+hqWJ/bvqZJFxslbEU4qIHaRZq+8Q==", + "license": "MIT", + "dependencies": { + "@tanstack/query-core": "5.71.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^18 || ^19" + } + }, "node_modules/@testing-library/dom": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", @@ -3103,9 +3131,9 @@ } }, "node_modules/@testing-library/react": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.0.1.tgz", - "integrity": "sha512-dSmwJVtJXmku+iocRhWOUFbrERC76TX2Mnf0ATODz8brzAZrMBbzLwQixlBSanZxR6LddK3eiwpSFZgDET1URg==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.2.0.tgz", + "integrity": "sha512-2cSskAvA1QNtKc8Y9VJQRv0tm3hLVgxRGDB+KYhIaPQJ1I+RHbhIXcM+zClKXzMes/wshsMVzf4B9vS4IZpqDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3116,10 +3144,10 @@ }, "peerDependencies": { "@testing-library/dom": "^10.0.0", - "@types/react": "^18.0.0", - "@types/react-dom": "^18.0.0", - "react": "^18.0.0", - "react-dom": "^18.0.0" + "@types/react": "^18.0.0 || ^19.0.0", + "@types/react-dom": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -3183,9 +3211,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", "dev": true, "license": "MIT" }, @@ -3213,13 +3241,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.8.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.6.tgz", - "integrity": "sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw==", + "version": "22.13.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.16.tgz", + "integrity": "sha512-15tM+qA4Ypml/N7kyRdvfRjBQT2RL461uF1Bldn06K0Nzn1lY3nAPgHlsVrJxdZ9WhZiW0Fmc1lOYMtDsAuB3w==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.8" + "undici-types": "~6.20.0" } }, "node_modules/@types/react": { @@ -3227,7 +3255,7 @@ "version": "19.0.0-rc.1", "resolved": "https://registry.npmjs.org/types-react/-/types-react-19.0.0-rc.1.tgz", "integrity": "sha512-RshndUfqTW6K3STLPis8BtAYCGOkMbtvYsi90gmVNDZBXUyUc5juf2PE9LfS/JmOlUIRO8cWTS/1MTnmhjDqyQ==", - "devOptional": true, + "dev": true, "dependencies": { "csstype": "^3.0.2" } @@ -3237,7 +3265,7 @@ "version": "19.0.0-rc.1", "resolved": "https://registry.npmjs.org/types-react-dom/-/types-react-dom-19.0.0-rc.1.tgz", "integrity": "sha512-VSLZJl8VXCD0fAWp7DUTFUDCcZ8DVXOQmjhJMD03odgeFmu14ZQJHCXeETm3BEAhJqfgJaFkLnGkQv88sRx0fQ==", - "devOptional": true, + "dev": true, "dependencies": { "@types/react": "*" } @@ -3255,21 +3283,21 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.12.2.tgz", - "integrity": "sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.29.0.tgz", + "integrity": "sha512-PAIpk/U7NIS6H7TEtN45SPGLQaHNgB7wSjsQV/8+KYokAb2T/gloOA/Bee2yd4/yKVhPKe5LlaUGhAZk5zmSaQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/type-utils": "8.12.2", - "@typescript-eslint/utils": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/scope-manager": "8.29.0", + "@typescript-eslint/type-utils": "8.29.0", + "@typescript-eslint/utils": "8.29.0", + "@typescript-eslint/visitor-keys": "8.29.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3280,25 +3308,21 @@ }, "peerDependencies": { "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.12.2.tgz", - "integrity": "sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.29.0.tgz", + "integrity": "sha512-8C0+jlNJOwQso2GapCVWWfW/rzaq7Lbme+vGUFKE31djwNncIpgXD7Cd4weEsDdkoZDjH0lwwr3QDQFuyrMg9g==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/typescript-estree": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/scope-manager": "8.29.0", + "@typescript-eslint/types": "8.29.0", + "@typescript-eslint/typescript-estree": "8.29.0", + "@typescript-eslint/visitor-keys": "8.29.0", "debug": "^4.3.4" }, "engines": { @@ -3309,23 +3333,19 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.12.2.tgz", - "integrity": "sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.29.0.tgz", + "integrity": "sha512-aO1PVsq7Gm+tcghabUpzEnVSFMCU4/nYIgC2GOatJcllvWfnhrgW0ZEbnTxm36QsikmCN1K/6ZgM7fok2I7xNw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2" + "@typescript-eslint/types": "8.29.0", + "@typescript-eslint/visitor-keys": "8.29.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3336,16 +3356,16 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.12.2.tgz", - "integrity": "sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.29.0.tgz", + "integrity": "sha512-ahaWQ42JAOx+NKEf5++WC/ua17q5l+j1GFrbbpVKzFL/tKVc0aYY8rVSYUpUvt2hUP1YBr7mwXzx+E/DfUWI9Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.12.2", - "@typescript-eslint/utils": "8.12.2", + "@typescript-eslint/typescript-estree": "8.29.0", + "@typescript-eslint/utils": "8.29.0", "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3354,16 +3374,15 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.12.2.tgz", - "integrity": "sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.29.0.tgz", + "integrity": "sha512-wcJL/+cOXV+RE3gjCyl/V2G877+2faqvlgtso/ZRbTCnZazh0gXhe+7gbAnfubzN2bNsBtZjDvlh7ero8uIbzg==", "dev": true, "license": "MIT", "engines": { @@ -3375,20 +3394,20 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.12.2.tgz", - "integrity": "sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.29.0.tgz", + "integrity": "sha512-yOfen3jE9ISZR/hHpU/bmNvTtBW1NjRbkSFdZOksL1N+ybPEE7UVGMwqvS6CP022Rp00Sb0tdiIkhSCe6NI8ow==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/types": "8.29.0", + "@typescript-eslint/visitor-keys": "8.29.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3397,23 +3416,21 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/utils": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.12.2.tgz", - "integrity": "sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-gX/A0Mz9Bskm8avSWFcK0gP7cZpbY4AIo6B0hWYFCaIsz750oaiWR4Jr2CI+PQhfW1CpcQr9OlfPS+kMFegjXA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/typescript-estree": "8.12.2" + "@typescript-eslint/scope-manager": "8.29.0", + "@typescript-eslint/types": "8.29.0", + "@typescript-eslint/typescript-estree": "8.29.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3423,18 +3440,19 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.12.2.tgz", - "integrity": "sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.29.0.tgz", + "integrity": "sha512-Sne/pVz8ryR03NFK21VpN88dZ2FdQXOlq3VIklbrTYEt8yXtRFr9tvUhqvCeKjqYk5FSim37sHbooT6vzBTZcg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.12.2", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.29.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3444,25 +3462,17 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@vercel/analytics": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.3.2.tgz", - "integrity": "sha512-n/Ws7skBbW+fUBMeg+jrT30+GP00jTHvCcL4fuVrShuML0uveEV/4vVUdvqEVnDgXIGfLm0GXW5EID2mCcRXhg==", - "license": "MPL-2.0", - "dependencies": { - "server-only": "^0.0.1" + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependencies": { - "next": ">= 13", - "react": "^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "next": { - "optional": true - }, - "react": { - "optional": true - } + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@vitejs/plugin-react": { @@ -3486,14 +3496,14 @@ } }, "node_modules/@vitest/expect": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.0.8.tgz", - "integrity": "sha512-Xu6TTIavTvSSS6LZaA3EebWFr6tsoXPetOWNMOlc7LO88QVVBwq2oQWBoDiLCN6YTvNYsGSjqOO8CAdjom5DCQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.1.1.tgz", + "integrity": "sha512-q/zjrW9lgynctNbwvFtQkGK9+vvHA5UzVi2V8APrp1C6fG6/MuYYkmlx4FubuqLycCeSdHD5aadWfua/Vr0EUA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.0.8", - "@vitest/utils": "3.0.8", + "@vitest/spy": "3.1.1", + "@vitest/utils": "3.1.1", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" }, @@ -3502,13 +3512,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.0.8.tgz", - "integrity": "sha512-n3LjS7fcW1BCoF+zWZxG7/5XvuYH+lsFg+BDwwAz0arIwHQJFUEsKBQ0BLU49fCxuM/2HSeBPHQD8WjgrxMfow==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.1.1.tgz", + "integrity": "sha512-bmpJJm7Y7i9BBELlLuuM1J1Q6EQ6K5Ye4wcyOpOMXMcePYKSIYlpcrCm4l/O6ja4VJA5G2aMJiuZkZdnxlC3SA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.0.8", + "@vitest/spy": "3.1.1", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, @@ -3529,9 +3539,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.0.8.tgz", - "integrity": "sha512-BNqwbEyitFhzYMYHUVbIvepOyeQOSFA/NeJMIP9enMntkkxLgOcgABH6fjyXG85ipTgvero6noreavGIqfJcIg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.1.1.tgz", + "integrity": "sha512-dg0CIzNx+hMMYfNmSqJlLSXEmnNhMswcn3sXO7Tpldr0LiGmg3eXdLLhwkv2ZqgHb/d5xg5F7ezNFRA1fA13yA==", "dev": true, "license": "MIT", "dependencies": { @@ -3542,13 +3552,13 @@ } }, "node_modules/@vitest/runner": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.0.8.tgz", - "integrity": "sha512-c7UUw6gEcOzI8fih+uaAXS5DwjlBaCJUo7KJ4VvJcjL95+DSR1kova2hFuRt3w41KZEFcOEiq098KkyrjXeM5w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.1.1.tgz", + "integrity": "sha512-X/d46qzJuEDO8ueyjtKfxffiXraPRfmYasoC4i5+mlLEJ10UvPb0XH5M9C3gWuxd7BAQhpK42cJgJtq53YnWVA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.0.8", + "@vitest/utils": "3.1.1", "pathe": "^2.0.3" }, "funding": { @@ -3556,13 +3566,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.0.8.tgz", - "integrity": "sha512-x8IlMGSEMugakInj44nUrLSILh/zy1f2/BgH0UeHpNyOocG18M9CWVIFBaXPt8TrqVZWmcPjwfG/ht5tnpba8A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.1.1.tgz", + "integrity": "sha512-bByMwaVWe/+1WDf9exFxWWgAixelSdiwo2p33tpqIlM14vW7PRV5ppayVXtfycqze4Qhtwag5sVhX400MLBOOw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.0.8", + "@vitest/pretty-format": "3.1.1", "magic-string": "^0.30.17", "pathe": "^2.0.3" }, @@ -3571,9 +3581,9 @@ } }, "node_modules/@vitest/spy": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.0.8.tgz", - "integrity": "sha512-MR+PzJa+22vFKYb934CejhR4BeRpMSoxkvNoDit68GQxRLSf11aT6CTj3XaqUU9rxgWJFnqicN/wxw6yBRkI1Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.1.1.tgz", + "integrity": "sha512-+EmrUOOXbKzLkTDwlsc/xrwOlPDXyVk3Z6P6K4oiCndxz7YLpp/0R0UsWVOKT0IXWjjBJuSMk6D27qipaupcvQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3584,13 +3594,13 @@ } }, "node_modules/@vitest/utils": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.0.8.tgz", - "integrity": "sha512-nkBC3aEhfX2PdtQI/QwAWp8qZWwzASsU4Npbcd5RdMPBSSLCpkZp52P3xku3s3uA0HIEhGvEcF8rNkBsz9dQ4Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.1.1.tgz", + "integrity": "sha512-1XIjflyaU2k3HMArJ50bwSh3wKWPD6Q47wz/NUSmRV0zNywPc4w79ARjg/i/aNINHwA+mIALhUVqD9/aUvZNgg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.0.8", + "@vitest/pretty-format": "3.1.1", "loupe": "^3.1.3", "tinyrainbow": "^2.0.0" }, @@ -3599,9 +3609,9 @@ } }, "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", "dev": true, "license": "MIT", "bin": { @@ -4186,9 +4196,9 @@ } }, "node_modules/chart.js": { - "version": "4.4.7", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.7.tgz", - "integrity": "sha512-pwkcKfdzTMAU/+jNosKhNL2bHtJc/sSmYgVbuGTEDhzkrhmyihmP7vUc/5ZK9WopidMDHNe3Wm7jOd/WhuHWuw==", + "version": "4.4.8", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.8.tgz", + "integrity": "sha512-IkGZlVpXP+83QpMm4uxEiGqSI7jFizwVtF3+n5Pc3k7sMO+tkd0qxh2OzLhenM0K80xtmAONWGBn082EiBQSDA==", "license": "MIT", "dependencies": { "@kurkle/color": "^0.3.0" @@ -4255,24 +4265,15 @@ } }, "node_modules/class-variance-authority": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.0.tgz", - "integrity": "sha512-jFI8IQw4hczaL4ALINxqLEXQbWcNjoSkloa4IaufXCJr6QawJyw7tuRysRsrE8w2p/4gGaxKIt/hX3qz/IbD1A==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz", + "integrity": "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==", "license": "Apache-2.0", "dependencies": { - "clsx": "2.0.0" + "clsx": "^2.1.1" }, "funding": { - "url": "https://joebell.co.uk" - } - }, - "node_modules/class-variance-authority/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", - "license": "MIT", - "engines": { - "node": ">=6" + "url": "https://polar.sh/cva" } }, "node_modules/client-only": { @@ -4291,15 +4292,15 @@ } }, "node_modules/cmdk": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cmdk/-/cmdk-1.0.3.tgz", - "integrity": "sha512-2c3uTjwT4YeHj60q2k8S1B0WHSoGR6t5CPnec6PMFD2QF4gwid0t1VSPNeEmL02EwBwNky/A3gwPCOViKTtoPA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cmdk/-/cmdk-1.1.1.tgz", + "integrity": "sha512-Vsv7kFaXm+ptHDMZ7izaRsP70GgrW9NBNGswt9OZaVBLlE0SNpDq8eu/VGXyF9r7M0azK3Wy7OlYXsuyYLFzHg==", "license": "MIT", "dependencies": { - "@radix-ui/react-dialog": "^1.1.2", + "@radix-ui/react-compose-refs": "^1.1.1", + "@radix-ui/react-dialog": "^1.1.6", "@radix-ui/react-id": "^1.1.0", - "@radix-ui/react-primitive": "^2.0.0", - "use-sync-external-store": "^1.2.2" + "@radix-ui/react-primitive": "^2.0.2" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", @@ -4395,9 +4396,9 @@ "license": "MIT" }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "dependencies": { @@ -4915,9 +4916,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz", - "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz", + "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -4928,31 +4929,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.1", - "@esbuild/android-arm": "0.25.1", - "@esbuild/android-arm64": "0.25.1", - "@esbuild/android-x64": "0.25.1", - "@esbuild/darwin-arm64": "0.25.1", - "@esbuild/darwin-x64": "0.25.1", - "@esbuild/freebsd-arm64": "0.25.1", - "@esbuild/freebsd-x64": "0.25.1", - "@esbuild/linux-arm": "0.25.1", - "@esbuild/linux-arm64": "0.25.1", - "@esbuild/linux-ia32": "0.25.1", - "@esbuild/linux-loong64": "0.25.1", - "@esbuild/linux-mips64el": "0.25.1", - "@esbuild/linux-ppc64": "0.25.1", - "@esbuild/linux-riscv64": "0.25.1", - "@esbuild/linux-s390x": "0.25.1", - "@esbuild/linux-x64": "0.25.1", - "@esbuild/netbsd-arm64": "0.25.1", - "@esbuild/netbsd-x64": "0.25.1", - "@esbuild/openbsd-arm64": "0.25.1", - "@esbuild/openbsd-x64": "0.25.1", - "@esbuild/sunos-x64": "0.25.1", - "@esbuild/win32-arm64": "0.25.1", - "@esbuild/win32-ia32": "0.25.1", - "@esbuild/win32-x64": "0.25.1" + "@esbuild/aix-ppc64": "0.25.2", + "@esbuild/android-arm": "0.25.2", + "@esbuild/android-arm64": "0.25.2", + "@esbuild/android-x64": "0.25.2", + "@esbuild/darwin-arm64": "0.25.2", + "@esbuild/darwin-x64": "0.25.2", + "@esbuild/freebsd-arm64": "0.25.2", + "@esbuild/freebsd-x64": "0.25.2", + "@esbuild/linux-arm": "0.25.2", + "@esbuild/linux-arm64": "0.25.2", + "@esbuild/linux-ia32": "0.25.2", + "@esbuild/linux-loong64": "0.25.2", + "@esbuild/linux-mips64el": "0.25.2", + "@esbuild/linux-ppc64": "0.25.2", + "@esbuild/linux-riscv64": "0.25.2", + "@esbuild/linux-s390x": "0.25.2", + "@esbuild/linux-x64": "0.25.2", + "@esbuild/netbsd-arm64": "0.25.2", + "@esbuild/netbsd-x64": "0.25.2", + "@esbuild/openbsd-arm64": "0.25.2", + "@esbuild/openbsd-x64": "0.25.2", + "@esbuild/sunos-x64": "0.25.2", + "@esbuild/win32-arm64": "0.25.2", + "@esbuild/win32-ia32": "0.25.2", + "@esbuild/win32-x64": "0.25.2" } }, "node_modules/escalade": { @@ -4979,32 +4980,33 @@ } }, "node_modules/eslint": { - "version": "9.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.13.0.tgz", - "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.23.0.tgz", + "integrity": "sha512-jV7AbNoFPAY1EkFYpLq5bslU9NLNO8xnEeQXwErNibVryjk67wHVmddTBilc5srIttJDBrB0eMHKZBFbSIABCw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.11.0", - "@eslint/config-array": "^0.18.0", - "@eslint/core": "^0.7.0", - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.13.0", - "@eslint/plugin-kit": "^0.2.0", - "@humanfs/node": "^0.16.5", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.2", + "@eslint/config-helpers": "^0.2.0", + "@eslint/core": "^0.12.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.23.0", + "@eslint/plugin-kit": "^0.2.7", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.3.1", + "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.1.0", - "eslint-visitor-keys": "^4.1.0", - "espree": "^10.2.0", + "eslint-scope": "^8.3.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -5018,8 +5020,7 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" @@ -5384,9 +5385,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", - "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", + "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -5413,6 +5414,20 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/@humanwhocodes/retry": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", + "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -5538,9 +5553,9 @@ } }, "node_modules/expect-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz", - "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz", + "integrity": "sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -5736,17 +5751,19 @@ } }, "node_modules/framer-motion": { - "version": "11.11.11", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.11.11.tgz", - "integrity": "sha512-tuDH23ptJAKUHGydJQII9PhABNJBpB+z0P1bmgKK9QFIssHGlfPd6kxMq00LSKwE27WFsb2z0ovY0bpUyMvfRw==", + "version": "11.18.2", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.18.2.tgz", + "integrity": "sha512-5F5Och7wrvtLVElIpclDT0CBzMVg3dL22B64aZwHtsIY8RB4mXICLrkajK4G9R+ieSAGcgrLeae2SeUTg2pr6w==", "license": "MIT", "dependencies": { + "motion-dom": "^11.18.1", + "motion-utils": "^11.18.1", "tslib": "^2.4.0" }, "peerDependencies": { "@emotion/is-prop-valid": "*", - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/is-prop-valid": { @@ -5815,9 +5832,9 @@ } }, "node_modules/fuse.js": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-7.0.0.tgz", - "integrity": "sha512-14F4hBIxqKvD4Zz/XjDc3y94mNZN6pRv3U13Udo0lNLCWRBUsrMv2xwcF/y/Z5sV6+FQW+/ow68cHpm4sunt8Q==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-7.1.0.tgz", + "integrity": "sha512-trLf4SzuuUxfusZADLINj+dE8clK1frKdmqiJNb1Es75fmI5oY6X2mxLVUciLLjxqw/xr72Dhy+lER6dGd02FQ==", "license": "Apache-2.0", "engines": { "node": ">=10" @@ -6186,9 +6203,9 @@ } }, "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6227,15 +6244,6 @@ "node": ">= 0.4" } }, - "node_modules/invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.0.0" - } - }, "node_modules/is-alphabetical": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", @@ -6752,6 +6760,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, "license": "MIT" }, "node_modules/js-yaml": { @@ -6916,13 +6925,16 @@ } }, "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", "dev": true, "license": "MIT", "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/lines-and-columns": { @@ -6959,6 +6971,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -7122,6 +7135,21 @@ "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", "license": "MIT" }, + "node_modules/motion-dom": { + "version": "11.18.1", + "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-11.18.1.tgz", + "integrity": "sha512-g76KvA001z+atjfxczdRtw/RXOM3OMSdd1f4DL77qCTF/+avrRJiawSG4yDibEQ215sr9kpinSlX2pCTJ9zbhw==", + "license": "MIT", + "dependencies": { + "motion-utils": "^11.18.1" + } + }, + "node_modules/motion-utils": { + "version": "11.18.1", + "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-11.18.1.tgz", + "integrity": "sha512-49Kt+HKjtbJKLtgO/LKj9Ld+6vw9BjH5d9sc40R/kVyH8GLAXgT42M2NnuPcJNuA3s9ZfZBUcwIgpmZWGEE+hA==", + "license": "MIT" + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -7275,18 +7303,22 @@ } }, "node_modules/nuqs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nuqs/-/nuqs-2.1.1.tgz", - "integrity": "sha512-iM2H8lMmhvk9bxupUs2oRle9usRNEAqppOkTMXOxD/uK85gOKAubU7T2zmPo8fnYQS4n5e/XswTiq+gLYGpy3w==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/nuqs/-/nuqs-2.4.1.tgz", + "integrity": "sha512-u6sngTspqDe3jWHtcmqHQg3dl35niizCZAsm5gy7PBlgG2rwl71Dp2QUv5hwBaWKI9qz0wqILZY86TsRxq66SQ==", "license": "MIT", "dependencies": { "mitt": "^3.0.1" }, + "funding": { + "url": "https://github.com/sponsors/franky47" + }, "peerDependencies": { - "@remix-run/react": ">= 2", - "next": ">= 14.2.0", - "react": ">= 18.2.0", - "react-router-dom": ">= 6" + "@remix-run/react": ">=2", + "next": ">=14.2.0", + "react": ">=18.2.0 || ^19.0.0-0", + "react-router": "^6 || ^7", + "react-router-dom": "^6 || ^7" }, "peerDependenciesMeta": { "@remix-run/react": { @@ -7295,6 +7327,9 @@ "next": { "optional": true }, + "react-router": { + "optional": true + }, "react-router-dom": { "optional": true } @@ -7756,19 +7791,6 @@ } } }, - "node_modules/postcss-load-config/node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, "node_modules/postcss-nested": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", @@ -7826,9 +7848,10 @@ } }, "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "dev": true, "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" @@ -7857,9 +7880,9 @@ } }, "node_modules/prettier-plugin-tailwindcss": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.8.tgz", - "integrity": "sha512-dGu3kdm7SXPkiW4nzeWKCl3uoImdd5CTZEJGxyypEPL37Wj0HT2pLqjrvSei1nTeuQfO4PUfjeW5cTUNRLZ4sA==", + "version": "0.6.11", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.11.tgz", + "integrity": "sha512-YxaYSIvZPAqhrrEpRtonnrXdghZg1irNg4qrjboCXrpybLWVs55cW2N3juhspVJiO0JBvYJT8SYsJpc8OQSnsA==", "dev": true, "license": "MIT", "engines": { @@ -7870,7 +7893,7 @@ "@prettier/plugin-pug": "*", "@shopify/prettier-plugin-liquid": "*", "@trivago/prettier-plugin-sort-imports": "*", - "@zackad/prettier-plugin-twig-melody": "*", + "@zackad/prettier-plugin-twig": "*", "prettier": "^3.0", "prettier-plugin-astro": "*", "prettier-plugin-css-order": "*", @@ -7897,7 +7920,7 @@ "@trivago/prettier-plugin-sort-imports": { "optional": true }, - "@zackad/prettier-plugin-twig-melody": { + "@zackad/prettier-plugin-twig": { "optional": true }, "prettier-plugin-astro": { @@ -7981,9 +8004,9 @@ "license": "MIT" }, "node_modules/prismjs": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", - "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", + "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==", "license": "MIT", "engines": { "node": ">=6" @@ -8046,9 +8069,9 @@ "license": "MIT" }, "node_modules/react": { - "version": "19.0.0-rc-02c0e824-20241028", - "resolved": "https://registry.npmjs.org/react/-/react-19.0.0-rc-02c0e824-20241028.tgz", - "integrity": "sha512-GbZ7hpPHQMiEu53BqEaPQVM/4GG4hARo+mqEEnx4rYporDvNvUjutiAFxYFSbu6sgHwcr7LeFv8htEOwALVA2A==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -8137,21 +8160,21 @@ } }, "node_modules/react-dom": { - "version": "19.0.0-rc-02c0e824-20241028", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0-rc-02c0e824-20241028.tgz", - "integrity": "sha512-LrZf3DfHL6Fs07wwlUCHrzFTCMM19yA99MvJpfLokN4I2nBAZvREGZjZAn8VPiSfN72+i9j1eL4wB8gC695F3Q==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", + "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", "license": "MIT", "dependencies": { - "scheduler": "0.25.0-rc-02c0e824-20241028" + "scheduler": "^0.25.0" }, "peerDependencies": { - "react": "19.0.0-rc-02c0e824-20241028" + "react": "^19.0.0" } }, "node_modules/react-icons": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.3.0.tgz", - "integrity": "sha512-DnUk8aFbTyQPSkCfF8dbX6kQjXA9DktMeJqfjrg6cK9vwQVMxmcA3BfP4QoiztVmEHtwlTgLFsPuH2NskKT6eg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.5.0.tgz", + "integrity": "sha512-MEFcXdkP3dLo8uumGI5xN3lDFNsRtrjbOEKDLD7yv76v4wpnEq2Lt2qeHaQOr34I/wPN3s3+N08WkQ+CW37Xiw==", "license": "MIT", "peerDependencies": { "react": "*" @@ -8175,23 +8198,23 @@ } }, "node_modules/react-remove-scroll": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.0.tgz", - "integrity": "sha512-I2U4JVEsQenxDAKaVa3VZ/JeJZe0/2DxPWL8Tj8yLKctQJQiZM52pn/GWFpSp8dftjM3pSAHVJZscAnC/y+ySQ==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz", + "integrity": "sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==", "license": "MIT", "dependencies": { - "react-remove-scroll-bar": "^2.3.6", - "react-style-singleton": "^2.2.1", + "react-remove-scroll-bar": "^2.3.7", + "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", - "use-callback-ref": "^1.3.0", - "use-sidecar": "^1.1.2" + "use-callback-ref": "^1.3.3", + "use-sidecar": "^1.1.3" }, "engines": { "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -8200,20 +8223,20 @@ } }, "node_modules/react-remove-scroll-bar": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.6.tgz", - "integrity": "sha512-DtSYaao4mBmX+HDo5YWYdBWQwYIQQshUV/dVxFxK+KM26Wjwp1gZ6rv6OC3oujI6Bfu6Xyg3TwK533AQutsn/g==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz", + "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==", "license": "MIT", "dependencies": { - "react-style-singleton": "^2.2.1", + "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "engines": { "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -8235,21 +8258,20 @@ } }, "node_modules/react-style-singleton": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz", - "integrity": "sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.3.tgz", + "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==", "license": "MIT", "dependencies": { "get-nonce": "^1.0.0", - "invariant": "^2.2.4", "tslib": "^2.0.0" }, "engines": { "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -8418,13 +8440,13 @@ } }, "node_modules/rollup": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.35.0.tgz", - "integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==", + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.38.0.tgz", + "integrity": "sha512-5SsIRtJy9bf1ErAOiFMFzl64Ex9X5V7bnJ+WlFMb+zmP459OSWCEG7b0ERZ+PEU7xPt4OG3RHbrp1LJlXxYTrw==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.6" + "@types/estree": "1.0.7" }, "bin": { "rollup": "dist/bin/rollup" @@ -8434,25 +8456,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.35.0", - "@rollup/rollup-android-arm64": "4.35.0", - "@rollup/rollup-darwin-arm64": "4.35.0", - "@rollup/rollup-darwin-x64": "4.35.0", - "@rollup/rollup-freebsd-arm64": "4.35.0", - "@rollup/rollup-freebsd-x64": "4.35.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.35.0", - "@rollup/rollup-linux-arm-musleabihf": "4.35.0", - "@rollup/rollup-linux-arm64-gnu": "4.35.0", - "@rollup/rollup-linux-arm64-musl": "4.35.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.35.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.35.0", - "@rollup/rollup-linux-riscv64-gnu": "4.35.0", - "@rollup/rollup-linux-s390x-gnu": "4.35.0", - "@rollup/rollup-linux-x64-gnu": "4.35.0", - "@rollup/rollup-linux-x64-musl": "4.35.0", - "@rollup/rollup-win32-arm64-msvc": "4.35.0", - "@rollup/rollup-win32-ia32-msvc": "4.35.0", - "@rollup/rollup-win32-x64-msvc": "4.35.0", + "@rollup/rollup-android-arm-eabi": "4.38.0", + "@rollup/rollup-android-arm64": "4.38.0", + "@rollup/rollup-darwin-arm64": "4.38.0", + "@rollup/rollup-darwin-x64": "4.38.0", + "@rollup/rollup-freebsd-arm64": "4.38.0", + "@rollup/rollup-freebsd-x64": "4.38.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.38.0", + "@rollup/rollup-linux-arm-musleabihf": "4.38.0", + "@rollup/rollup-linux-arm64-gnu": "4.38.0", + "@rollup/rollup-linux-arm64-musl": "4.38.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.38.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.38.0", + "@rollup/rollup-linux-riscv64-gnu": "4.38.0", + "@rollup/rollup-linux-riscv64-musl": "4.38.0", + "@rollup/rollup-linux-s390x-gnu": "4.38.0", + "@rollup/rollup-linux-x64-gnu": "4.38.0", + "@rollup/rollup-linux-x64-musl": "4.38.0", + "@rollup/rollup-win32-arm64-msvc": "4.38.0", + "@rollup/rollup-win32-ia32-msvc": "4.38.0", + "@rollup/rollup-win32-x64-msvc": "4.38.0", "fsevents": "~2.3.2" } }, @@ -8545,9 +8568,9 @@ } }, "node_modules/scheduler": { - "version": "0.25.0-rc-02c0e824-20241028", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0-rc-02c0e824-20241028.tgz", - "integrity": "sha512-GysnKjmMSaWcwsKTLzeJO0IhU3EyIiC0ivJKE6yDNLqt3IMxDByx8b6lSNXRNdN+ULUY0WLLjSPaZ0LuU/GnTg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==", "license": "MIT" }, "node_modules/semver": { @@ -8562,12 +8585,6 @@ "node": ">=10" } }, - "node_modules/server-only": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/server-only/-/server-only-0.0.1.tgz", - "integrity": "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==", - "license": "MIT" - }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -8710,9 +8727,9 @@ } }, "node_modules/simple-icons": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-13.15.0.tgz", - "integrity": "sha512-8SzFj9CvPlDnjDLISsAWTvpCs7om2zbSJZ1hNLRo6quWKLqFwjCD9opS24Q/yD0bdsnVHPpF0N3hitpHrY5u9w==", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-13.21.0.tgz", + "integrity": "sha512-LI5pVJPBv6oc79OMsffwb6kEqnmB8P1Cjg1crNUlhsxPETQ5UzbCKQdxU+7MW6+DD1qfPkla/vSKlLD4IfyXpQ==", "license": "CC0-1.0", "engines": { "node": ">=0.12.18" @@ -8732,13 +8749,13 @@ } }, "node_modules/sonner": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/sonner/-/sonner-1.5.0.tgz", - "integrity": "sha512-FBjhG/gnnbN6FY0jaNnqZOMmB73R+5IiyYAw8yBj7L54ER7HB3fOSE5OFiQiE2iXWxeXKvg6fIP4LtVppHEdJA==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/sonner/-/sonner-1.7.4.tgz", + "integrity": "sha512-DIS8z4PfJRbIyfVFDVnK9rO3eYDtse4Omcm6bt0oEr5/jtLgysmjuBl1frJ9E/EQZrFmKx2A8m/s5s9CRXIzhw==", "license": "MIT", "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc", + "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" } }, "node_modules/source-map-js": { @@ -8768,9 +8785,9 @@ "license": "MIT" }, "node_modules/std-env": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", - "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.1.tgz", + "integrity": "sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==", "dev": true, "license": "MIT" }, @@ -9168,9 +9185,9 @@ "license": "MIT" }, "node_modules/tailwind-merge": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.4.tgz", - "integrity": "sha512-0q8cfZHMu9nuYP/b5Shb7Y7Sh1B7Nnl5GqNr1U+n2p6+mybvRtayrQ+0042Z5byvTA8ihjlP8Odo8/VnHbZu4Q==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.0.tgz", + "integrity": "sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA==", "license": "MIT", "funding": { "type": "github", @@ -9178,34 +9195,34 @@ } }, "node_modules/tailwindcss": { - "version": "3.4.14", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.14.tgz", - "integrity": "sha512-IcSvOcTRcUtQQ7ILQL5quRDg7Xs93PdJEk1ZLbhhvJc7uj/OAhYOnruEiwnGgBvUtaUAJ8/mhSw1o8L2jCiENA==", + "version": "3.4.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", + "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", "dev": true, "license": "MIT", "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", - "chokidar": "^3.5.3", + "chokidar": "^3.6.0", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.3.0", + "fast-glob": "^3.3.2", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", - "jiti": "^1.21.0", - "lilconfig": "^2.1.0", - "micromatch": "^4.0.5", + "jiti": "^1.21.6", + "lilconfig": "^3.1.3", + "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.23", + "picocolors": "^1.1.1", + "postcss": "^8.4.47", "postcss-import": "^15.1.0", "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.1", - "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", - "resolve": "^1.22.2", - "sucrase": "^3.32.0" + "postcss-load-config": "^4.0.2", + "postcss-nested": "^6.2.0", + "postcss-selector-parser": "^6.1.2", + "resolve": "^1.22.8", + "sucrase": "^3.35.0" }, "bin": { "tailwind": "lib/cli.js", @@ -9245,13 +9262,6 @@ "node": ">=6" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -9379,16 +9389,16 @@ } }, "node_modules/ts-api-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.0.tgz", - "integrity": "sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18.12" }, "peerDependencies": { - "typescript": ">=4.2.0" + "typescript": ">=4.8.4" } }, "node_modules/ts-interface-checker": { @@ -9529,9 +9539,10 @@ } }, "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -9558,9 +9569,9 @@ } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true, "license": "MIT" }, @@ -9606,9 +9617,9 @@ } }, "node_modules/use-callback-ref": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.2.tgz", - "integrity": "sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz", + "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==", "license": "MIT", "dependencies": { "tslib": "^2.0.0" @@ -9617,8 +9628,8 @@ "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -9627,9 +9638,9 @@ } }, "node_modules/use-sidecar": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz", - "integrity": "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.3.tgz", + "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==", "license": "MIT", "dependencies": { "detect-node-es": "^1.1.0", @@ -9639,8 +9650,8 @@ "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -9648,15 +9659,6 @@ } } }, - "node_modules/use-sync-external-store": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz", - "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==", - "license": "MIT", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -9737,9 +9739,9 @@ } }, "node_modules/vite-node": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.0.8.tgz", - "integrity": "sha512-6PhR4H9VGlcwXZ+KWCdMqbtG649xCPZqfI9j2PsK1FcXgEzro5bGHcVKFCTqPLaNKZES8Evqv4LwvZARsq5qlg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.1.1.tgz", + "integrity": "sha512-V+IxPAE2FvXpTCHXyNem0M+gWm6J7eRyWPR6vYoG/Gl+IscNOjXzztUhimQgTxaAoUoj40Qqimaa0NLIOOAH4w==", "dev": true, "license": "MIT", "dependencies": { @@ -9760,9 +9762,9 @@ } }, "node_modules/vite-tsconfig-paths": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-5.1.3.tgz", - "integrity": "sha512-0bz+PDlLpGfP2CigeSKL9NFTF1KtXkeHGZSSaGQSuPZH77GhoiQaA8IjYgOaynSuwlDTolSUEU0ErVvju3NURg==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-5.1.4.tgz", + "integrity": "sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==", "dev": true, "license": "MIT", "dependencies": { @@ -9780,31 +9782,31 @@ } }, "node_modules/vitest": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.0.8.tgz", - "integrity": "sha512-dfqAsNqRGUc8hB9OVR2P0w8PZPEckti2+5rdZip0WIz9WW0MnImJ8XiR61QhqLa92EQzKP2uPkzenKOAHyEIbA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.1.1.tgz", + "integrity": "sha512-kiZc/IYmKICeBAZr9DQ5rT7/6bD9G7uqQEki4fxazi1jdVl2mWGzedtBs5s6llz59yQhVb7FFY2MbHzHCnT79Q==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "3.0.8", - "@vitest/mocker": "3.0.8", - "@vitest/pretty-format": "^3.0.8", - "@vitest/runner": "3.0.8", - "@vitest/snapshot": "3.0.8", - "@vitest/spy": "3.0.8", - "@vitest/utils": "3.0.8", + "@vitest/expect": "3.1.1", + "@vitest/mocker": "3.1.1", + "@vitest/pretty-format": "^3.1.1", + "@vitest/runner": "3.1.1", + "@vitest/snapshot": "3.1.1", + "@vitest/spy": "3.1.1", + "@vitest/utils": "3.1.1", "chai": "^5.2.0", "debug": "^4.4.0", - "expect-type": "^1.1.0", + "expect-type": "^1.2.0", "magic-string": "^0.30.17", "pathe": "^2.0.3", - "std-env": "^3.8.0", + "std-env": "^3.8.1", "tinybench": "^2.9.0", "tinyexec": "^0.3.2", "tinypool": "^1.0.2", "tinyrainbow": "^2.0.0", "vite": "^5.0.0 || ^6.0.0", - "vite-node": "3.0.8", + "vite-node": "3.1.1", "why-is-node-running": "^2.3.0" }, "bin": { @@ -9820,8 +9822,8 @@ "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.0.8", - "@vitest/ui": "3.0.8", + "@vitest/browser": "3.1.1", + "@vitest/ui": "3.1.1", "happy-dom": "*", "jsdom": "*" }, @@ -10212,9 +10214,9 @@ } }, "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "version": "3.24.2", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz", + "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" From d560d78a99eca74e4f4171d792f3e637221a989c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:51:30 +0200 Subject: [PATCH 0406/1614] Update package.json --- frontend/package.json | 81 ++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 78256a4..50379a3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -20,70 +20,71 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@radix-ui/react-accordion": "^1.1.2", - "@radix-ui/react-dialog": "^1.0.5", - "@radix-ui/react-dropdown-menu": "^2.0.6", - "@radix-ui/react-icons": "^1.3.1", - "@radix-ui/react-label": "^2.1.0", - "@radix-ui/react-navigation-menu": "^1.1.4", - "@radix-ui/react-popover": "^1.1.2", - "@radix-ui/react-select": "^2.1.2", - "@radix-ui/react-separator": "^1.1.0", - "@radix-ui/react-slot": "^1.1.0", - "@radix-ui/react-switch": "^1.1.1", - "@radix-ui/react-tabs": "^1.1.0", - "@radix-ui/react-tooltip": "^1.1.2", - "@vercel/analytics": "^1.2.2", - "chart.js": "^4.4.1", + "@radix-ui/react-accordion": "^1.2.3", + "@radix-ui/react-dialog": "^1.1.6", + "@radix-ui/react-dropdown-menu": "^2.1.6", + "@radix-ui/react-icons": "^1.3.2", + "@radix-ui/react-label": "^2.1.2", + "@radix-ui/react-navigation-menu": "^1.2.5", + "@radix-ui/react-popover": "^1.1.6", + "@radix-ui/react-select": "^2.1.6", + "@radix-ui/react-separator": "^1.1.2", + "@radix-ui/react-slot": "^1.1.2", + "@radix-ui/react-switch": "^1.1.3", + "@radix-ui/react-tabs": "^1.1.3", + "@radix-ui/react-tooltip": "^1.1.8", + "@tanstack/react-query": "^5.71.1", + "chart.js": "^4.4.8", "chartjs-plugin-datalabels": "^2.2.0", - "class-variance-authority": "^0.7.0", + "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", - "cmdk": "^1.0.0", + "cmdk": "^1.1.1", "date-fns": "^4.1.0", - "framer-motion": "^11.11.11", - "fuse.js": "^7.0.0", + "framer-motion": "^11.18.2", + "fuse.js": "^7.1.0", "lucide-react": "^0.453.0", "mini-svg-data-uri": "^1.4.4", "next": "15.2.4", "next-themes": "^0.3.0", - "nuqs": "^2.1.1", - "pocketbase": "^0.21.4", + "nuqs": "^2.4.1", + "pocketbase": "^0.21.5", "prettier-plugin-organize-imports": "^4.1.0", - "react": "19.0.0-rc-02c0e824-20241028", + "react": "19.0.0", "react-chartjs-2": "^5.3.0", "react-code-blocks": "^0.1.6", "react-datepicker": "^7.6.0", "react-day-picker": "8.10.1", - "react-dom": "19.0.0-rc-02c0e824-20241028", - "react-icons": "^5.1.0", + "react-dom": "19.0.0", + "react-icons": "^5.5.0", "react-simple-typewriter": "^5.0.1", "sharp": "^0.33.5", - "simple-icons": "^13.5.0", - "sonner": "^1.5.0", - "tailwind-merge": "^2.3.0", - "zod": "^3.23.8" + "simple-icons": "^13.21.0", + "sonner": "^1.7.4", + "tailwind-merge": "^2.6.0", + "zod": "^3.24.2" }, "devDependencies": { + "@tanstack/eslint-plugin-query": "^5.68.0", "@testing-library/dom": "^10.4.0", - "@testing-library/react": "^16.0.1", - "@types/node": "^22", + "@testing-library/react": "^16.2.0", + "@types/node": "^22.13.16", "@types/react": "npm:types-react@19.0.0-rc.1", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1", - "@typescript-eslint/eslint-plugin": "^8.8.1", - "@typescript-eslint/parser": "^8.8.1", + "@typescript-eslint/eslint-plugin": "^8.29.0", + "@typescript-eslint/parser": "^8.29.0", "@vitejs/plugin-react": "^4.3.4", - "eslint": "^9.13.0", + "eslint": "^9.23.0", "eslint-config-next": "15.0.2", "jsdom": "^25.0.1", - "postcss": "^8", - "prettier": "^3.2.5", - "prettier-plugin-tailwindcss": "^0.6.5", - "tailwindcss": "^3.4.9", + "postcss": "^8.5.3", + "prettier": "^3.5.3", + "prettier-plugin-tailwindcss": "^0.6.11", + "tailwindcss": "^3.4.17", "tailwindcss-animate": "^1.0.7", "tailwindcss-animated": "^1.1.2", - "typescript": "^5", - "vite-tsconfig-paths": "^5.1.3", - "vitest": "^3.0.8" + "typescript": "^5.8.2", + "vite-tsconfig-paths": "^5.1.4", + "vitest": "^3.1.1" }, "overrides": { "@types/react": "npm:types-react@19.0.0-rc.1", From da47edf43c47a7176896892e14bae2126034830e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:55:34 +0200 Subject: [PATCH 0407/1614] test --- frontend/package-lock.json | 6 ++---- frontend/src/app/scripts/_components/ScriptAccordion.tsx | 6 +++--- frontend/src/app/scripts/_components/Sidebar.tsx | 6 ++---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index cedcbd1..085f7e5 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -3255,7 +3255,7 @@ "version": "19.0.0-rc.1", "resolved": "https://registry.npmjs.org/types-react/-/types-react-19.0.0-rc.1.tgz", "integrity": "sha512-RshndUfqTW6K3STLPis8BtAYCGOkMbtvYsi90gmVNDZBXUyUc5juf2PE9LfS/JmOlUIRO8cWTS/1MTnmhjDqyQ==", - "dev": true, + "devOptional": true, "dependencies": { "csstype": "^3.0.2" } @@ -3265,7 +3265,7 @@ "version": "19.0.0-rc.1", "resolved": "https://registry.npmjs.org/types-react-dom/-/types-react-dom-19.0.0-rc.1.tgz", "integrity": "sha512-VSLZJl8VXCD0fAWp7DUTFUDCcZ8DVXOQmjhJMD03odgeFmu14ZQJHCXeETm3BEAhJqfgJaFkLnGkQv88sRx0fQ==", - "dev": true, + "devOptional": true, "dependencies": { "@types/react": "*" } @@ -7851,7 +7851,6 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", - "dev": true, "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" @@ -9542,7 +9541,6 @@ "version": "5.8.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", - "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", diff --git a/frontend/src/app/scripts/_components/ScriptAccordion.tsx b/frontend/src/app/scripts/_components/ScriptAccordion.tsx index a25a756..2361687 100644 --- a/frontend/src/app/scripts/_components/ScriptAccordion.tsx +++ b/frontend/src/app/scripts/_components/ScriptAccordion.tsx @@ -46,17 +46,17 @@ export default function ScriptAccordion({ ); if (category) { setExpandedItem(category.name); + handleSelected(selectedScript); } } - }, [selectedScript, items]); - + }, [selectedScript, items, handleSelected]); return ( {items.map((category) => ( category.scripts.length > 0); - return (
@@ -33,7 +31,7 @@ const Sidebar = ({
@@ -42,4 +40,4 @@ const Sidebar = ({ ); }; -export default Sidebar; +export default Sidebar; \ No newline at end of file From 7818dd0300bef46d22f1c668e63246160eabf9d1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:59:05 +0200 Subject: [PATCH 0408/1614] push --- frontend/src/components/Footer.tsx | 4 ++-- frontend/src/config/siteConfig.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx index 6aa404b..d776c81 100644 --- a/frontend/src/components/Footer.tsx +++ b/frontend/src/components/Footer.tsx @@ -6,13 +6,13 @@ import { cn } from "@/lib/utils"; export default function Footer() { return ( -
+

Website built by the community. The source code is available on{" "} Date: Wed, 9 Apr 2025 14:59:38 +0200 Subject: [PATCH 0409/1614] fixes --- frontend/src/lib/data.ts | 10 +++++----- frontend/src/lib/types.ts | 15 +++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/frontend/src/lib/data.ts b/frontend/src/lib/data.ts index 8546209..526cc62 100644 --- a/frontend/src/lib/data.ts +++ b/frontend/src/lib/data.ts @@ -10,9 +10,9 @@ export const fetchCategories = async () => { }; export const fetchVersions = async () => { - const response = await fetch(`api/versions`); - if (!response.ok) { - throw new Error(`Failed to fetch versions: ${response.statusText}`); - } - return response.json(); + const response = await fetch(`api/versions`); + if (!response.ok) { + throw new Error(`Failed to fetch versions: ${response.statusText}`); + } + return response.json(); }; diff --git a/frontend/src/lib/types.ts b/frontend/src/lib/types.ts index fb1fd60..b6aa20b 100644 --- a/frontend/src/lib/types.ts +++ b/frontend/src/lib/types.ts @@ -5,7 +5,7 @@ export type Script = { slug: string; categories: number[]; date_created: string; - type: "vm" | "ct" | "misc"; + type: "vm" | "ct" | "pve" | "addon"; updateable: boolean; privileged: boolean; interface_port: number | null; @@ -13,7 +13,6 @@ export type Script = { website: string | null; logo: string | null; description: string; - version: string; install_methods: { type: "default" | "alpine"; script: string; @@ -48,12 +47,6 @@ export type Metadata = { categories: Category[]; }; -export interface AppVersion { - name: string; - version: string; - date: Date; -} - export interface Version { name: string; slug: string; @@ -63,3 +56,9 @@ export interface OperatingSystem { name: string; versions: Version[]; } + +export interface AppVersion { + name: string; + version: string; + date: Date; +} From b0465a2d9aea434babc693d30eb7a0b3c0e4f2d7 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 15:00:23 +0200 Subject: [PATCH 0410/1614] Update package-lock.json --- frontend/package-lock.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 085f7e5..cedcbd1 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -3255,7 +3255,7 @@ "version": "19.0.0-rc.1", "resolved": "https://registry.npmjs.org/types-react/-/types-react-19.0.0-rc.1.tgz", "integrity": "sha512-RshndUfqTW6K3STLPis8BtAYCGOkMbtvYsi90gmVNDZBXUyUc5juf2PE9LfS/JmOlUIRO8cWTS/1MTnmhjDqyQ==", - "devOptional": true, + "dev": true, "dependencies": { "csstype": "^3.0.2" } @@ -3265,7 +3265,7 @@ "version": "19.0.0-rc.1", "resolved": "https://registry.npmjs.org/types-react-dom/-/types-react-dom-19.0.0-rc.1.tgz", "integrity": "sha512-VSLZJl8VXCD0fAWp7DUTFUDCcZ8DVXOQmjhJMD03odgeFmu14ZQJHCXeETm3BEAhJqfgJaFkLnGkQv88sRx0fQ==", - "devOptional": true, + "dev": true, "dependencies": { "@types/react": "*" } @@ -7851,6 +7851,7 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "dev": true, "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" @@ -9541,6 +9542,7 @@ "version": "5.8.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", From 00da0805c6e375720275973225c79a92a5f3a18e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 15:04:49 +0200 Subject: [PATCH 0411/1614] fix broken layout.tsx --- frontend/package-lock.json | 6 ++---- frontend/src/app/layout.tsx | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index cedcbd1..085f7e5 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -3255,7 +3255,7 @@ "version": "19.0.0-rc.1", "resolved": "https://registry.npmjs.org/types-react/-/types-react-19.0.0-rc.1.tgz", "integrity": "sha512-RshndUfqTW6K3STLPis8BtAYCGOkMbtvYsi90gmVNDZBXUyUc5juf2PE9LfS/JmOlUIRO8cWTS/1MTnmhjDqyQ==", - "dev": true, + "devOptional": true, "dependencies": { "csstype": "^3.0.2" } @@ -3265,7 +3265,7 @@ "version": "19.0.0-rc.1", "resolved": "https://registry.npmjs.org/types-react-dom/-/types-react-dom-19.0.0-rc.1.tgz", "integrity": "sha512-VSLZJl8VXCD0fAWp7DUTFUDCcZ8DVXOQmjhJMD03odgeFmu14ZQJHCXeETm3BEAhJqfgJaFkLnGkQv88sRx0fQ==", - "dev": true, + "devOptional": true, "dependencies": { "@types/react": "*" } @@ -7851,7 +7851,6 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", - "dev": true, "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" @@ -9542,7 +9541,6 @@ "version": "5.8.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", - "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index a020877..56f2ada 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -1,5 +1,6 @@ import Footer from "@/components/Footer"; import Navbar from "@/components/Navbar"; +import QueryProvider from "@/components/query-provider"; // HINZUGEFÜGT import { ThemeProvider } from "@/components/theme-provider"; import { Toaster } from "@/components/ui/sonner"; import { analytics, basePath } from "@/config/siteConfig"; @@ -81,7 +82,9 @@ export default function RootLayout({

- {children} + {/* HINZUGEFÜGT */} + {children} + {/* HINZUGEFÜGT */}
From f9ccc2c5dbf5861454f22eed0f63bf3f417692da Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 9 Apr 2025 15:05:23 +0200 Subject: [PATCH 0412/1614] Update layout.tsx --- frontend/src/app/layout.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index 56f2ada..789f773 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -82,9 +82,9 @@ export default function RootLayout({
- {/* HINZUGEFÜGT */} + {children} - {/* HINZUGEFÜGT */} +
From fc5eb86b52b7c8e3e2e81bddfbb54dc7d065898d Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 10 Apr 2025 00:09:07 +0200 Subject: [PATCH 0413/1614] Bump PVE version to 8.4 --- tools/addon/add-iptag.sh | 174 +++++++++++++++++++-------------------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/tools/addon/add-iptag.sh b/tools/addon/add-iptag.sh index 55f23d2..1a394c6 100644 --- a/tools/addon/add-iptag.sh +++ b/tools/addon/add-iptag.sh @@ -8,12 +8,12 @@ function header_info { clear cat <<"EOF" - ___ ____ _____ -|_ _| _ \ _ |_ _|_ _ __ _ - | || |_) (_) | |/ _` |/ _` | - | || __/ _ | | (_| | (_| | -|___|_| (_) |_|\__,_|\__, | - |___/ + ___ ____ _____ +|_ _| _ \ _ |_ _|_ _ __ _ + | || |_) (_) | |/ _` |/ _` | + | || __/ _ | | (_| | (_| | +|___|_| (_) |_|\__,_|\__, | + |___/ EOF } @@ -40,7 +40,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() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null fi printf "\e[?25h" @@ -77,7 +77,7 @@ msg_info() { # This function displays a success message with a green color. msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null fi printf "\e[?25h" @@ -87,7 +87,7 @@ msg_ok() { # This function displays a error message with a red color. msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null fi printf "\e[?25h" @@ -108,7 +108,7 @@ check_service_exists() { migrate_config() { local old_config="/opt/lxc-iptag" local new_config="/opt/iptag/iptag.conf" - + if [[ -f "$old_config" ]]; then msg_info "Migrating configuration from old path" if cp "$old_config" "$new_config" &>/dev/null; then @@ -124,15 +124,15 @@ migrate_config() { update_installation() { msg_info "Updating IP-Tag Scripts" systemctl stop iptag.service &>/dev/null - + # Create directory if it doesn't exist if [[ ! -d "/opt/iptag" ]]; then mkdir -p /opt/iptag fi - + # Migrate config if needed migrate_config - + # Update main script cat <<'EOF' >/opt/iptag/iptag #!/bin/bash @@ -157,19 +157,19 @@ ip_to_int() { ip_in_cidr() { local ip="$1" local cidr="$2" - + # Use ipcalc with the -c option (check), which returns 0 if the IP is in the network if ipcalc -c "$ip" "$cidr" >/dev/null 2>&1; then # Get network address and mask from CIDR local network prefix network=$(echo "$cidr" | cut -d/ -f1) prefix=$(echo "$cidr" | cut -d/ -f2) - + # Check if IP is in the network local ip_a ip_b ip_c ip_d net_a net_b net_c net_d IFS=. read -r ip_a ip_b ip_c ip_d <<< "$ip" IFS=. read -r net_a net_b net_c net_d <<< "$network" - + # Check octets match based on prefix length local result=0 if (( prefix >= 8 )); then @@ -181,10 +181,10 @@ ip_in_cidr() { if (( prefix >= 24 )); then [[ "$ip_c" != "$net_c" ]] && result=1 fi - + return $result fi - + return 1 } @@ -192,7 +192,7 @@ ip_in_cidr() { format_ip_tag() { local ip="$1" local format="${TAG_FORMAT:-full}" - + case "$format" in "last_octet") echo "${ip##*.}" @@ -210,10 +210,10 @@ format_ip_tag() { ip_in_cidrs() { local ip="$1" local cidrs="$2" - + # Check that cidrs is not empty [[ -z "$cidrs" ]] && return 1 - + local IFS=' ' for cidr in $cidrs; do ip_in_cidr "$ip" "$cidr" && return 0 @@ -267,14 +267,14 @@ fw_net_interface_changed() { get_vm_ips() { local vmid=$1 local ips="" - + # Check if VM is running qm status "$vmid" 2>/dev/null | grep -q "status: running" || return - + # Get MAC addresses from VM configuration local macs macs=$(qm config "$vmid" 2>/dev/null | grep -E 'net[0-9]+' | grep -o -E '[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}') - + # Look up IPs from ARP table using MAC addresses for mac in $macs; do local ip @@ -283,7 +283,7 @@ get_vm_ips() { ips+="$ip " fi done - + echo "$ips" } @@ -293,7 +293,7 @@ update_tags() { local vmid="$2" local config_cmd="pct" [[ "$type" == "vm" ]] && config_cmd="qm" - + # Get current IPs local current_ips_full if [[ "$type" == "lxc" ]]; then @@ -302,23 +302,23 @@ update_tags() { else current_ips_full=$(get_vm_ips "${vmid}") fi - + # Parse current tags and get valid IPs local current_tags=() local next_tags=() mapfile -t current_tags < <($config_cmd config "${vmid}" 2>/dev/null | grep tags | awk '{print $2}' | sed 's/;/\n/g') - + for tag in "${current_tags[@]}"; do # Skip tag if it looks like an IP (full or partial) if ! is_valid_ipv4 "${tag}" && ! [[ "$tag" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then next_tags+=("${tag}") fi done - + # Add valid IPs to tags local added_ips=() local skipped_ips=() - + for ip in ${current_ips_full}; do if is_valid_ipv4 "${ip}"; then if ip_in_cidrs "${ip}" "${CIDR_LIST[*]}"; then @@ -330,12 +330,12 @@ update_tags() { fi fi done - + # Log only if there are changes if [ ${#added_ips[@]} -gt 0 ]; then echo "${type^} ${vmid}: added IP tags: ${added_ips[*]}" fi - + # Update if changed if [[ "$(IFS=';'; echo "${current_tags[*]}")" != "$(IFS=';'; echo "${next_tags[*]}")" ]]; then $config_cmd set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" &>/dev/null @@ -346,7 +346,7 @@ update_tags() { check_status_changed() { local type="$1" local current_status - + case "$type" in "lxc") current_status=$(pct list 2>/dev/null | grep -v VMID) @@ -371,7 +371,7 @@ check_status_changed() { update_all_tags() { local type="$1" local vmid_list="" - + if [[ "$type" == "lxc" ]]; then # Redirect stderr to /dev/null to suppress AppArmor messages vmid_list=$(pct list 2>/dev/null | grep -v VMID | awk '{print $1}') @@ -380,7 +380,7 @@ update_all_tags() { vmid_list=$(qm list 2>/dev/null | grep -v VMID | awk '{print $1}') echo "Found $(echo "$vmid_list" | wc -w) virtual machines" fi - + for vmid in $vmid_list; do update_tags "$type" "$vmid" done @@ -388,7 +388,7 @@ update_all_tags() { check() { current_time=$(date +%s) - + # Check LXC status time_since_last_lxc_status_check=$((current_time - last_lxc_status_check_time)) if [[ "${LXC_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ @@ -400,7 +400,7 @@ check() { last_update_lxc_time=${current_time} fi fi - + # Check VM status time_since_last_vm_status_check=$((current_time - last_vm_status_check_time)) if [[ "${VM_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ @@ -412,7 +412,7 @@ check() { last_update_vm_time=${current_time} fi fi - + # Check network interface changes time_since_last_fw_net_interface_check=$((current_time - last_fw_net_interface_check_time)) if [[ "${FW_NET_INTERFACE_CHECK_INTERVAL}" -gt 0 ]] \ @@ -426,7 +426,7 @@ check() { last_update_vm_time=${current_time} fi fi - + # Force update if needed for type in "lxc" "vm"; do local last_update_var="last_update_${type}_time" @@ -457,7 +457,7 @@ main() { main EOF chmod +x /opt/iptag/iptag - + # Update service file cat </lib/systemd/system/iptag.service [Unit] @@ -472,7 +472,7 @@ Restart=always [Install] WantedBy=multi-user.target EOF - + systemctl daemon-reload &>/dev/null systemctl enable -q --now iptag.service &>/dev/null msg_ok "Updated IP-Tag Scripts" @@ -483,17 +483,17 @@ if check_service_exists; then while true; do read -p "IP-Tag service is already installed. Do you want to update it? (y/n): " yn case $yn in - [Yy]*) - update_installation - exit 0 - ;; - [Nn]*) - msg_error "Installation cancelled." - exit 0 - ;; - *) - msg_error "Please answer yes or no." - ;; + [Yy]*) + update_installation + exit 0 + ;; + [Nn]*) + msg_error "Installation cancelled." + exit 0 + ;; + *) + msg_error "Please answer yes or no." + ;; esac done fi @@ -501,20 +501,20 @@ fi while true; do read -p "This will install ${APP} on ${hostname}. Proceed? (y/n): " yn case $yn in - [Yy]*) - break - ;; - [Nn]*) - msg_error "Installation cancelled." - exit - ;; - *) - msg_error "Please answer yes or no." - ;; + [Yy]*) + break + ;; + [Nn]*) + msg_error "Installation cancelled." + exit + ;; + *) + msg_error "Please answer yes or no." + ;; esac done -if ! pveversion | grep -Eq "pve-manager/8\.[0-3](\.[0-9]+)*"; then +if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "⚠️ Requires Proxmox Virtual Environment Version 8.0 or later." msg_error "Exiting..." @@ -596,19 +596,19 @@ ip_to_int() { ip_in_cidr() { local ip="$1" local cidr="$2" - + # Use ipcalc with the -c option (check), which returns 0 if the IP is in the network if ipcalc -c "$ip" "$cidr" >/dev/null 2>&1; then # Get network address and mask from CIDR local network prefix network=$(echo "$cidr" | cut -d/ -f1) prefix=$(echo "$cidr" | cut -d/ -f2) - + # Check if IP is in the network local ip_a ip_b ip_c ip_d net_a net_b net_c net_d IFS=. read -r ip_a ip_b ip_c ip_d <<< "$ip" IFS=. read -r net_a net_b net_c net_d <<< "$network" - + # Check octets match based on prefix length local result=0 if (( prefix >= 8 )); then @@ -620,10 +620,10 @@ ip_in_cidr() { if (( prefix >= 24 )); then [[ "$ip_c" != "$net_c" ]] && result=1 fi - + return $result fi - + return 1 } @@ -631,7 +631,7 @@ ip_in_cidr() { format_ip_tag() { local ip="$1" local format="${TAG_FORMAT:-full}" - + case "$format" in "last_octet") echo "${ip##*.}" @@ -649,10 +649,10 @@ format_ip_tag() { ip_in_cidrs() { local ip="$1" local cidrs="$2" - + # Check that cidrs is not empty [[ -z "$cidrs" ]] && return 1 - + local IFS=' ' for cidr in $cidrs; do ip_in_cidr "$ip" "$cidr" && return 0 @@ -706,14 +706,14 @@ fw_net_interface_changed() { get_vm_ips() { local vmid=$1 local ips="" - + # Check if VM is running qm status "$vmid" 2>/dev/null | grep -q "status: running" || return - + # Get MAC addresses from VM configuration local macs macs=$(qm config "$vmid" 2>/dev/null | grep -E 'net[0-9]+' | grep -o -E '[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}') - + # Look up IPs from ARP table using MAC addresses for mac in $macs; do local ip @@ -722,7 +722,7 @@ get_vm_ips() { ips+="$ip " fi done - + echo "$ips" } @@ -732,7 +732,7 @@ update_tags() { local vmid="$2" local config_cmd="pct" [[ "$type" == "vm" ]] && config_cmd="qm" - + # Get current IPs local current_ips_full if [[ "$type" == "lxc" ]]; then @@ -741,23 +741,23 @@ update_tags() { else current_ips_full=$(get_vm_ips "${vmid}") fi - + # Parse current tags and get valid IPs local current_tags=() local next_tags=() mapfile -t current_tags < <($config_cmd config "${vmid}" 2>/dev/null | grep tags | awk '{print $2}' | sed 's/;/\n/g') - + for tag in "${current_tags[@]}"; do # Skip tag if it looks like an IP (full or partial) if ! is_valid_ipv4 "${tag}" && ! [[ "$tag" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then next_tags+=("${tag}") fi done - + # Add valid IPs to tags local added_ips=() local skipped_ips=() - + for ip in ${current_ips_full}; do if is_valid_ipv4 "${ip}"; then if ip_in_cidrs "${ip}" "${CIDR_LIST[*]}"; then @@ -769,12 +769,12 @@ update_tags() { fi fi done - + # Log only if there are changes if [ ${#added_ips[@]} -gt 0 ]; then echo "${type^} ${vmid}: added IP tags: ${added_ips[*]}" fi - + # Update if changed if [[ "$(IFS=';'; echo "${current_tags[*]}")" != "$(IFS=';'; echo "${next_tags[*]}")" ]]; then $config_cmd set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" &>/dev/null @@ -785,7 +785,7 @@ update_tags() { check_status_changed() { local type="$1" local current_status - + case "$type" in "lxc") current_status=$(pct list 2>/dev/null | grep -v VMID) @@ -808,7 +808,7 @@ check_status_changed() { check() { current_time=$(date +%s) - + # Check LXC status time_since_last_lxc_status_check=$((current_time - last_lxc_status_check_time)) if [[ "${LXC_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ @@ -820,7 +820,7 @@ check() { last_update_lxc_time=${current_time} fi fi - + # Check VM status time_since_last_vm_status_check=$((current_time - last_vm_status_check_time)) if [[ "${VM_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ @@ -832,7 +832,7 @@ check() { last_update_vm_time=${current_time} fi fi - + # Check network interface changes time_since_last_fw_net_interface_check=$((current_time - last_fw_net_interface_check_time)) if [[ "${FW_NET_INTERFACE_CHECK_INTERVAL}" -gt 0 ]] \ @@ -846,7 +846,7 @@ check() { last_update_vm_time=${current_time} fi fi - + # Force update if needed for type in "lxc" "vm"; do local last_update_var="last_update_${type}_time" From 4993fc953335359dd751461709cf67d8ce6bc710 Mon Sep 17 00:00:00 2001 From: Desert Gamer <44316028+DesertGamer@users.noreply.github.com> Date: Thu, 10 Apr 2025 03:01:21 +0300 Subject: [PATCH 0414/1614] optimize iptag script and improve logging - Reduce code size and complexity - Add informative status messages - Improve tag handling and IP validation - Enhance error reporting --- tools/addon/add-iptag.sh | 397 +++++++++++++++++---------------------- 1 file changed, 176 insertions(+), 221 deletions(-) diff --git a/tools/addon/add-iptag.sh b/tools/addon/add-iptag.sh index 1a394c6..c3bf88c 100644 --- a/tools/addon/add-iptag.sh +++ b/tools/addon/add-iptag.sh @@ -137,100 +137,76 @@ update_installation() { cat <<'EOF' >/opt/iptag/iptag #!/bin/bash # =============== CONFIGURATION =============== # -CONFIG_FILE="/opt/iptag/iptag.conf" +readonly CONFIG_FILE="/opt/iptag/iptag.conf" +readonly DEFAULT_TAG_FORMAT="full" +readonly DEFAULT_CHECK_INTERVAL=60 # Load the configuration file if it exists if [ -f "$CONFIG_FILE" ]; then - # shellcheck source=./iptag.conf - source "$CONFIG_FILE" + # shellcheck source=./iptag.conf + source "$CONFIG_FILE" fi # Convert IP to integer for comparison ip_to_int() { - local ip="$1" - local a b c d - IFS=. read -r a b c d <<< "${ip}" - echo "$((a << 24 | b << 16 | c << 8 | d))" + local ip="$1" + local a b c d + IFS=. read -r a b c d <<< "${ip}" + echo "$((a << 24 | b << 16 | c << 8 | d))" } # Check if IP is in CIDR ip_in_cidr() { - local ip="$1" - local cidr="$2" + local ip="$1" cidr="$2" + ipcalc -c "$ip" "$cidr" >/dev/null 2>&1 || return 1 - # Use ipcalc with the -c option (check), which returns 0 if the IP is in the network - if ipcalc -c "$ip" "$cidr" >/dev/null 2>&1; then - # Get network address and mask from CIDR - local network prefix + local network prefix ip_parts net_parts network=$(echo "$cidr" | cut -d/ -f1) prefix=$(echo "$cidr" | cut -d/ -f2) + IFS=. read -r -a ip_parts <<< "$ip" + IFS=. read -r -a net_parts <<< "$network" - # Check if IP is in the network - local ip_a ip_b ip_c ip_d net_a net_b net_c net_d - IFS=. read -r ip_a ip_b ip_c ip_d <<< "$ip" - IFS=. read -r net_a net_b net_c net_d <<< "$network" - - # Check octets match based on prefix length - local result=0 - if (( prefix >= 8 )); then - [[ "$ip_a" != "$net_a" ]] && result=1 - fi - if (( prefix >= 16 )); then - [[ "$ip_b" != "$net_b" ]] && result=1 - fi - if (( prefix >= 24 )); then - [[ "$ip_c" != "$net_c" ]] && result=1 - fi - - return $result - fi - - return 1 + case $prefix in + 8) [[ "${ip_parts[0]}" == "${net_parts[0]}" ]] ;; + 16) [[ "${ip_parts[0]}.${ip_parts[1]}" == "${net_parts[0]}.${net_parts[1]}" ]] ;; + 24) [[ "${ip_parts[0]}.${ip_parts[1]}.${ip_parts[2]}" == "${net_parts[0]}.${net_parts[1]}.${net_parts[2]}" ]] ;; + 32) [[ "$ip" == "$network" ]] ;; + *) return 1 ;; + esac } # Format IP address according to the configuration format_ip_tag() { - local ip="$1" - local format="${TAG_FORMAT:-full}" + local ip="$1" + local format="${TAG_FORMAT:-$DEFAULT_TAG_FORMAT}" - case "$format" in - "last_octet") - echo "${ip##*.}" - ;; - "last_two_octets") - echo "${ip#*.*.}" - ;; - *) - echo "$ip" - ;; - esac + case "$format" in + "last_octet") echo "${ip##*.}" ;; + "last_two_octets") echo "${ip#*.*.}" ;; + *) echo "$ip" ;; + esac } # Check if IP is in any CIDRs ip_in_cidrs() { - local ip="$1" - local cidrs="$2" - - # Check that cidrs is not empty - [[ -z "$cidrs" ]] && return 1 - - local IFS=' ' - for cidr in $cidrs; do - ip_in_cidr "$ip" "$cidr" && return 0 - done - return 1 + local ip="$1" cidrs="$2" + [[ -z "$cidrs" ]] && return 1 + local IFS=' ' + for cidr in $cidrs; do ip_in_cidr "$ip" "$cidr" && return 0; done + return 1 } # Check if IP is valid is_valid_ipv4() { - local ip="$1" - [[ "$ip" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]] || return 1 - local IFS='.' - read -ra parts <<< "$ip" - for part in "${parts[@]}"; do - [[ "$part" =~ ^[0-9]+$ ]] && ((part >= 0 && part <= 255)) || return 1 - done - return 0 + local ip="$1" + [[ "$ip" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]] || return 1 + + local IFS='.' parts + read -ra parts <<< "$ip" + for part in "${parts[@]}"; do + (( part >= 0 && part <= 255 )) || return 1 + done + return 0 } lxc_status_changed() { @@ -265,193 +241,172 @@ fw_net_interface_changed() { # Get VM IPs using MAC addresses and ARP table get_vm_ips() { - local vmid=$1 - local ips="" + local vmid=$1 ips="" macs found_ip=false + qm status "$vmid" 2>/dev/null | grep -q "status: running" || return - # Check if VM is running - qm status "$vmid" 2>/dev/null | grep -q "status: running" || return + macs=$(qm config "$vmid" 2>/dev/null | grep -E 'net[0-9]+' | grep -oE '[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}') + [[ -z "$macs" ]] && return - # Get MAC addresses from VM configuration - local macs - macs=$(qm config "$vmid" 2>/dev/null | grep -E 'net[0-9]+' | grep -o -E '[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}') + for mac in $macs; do + local ip + ip=$(arp -an 2>/dev/null | grep -i "$mac" | grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}') + [[ -n "$ip" ]] && { ips+="$ip "; found_ip=true; } + done - # Look up IPs from ARP table using MAC addresses - for mac in $macs; do - local ip - ip=$(arp -an 2>/dev/null | grep -i "$mac" | grep -o -E '([0-9]{1,3}\.){3}[0-9]{1,3}') - if [ -n "$ip" ]; then - ips+="$ip " + if ! $found_ip; then + local agent_ip + agent_ip=$(qm agent "$vmid" network-get-interfaces 2>/dev/null | grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}' || true) + [[ -n "$agent_ip" ]] && ips+="$agent_ip " fi - done - echo "$ips" + echo "${ips% }" } -# Update tags for container or VM +# Update tags update_tags() { - local type="$1" - local vmid="$2" - local config_cmd="pct" - [[ "$type" == "vm" ]] && config_cmd="qm" + local type="$1" vmid="$2" config_cmd="pct" + [[ "$type" == "vm" ]] && config_cmd="qm" - # Get current IPs - local current_ips_full - if [[ "$type" == "lxc" ]]; then - # Redirect error output to suppress AppArmor warnings - current_ips_full=$(lxc-info -n "${vmid}" -i 2>/dev/null | grep -E "^IP:" | awk '{print $2}') - else - current_ips_full=$(get_vm_ips "${vmid}") - fi - - # Parse current tags and get valid IPs - local current_tags=() - local next_tags=() - mapfile -t current_tags < <($config_cmd config "${vmid}" 2>/dev/null | grep tags | awk '{print $2}' | sed 's/;/\n/g') - - for tag in "${current_tags[@]}"; do - # Skip tag if it looks like an IP (full or partial) - if ! is_valid_ipv4 "${tag}" && ! [[ "$tag" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then - next_tags+=("${tag}") + local current_ips_full + if [[ "$type" == "lxc" ]]; then + current_ips_full=$(lxc-info -n "${vmid}" -i 2>/dev/null | grep -E "^IP:" | awk '{print $2}') + else + current_ips_full=$(get_vm_ips "${vmid}") fi - done + [[ -z "$current_ips_full" ]] && return - # Add valid IPs to tags - local added_ips=() - local skipped_ips=() + local current_tags=() next_tags=() current_ip_tags=() + mapfile -t current_tags < <($config_cmd config "${vmid}" 2>/dev/null | grep tags | awk '{print $2}' | sed 's/;/\n/g') - for ip in ${current_ips_full}; do - if is_valid_ipv4 "${ip}"; then - if ip_in_cidrs "${ip}" "${CIDR_LIST[*]}"; then - local formatted_ip=$(format_ip_tag "$ip") - next_tags+=("${formatted_ip}") - added_ips+=("${formatted_ip}") - else - skipped_ips+=("${ip}") - fi + # Separate IP and non-IP tags + for tag in "${current_tags[@]}"; do + if is_valid_ipv4 "${tag}" || [[ "$tag" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + current_ip_tags+=("${tag}") + else + next_tags+=("${tag}") + fi + done + + local formatted_ips=() needs_update=false added_ips=() + for ip in ${current_ips_full}; do + if is_valid_ipv4 "$ip" && ip_in_cidrs "$ip" "${CIDR_LIST[*]}"; then + local formatted_ip=$(format_ip_tag "$ip") + formatted_ips+=("$formatted_ip") + if [[ ! " ${current_ip_tags[*]} " =~ " ${formatted_ip} " ]]; then + needs_update=true + added_ips+=("$formatted_ip") + next_tags+=("$formatted_ip") + fi + fi + done + + [[ ${#formatted_ips[@]} -eq 0 ]] && return + + # Add existing IP tags that are still valid + for tag in "${current_ip_tags[@]}"; do + if [[ " ${formatted_ips[*]} " =~ " ${tag} " ]]; then + if [[ ! " ${next_tags[*]} " =~ " ${tag} " ]]; then + next_tags+=("$tag") + fi + fi + done + + if [[ "$needs_update" == true ]]; then + echo "${type^} ${vmid}: adding IP tags: ${added_ips[*]}" + $config_cmd set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" &>/dev/null + elif [[ ${#current_ip_tags[@]} -gt 0 ]]; then + echo "${type^} ${vmid}: IP tags already set: ${current_ip_tags[*]}" + else + echo "${type^} ${vmid}: setting initial IP tags: ${formatted_ips[*]}" + $config_cmd set "${vmid}" -tags "$(IFS=';'; echo "${formatted_ips[*]}")" &>/dev/null fi - done - - # Log only if there are changes - if [ ${#added_ips[@]} -gt 0 ]; then - echo "${type^} ${vmid}: added IP tags: ${added_ips[*]}" - fi - - # Update if changed - if [[ "$(IFS=';'; echo "${current_tags[*]}")" != "$(IFS=';'; echo "${next_tags[*]}")" ]]; then - $config_cmd set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" &>/dev/null - fi } # Check if status changed -check_status_changed() { - local type="$1" - local current_status - - case "$type" in - "lxc") - current_status=$(pct list 2>/dev/null | grep -v VMID) - [[ "${last_lxc_status}" == "${current_status}" ]] && return 1 - last_lxc_status="${current_status}" - ;; - "vm") - current_status=$(qm list 2>/dev/null | grep -v VMID) - [[ "${last_vm_status}" == "${current_status}" ]] && return 1 - last_vm_status="${current_status}" - ;; - "fw") - current_status=$(ifconfig 2>/dev/null | grep "^fw") - [[ "${last_net_interface}" == "${current_status}" ]] && return 1 - last_net_interface="${current_status}" - ;; - esac - return 0 +check_status() { + local type="$1" current + case "$type" in + "lxc") current=$(pct list 2>/dev/null | grep -v VMID) ;; + "vm") current=$(qm list 2>/dev/null | grep -v VMID) ;; + "fw") current=$(ifconfig 2>/dev/null | grep "^fw") ;; + esac + local last_var="last_${type}_status" + [[ "${!last_var}" == "$current" ]] && return 1 + eval "$last_var='$current'" + return 0 } -# Update tags for all containers/VMs of specified type -update_all_tags() { - local type="$1" - local vmid_list="" +# Update all instances +update_all() { + local type="$1" list_cmd="pct" vmids count=0 + [[ "$type" == "vm" ]] && list_cmd="qm" + + vmids=$($list_cmd list 2>/dev/null | grep -v VMID | awk '{print $1}') + for vmid in $vmids; do ((count++)); done + + echo "Found ${count} running ${type}s" + [[ $count -eq 0 ]] && return - if [[ "$type" == "lxc" ]]; then - # Redirect stderr to /dev/null to suppress AppArmor messages - vmid_list=$(pct list 2>/dev/null | grep -v VMID | awk '{print $1}') - echo "Found $(echo "$vmid_list" | wc -w) LXC containers" - else - vmid_list=$(qm list 2>/dev/null | grep -v VMID | awk '{print $1}') - echo "Found $(echo "$vmid_list" | wc -w) virtual machines" - fi - - for vmid in $vmid_list; do - update_tags "$type" "$vmid" - done + for vmid in $vmids; do + update_tags "$type" "$vmid" + done } +# Main check function check() { - current_time=$(date +%s) + local current_time changes_detected=false + current_time=$(date +%s) - # Check LXC status - time_since_last_lxc_status_check=$((current_time - last_lxc_status_check_time)) - if [[ "${LXC_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ - && [[ "${time_since_last_lxc_status_check}" -ge "${LXC_STATUS_CHECK_INTERVAL}" ]]; then - echo "Checking LXC status..." - last_lxc_status_check_time=${current_time} - if check_status_changed "lxc"; then - update_all_tags "lxc" - last_update_lxc_time=${current_time} - fi - fi + for type in "lxc" "vm"; do + local interval_var="${type^^}_STATUS_CHECK_INTERVAL" + local last_check_var="last_${type}_check_time" + local last_update_var="last_update_${type}_time" + + if [[ "${!interval_var}" -gt 0 ]] && (( current_time - ${!last_check_var} >= ${!interval_var} )); then + echo "Checking ${type^^} status..." + eval "${last_check_var}=\$current_time" + if check_status "$type"; then + changes_detected=true + update_all "$type" + eval "${last_update_var}=\$current_time" + fi + fi - # Check VM status - time_since_last_vm_status_check=$((current_time - last_vm_status_check_time)) - if [[ "${VM_STATUS_CHECK_INTERVAL}" -gt 0 ]] \ - && [[ "${time_since_last_vm_status_check}" -ge "${VM_STATUS_CHECK_INTERVAL}" ]]; then - echo "Checking VM status..." - last_vm_status_check_time=${current_time} - if check_status_changed "vm"; then - update_all_tags "vm" - last_update_vm_time=${current_time} - fi - fi + if (( current_time - ${!last_update_var} >= FORCE_UPDATE_INTERVAL )); then + echo "Force updating ${type} tags..." + changes_detected=true + update_all "$type" + eval "${last_update_var}=\$current_time" + fi + done - # Check network interface changes - time_since_last_fw_net_interface_check=$((current_time - last_fw_net_interface_check_time)) - if [[ "${FW_NET_INTERFACE_CHECK_INTERVAL}" -gt 0 ]] \ - && [[ "${time_since_last_fw_net_interface_check}" -ge "${FW_NET_INTERFACE_CHECK_INTERVAL}" ]]; then - echo "Checking network interfaces..." - last_fw_net_interface_check_time=${current_time} - if check_status_changed "fw"; then - update_all_tags "lxc" - update_all_tags "vm" - last_update_lxc_time=${current_time} - last_update_vm_time=${current_time} + if [[ "${FW_NET_INTERFACE_CHECK_INTERVAL}" -gt 0 ]] && \ + (( current_time - last_fw_check_time >= FW_NET_INTERFACE_CHECK_INTERVAL )); then + echo "Checking network interfaces..." + last_fw_check_time=$current_time + if check_status "fw"; then + changes_detected=true + update_all "lxc" + update_all "vm" + last_update_lxc_time=$current_time + last_update_vm_time=$current_time + fi fi - fi - # Force update if needed - for type in "lxc" "vm"; do - local last_update_var="last_update_${type}_time" - local time_since_last_update=$((current_time - ${!last_update_var})) - if [ ${time_since_last_update} -ge ${FORCE_UPDATE_INTERVAL} ]; then - echo "Force updating ${type} tags..." - update_all_tags "$type" - eval "${last_update_var}=${current_time}" - fi - done + $changes_detected || echo "No changes detected in system status" } # Initialize time variables -last_lxc_status_check_time=0 -last_vm_status_check_time=0 -last_fw_net_interface_check_time=0 -last_update_lxc_time=0 -last_update_vm_time=0 +declare -g last_lxc_status="" last_vm_status="" last_fw_status="" +declare -g last_lxc_check_time=0 last_vm_check_time=0 last_fw_check_time=0 +declare -g last_update_lxc_time=0 last_update_vm_time=0 -# main: Set the IP tags for all LXC containers and VMs +# Main loop main() { - while true; do - check - sleep "${LOOP_INTERVAL}" - done + while true; do + check + sleep "${LOOP_INTERVAL:-$DEFAULT_CHECK_INTERVAL}" + done } main From 4b126e4abb28cbb5a5ae1dc239e1ecbcc40c8800 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Thu, 10 Apr 2025 01:22:44 +0000 Subject: [PATCH 0415/1614] Update versions.json --- frontend/public/json/versions.json | 328 +++++++++++++++-------------- 1 file changed, 174 insertions(+), 154 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 0d9423a..a19e310 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,23 +1,188 @@ [ { - "name": "semaphoreui/semaphore", - "version": "v2.13.11-beta1", - "date": "2025-04-08T10:56:42Z" + "name": "outline/outline", + "version": "v0.82.1-19", + "date": "2025-04-10T01:03:03Z" }, { - "name": "n8n-io/n8n", - "version": "n8n@1.84.3", - "date": "2025-03-27T11:54:33Z" + "name": "glanceapp/glance", + "version": "v0.7.10", + "date": "2025-04-09T23:51:06Z" + }, + { + "name": "mongodb/mongo", + "version": "r8.0.5-rc2", + "date": "2025-04-09T22:37:52Z" + }, + { + "name": "paperless-ngx/paperless-ngx", + "version": "v2.15.1", + "date": "2025-04-09T22:26:39Z" }, { "name": "fhem/fhem-mirror", "version": "6.2", - "date": "2025-04-08T10:34:47Z" + "date": "2025-04-09T20:29:25Z" + }, + { + "name": "syncthing/syncthing", + "version": "v2.0.0-beta.7", + "date": "2025-04-09T13:41:32Z" + }, + { + "name": "NodeBB/NodeBB", + "version": "v4.3.0-beta.1", + "date": "2025-04-09T19:06:10Z" + }, + { + "name": "docmost/docmost", + "version": "v0.10.0", + "date": "2025-04-09T18:58:20Z" + }, + { + "name": "Prowlarr/Prowlarr", + "version": "v1.33.3.5008", + "date": "2025-04-09T17:58:37Z" + }, + { + "name": "jupyter/notebook", + "version": "v7.4.0", + "date": "2025-04-09T17:36:14Z" + }, + { + "name": "MediaBrowser/Emby.Releases", + "version": "4.8.11.0", + "date": "2025-03-10T06:39:11Z" + }, + { + "name": "Stirling-Tools/Stirling-PDF", + "version": "v0.45.3", + "date": "2025-04-09T17:17:58Z" + }, + { + "name": "Brandawg93/PeaNUT", + "version": "v5.7.1", + "date": "2025-04-09T15:06:49Z" + }, + { + "name": "glpi-project/glpi", + "version": "10.0.18", + "date": "2025-02-12T11:07:02Z" + }, + { + "name": "slskd/slskd", + "version": "0.22.3", + "date": "2025-04-09T14:02:12Z" + }, + { + "name": "HabitRPG/habitica", + "version": "v5.35.2", + "date": "2025-04-09T13:46:58Z" + }, + { + "name": "homarr-labs/homarr", + "version": "v1.15.0", + "date": "2025-04-09T13:27:14Z" + }, + { + "name": "zitadel/zitadel", + "version": "v2.69.10", + "date": "2025-04-09T12:16:51Z" + }, + { + "name": "YunoHost/yunohost", + "version": "debian/12.0.14", + "date": "2025-04-09T10:09:00Z" + }, + { + "name": "n8n-io/n8n", + "version": "n8n@1.86.1", + "date": "2025-04-09T09:20:55Z" + }, + { + "name": "esphome/esphome", + "version": "2025.3.3", + "date": "2025-03-31T22:07:05Z" + }, + { + "name": "runtipi/runtipi", + "version": "nightly", + "date": "2025-04-08T07:12:33Z" + }, + { + "name": "morpheus65535/bazarr", + "version": "v1.5.1", + "date": "2025-01-01T16:15:52Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1751", + "date": "2025-04-09T06:00:36Z" + }, + { + "name": "StarFleetCPTN/GoMFT", + "version": "v0.2.7", + "date": "2025-04-09T04:53:30Z" + }, + { + "name": "OliveTin/OliveTin", + "version": "2025.4.8", + "date": "2025-04-08T22:02:50Z" + }, + { + "name": "coder/code-server", + "version": "v4.99.1", + "date": "2025-04-08T21:35:21Z" + }, + { + "name": "semaphoreui/semaphore", + "version": "v2.13.12", + "date": "2025-04-08T20:54:58Z" + }, + { + "name": "minio/minio", + "version": "RELEASE.2025-04-08T15-41-24Z", + "date": "2025-04-08T19:51:06Z" + }, + { + "name": "goauthentik/authentik", + "version": "version/2025.2.4", + "date": "2025-04-08T18:39:57Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.1.4", + "date": "2025-03-13T15:41:42Z" + }, + { + "name": "influxdata/influxdb", + "version": "v1.12.0rc1", + "date": "2025-04-08T17:35:21Z" + }, + { + "name": "jenkinsci/jenkins", + "version": "jenkins-2.505", + "date": "2025-04-08T15:46:42Z" + }, + { + "name": "AdguardTeam/AdGuardHome", + "version": "v0.107.59", + "date": "2025-03-21T11:11:39Z" }, { "name": "openobserve/openobserve", - "version": "v0.14.6-rc1", - "date": "2025-04-08T08:50:03Z" + "version": "v0.14.6-rc2", + "date": "2025-04-08T14:42:54Z" + }, + { + "name": "element-hq/synapse", + "version": "v1.128.0", + "date": "2025-04-08T14:27:55Z" + }, + { + "name": "linkwarden/linkwarden", + "version": "v2.10.0", + "date": "2025-04-08T12:33:57Z" }, { "name": "prometheus/prometheus", @@ -29,21 +194,6 @@ "version": "release-1.23.0rc1", "date": "2025-04-08T06:39:46Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1744", - "date": "2025-04-08T06:09:14Z" - }, - { - "name": "StarFleetCPTN/GoMFT", - "version": "v0.2.6", - "date": "2025-04-08T02:23:38Z" - }, - { - "name": "coder/code-server", - "version": "v4.99.0", - "date": "2025-04-08T00:55:36Z" - }, { "name": "pelican-dev/panel", "version": "v1.0.0-beta19", @@ -59,11 +209,6 @@ "version": "1.2.32", "date": "2025-04-07T20:01:09Z" }, - { - "name": "NodeBB/NodeBB", - "version": "v4.2.0", - "date": "2025-03-19T18:34:01Z" - }, { "name": "go-gitea/gitea", "version": "v1.23.7", @@ -79,16 +224,6 @@ "version": "coverity-w15-4.12.0", "date": "2025-04-07T17:50:14Z" }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, - { - "name": "Brandawg93/PeaNUT", - "version": "v5.7.0", - "date": "2025-04-07T16:14:10Z" - }, { "name": "thomiceli/opengist", "version": "v1.10.0", @@ -109,11 +244,6 @@ "version": "pmm-6401-v1.115.0", "date": "2025-04-07T11:15:53Z" }, - { - "name": "syncthing/syncthing", - "version": "v1.29.4", - "date": "2025-04-01T08:45:07Z" - }, { "name": "fallenbagel/jellyseerr", "version": "preview-back-to-axios", @@ -144,11 +274,6 @@ "version": "server/public/v0.1.11", "date": "2025-03-28T14:04:31Z" }, - { - "name": "morpheus65535/bazarr", - "version": "v1.5.1", - "date": "2025-01-01T16:15:52Z" - }, { "name": "open-webui/open-webui", "version": "v0.6.2", @@ -184,11 +309,6 @@ "version": "1.5.34", "date": "2025-03-27T16:17:38Z" }, - { - "name": "runtipi/runtipi", - "version": "v3.10.0", - "date": "2025-03-15T14:38:16Z" - }, { "name": "stackblitz-labs/bolt.diy", "version": "v0.0.7-hf1", @@ -199,11 +319,6 @@ "version": "v1.19.7", "date": "2025-04-06T14:22:44Z" }, - { - "name": "Prowlarr/Prowlarr", - "version": "v1.32.2.4987", - "date": "2025-03-16T09:41:37Z" - }, { "name": "Radarr/Radarr", "version": "v5.21.1.9799", @@ -289,16 +404,6 @@ "version": "2.2.1", "date": "2025-04-04T20:15:48Z" }, - { - "name": "YunoHost/yunohost", - "version": "debian/12.0.13", - "date": "2025-04-04T20:05:45Z" - }, - { - "name": "homarr-labs/homarr", - "version": "v1.14.0", - "date": "2025-04-04T19:15:59Z" - }, { "name": "Athou/commafeed", "version": "5.7.0", @@ -324,36 +429,16 @@ "version": "0.49.12", "date": "2025-04-04T07:31:08Z" }, - { - "name": "minio/minio", - "version": "RELEASE.2025-04-03T14-56-28Z", - "date": "2025-04-03T19:08:18Z" - }, { "name": "OctoPrint/OctoPrint", "version": "1.10.3", "date": "2024-11-05T09:20:50Z" }, - { - "name": "jupyter/notebook", - "version": "@jupyter-notebook/ui-components@7.4.0-rc.0", - "date": "2025-04-03T06:49:38Z" - }, { "name": "rabbitmq/rabbitmq-server", "version": "v4.0.8", "date": "2025-04-03T05:11:15Z" }, - { - "name": "HabitRPG/habitica", - "version": "v5.35.1", - "date": "2025-04-02T21:49:00Z" - }, - { - "name": "zitadel/zitadel", - "version": "v2.63.9", - "date": "2025-03-31T12:47:21Z" - }, { "name": "BookStackApp/BookStack", "version": "v25.02.2", @@ -364,11 +449,6 @@ "version": "2025.4.0", "date": "2025-04-02T15:38:53Z" }, - { - "name": "jenkinsci/jenkins", - "version": "jenkins-2.503", - "date": "2025-04-02T15:12:13Z" - }, { "name": "hargata/lubelog", "version": "v1.4.6", @@ -384,16 +464,6 @@ "version": "v2.31.0", "date": "2025-04-01T18:12:45Z" }, - { - "name": "influxdata/influxdb", - "version": "v3.0.0-0.beta.3", - "date": "2025-04-01T15:34:30Z" - }, - { - "name": "element-hq/synapse", - "version": "v1.127.1", - "date": "2025-03-26T21:44:28Z" - }, { "name": "theonedev/onedev", "version": "v11.8.6", @@ -409,59 +479,9 @@ "version": "v4.0.2", "date": "2025-04-01T04:51:05Z" }, - { - "name": "outline/outline", - "version": "v0.82.1-18", - "date": "2025-03-31T23:12:40Z" - }, - { - "name": "esphome/esphome", - "version": "2025.3.3", - "date": "2025-03-31T22:07:05Z" - }, { "name": "Kometa-Team/Kometa", "version": "v2.2.0", "date": "2025-03-31T21:31:48Z" - }, - { - "name": "traefik/traefik", - "version": "v3.3.5", - "date": "2025-03-31T08:55:12Z" - }, - { - "name": "home-assistant/operating-system", - "version": "15.1", - "date": "2025-03-31T13:42:20Z" - }, - { - "name": "documenso/documenso", - "version": "v1.10.0-rc.4", - "date": "2025-03-31T09:02:22Z" - }, - { - "name": "MediaBrowser/Emby.Releases", - "version": "4.8.11.0", - "date": "2025-03-10T06:39:11Z" - }, - { - "name": "louislam/dockge", - "version": "1.5.0", - "date": "2025-03-30T17:42:59Z" - }, - { - "name": "pi-hole/pi-hole", - "version": "v6.0.6", - "date": "2025-03-30T16:59:06Z" - }, - { - "name": "Part-DB/Part-DB-server", - "version": "v1.17.0", - "date": "2025-03-30T14:21:53Z" - }, - { - "name": "openhab/openhab-core", - "version": "4.3.4", - "date": "2025-03-30T13:32:38Z" } ] From bbee45e605791c6921ca6e383db587a6a24124d9 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 14:07:16 +0200 Subject: [PATCH 0416/1614] Workflow Changes --- .github/workflows/script-test.yaml | 51 ++++++++++--------- .../workflows/scripts/app-test/pr-build.func | 4 +- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/workflows/script-test.yaml b/.github/workflows/script-test.yaml index 5c88039..50239f2 100644 --- a/.github/workflows/script-test.yaml +++ b/.github/workflows/script-test.yaml @@ -12,18 +12,18 @@ on: jobs: run-install-script: runs-on: pvenode - steps: + steps: - name: Checkout PR branch uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - fetch-depth: 0 - + fetch-depth: 0 + - name: Add Git safe directory run: | git config --global --add safe.directory /__w/ProxmoxVE/ProxmoxVE - + - name: Set up GH_TOKEN env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -38,15 +38,15 @@ jobs: echo "SCRIPT=$CHANGED_FILES" >> $GITHUB_ENV env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + - name: Get scripts id: check-install-script run: | ALL_FILES=() - ADDED_FILES=() - for FILE in ${{ env.SCRIPT }}; do - if [[ $FILE =~ ^install/.*-install\.sh$ ]] || [[ $FILE =~ ^ct/.*\.sh$ ]]; then + ADDED_FILES=() + for FILE in ${{ env.SCRIPT }}; do + if [[ $FILE =~ ^install/.*-install\.sh$ ]] || [[ $FILE =~ ^ct/.*\.sh$ ]]; then STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') if [[ ! " ${ADDED_FILES[@]} " =~ " $STRIPPED_NAME " ]]; then ALL_FILES+=("$FILE") @@ -57,14 +57,14 @@ jobs: ALL_FILES=$(echo "${ALL_FILES[@]}" | xargs) echo "$ALL_FILES" echo "ALL_FILES=$ALL_FILES" >> $GITHUB_ENV - + - name: Run scripts id: run-install continue-on-error: true run: | - set +e + set +e #run for each files in /ct - for FILE in ${{ env.ALL_FILES }}; do + for FILE in ${{ env.ALL_FILES }}; do STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') echo "Running Test for: $STRIPPED_NAME" if grep -E -q 'read\s+-r\s+-p\s+".*"\s+\w+' "$FILE"; then @@ -93,7 +93,7 @@ jobs: ERROR_MSG="No install script found for $FILE" echo "$ERROR_MSG" > result_$STRIPPED_NAME.log continue - fi + fi echo "Found install script for $STRIPPED_NAME" chmod +x "$INSTALL_SCRIPT" RUNNING_FILE=$FILE @@ -112,13 +112,14 @@ jobs: git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-install.func git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-alpine-install.func git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-create-lxc.sh - chmod +x $RUNNING_FILE + chmod +x $RUNNING_FILE chmod +x .github/workflows/scripts/app-test/pr-create-lxc.sh chmod +x .github/workflows/scripts/app-test/pr-install.func chmod +x .github/workflows/scripts/app-test/pr-alpine-install.func chmod +x .github/workflows/scripts/app-test/pr-build.func sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source .github/workflows/scripts/app-test/pr-build.func|g' "$RUNNING_FILE" echo "Executing $RUNNING_FILE" + export TERM=xterm ERROR_MSG=$(./$RUNNING_FILE 2>&1 > /dev/null) echo "Finished running $FILE" if [ -n "$ERROR_MSG" ]; then @@ -127,38 +128,38 @@ jobs: fi done set -e # Restore exit-on-error - + - name: Cleanup PVE Node run: | containers=$(pct list | tail -n +2 | awk '{print $0 " " $4}' | awk '{print $1}') - + for container_id in $containers; do status=$(pct status $container_id | awk '{print $2}') if [[ $status == "running" ]]; then pct stop $container_id pct destroy $container_id - fi + fi done - + - name: Post error comments run: | ERROR="false" SEARCH_LINE=".github/workflows/scripts/app-test/pr-build.func: line 255:" - + # Get all existing comments on the PR - EXISTING_COMMENTS=$(gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json comments --jq '.comments[].body') - + #EXISTING_COMMENTS=$(gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json comments --jq '.comments[].body') + EXISTING_COMMENTS="NONE" for FILE in ${{ env.ALL_FILES }}; do STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') if [[ ! -f result_$STRIPPED_NAME.log ]]; then continue fi ERROR_MSG=$(cat result_$STRIPPED_NAME.log) - + if [ -n "$ERROR_MSG" ]; then CLEANED_ERROR_MSG=$(echo "$ERROR_MSG" | sed "s|$SEARCH_LINE.*||") COMMENT_BODY=":warning: The script _**$FILE**_ failed with the following message:
${CLEANED_ERROR_MSG}
" - + # Check if the comment already exists if echo "$EXISTING_COMMENTS" | grep -qF "$COMMENT_BODY"; then echo "Skipping duplicate comment for $FILE" @@ -171,7 +172,7 @@ jobs: fi fi done - + echo "ERROR=$ERROR" >> $GITHUB_ENV - - + + diff --git a/.github/workflows/scripts/app-test/pr-build.func b/.github/workflows/scripts/app-test/pr-build.func index 644a1ac..b44b59d 100644 --- a/.github/workflows/scripts/app-test/pr-build.func +++ b/.github/workflows/scripts/app-test/pr-build.func @@ -147,9 +147,9 @@ build_container() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/.github/workflows/scripts/app-test/pr-alpine-install.func)" + export FUNCTIONS_FILE_PATH="$(wget -qLO https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/.github/workflows/scripts/app-test/pr-alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/.github/workflows/scripts/app-test/pr-install.func)" + export FUNCTIONS_FILE_PATH="$(wget -qLO https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/.github/workflows/scripts/app-test/pr-install.func)" fi export CACHER="$APT_CACHER" From 988482ab1dac08f70aee7cbc096c5693d7d3c538 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 14:08:27 +0200 Subject: [PATCH 0417/1614] Workflow Changes --- .github/workflows/script-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/script-test.yaml b/.github/workflows/script-test.yaml index 50239f2..d03863c 100644 --- a/.github/workflows/script-test.yaml +++ b/.github/workflows/script-test.yaml @@ -119,7 +119,7 @@ jobs: chmod +x .github/workflows/scripts/app-test/pr-build.func sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source .github/workflows/scripts/app-test/pr-build.func|g' "$RUNNING_FILE" echo "Executing $RUNNING_FILE" - export TERM=xterm + export TERM=linux ERROR_MSG=$(./$RUNNING_FILE 2>&1 > /dev/null) echo "Finished running $FILE" if [ -n "$ERROR_MSG" ]; then From c126644a79f8c219c28e955108900932ff14dcc1 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 14:12:22 +0200 Subject: [PATCH 0418/1614] Workflow Changes --- .github/workflows/script-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/script-test.yaml b/.github/workflows/script-test.yaml index d03863c..b8d3d30 100644 --- a/.github/workflows/script-test.yaml +++ b/.github/workflows/script-test.yaml @@ -119,7 +119,7 @@ jobs: chmod +x .github/workflows/scripts/app-test/pr-build.func sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source .github/workflows/scripts/app-test/pr-build.func|g' "$RUNNING_FILE" echo "Executing $RUNNING_FILE" - export TERM=linux + export TERM=xterm-256color ERROR_MSG=$(./$RUNNING_FILE 2>&1 > /dev/null) echo "Finished running $FILE" if [ -n "$ERROR_MSG" ]; then From b41c394c180ec663dbd59664e0f5a62484cd1d9e Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 14:14:02 +0200 Subject: [PATCH 0419/1614] Workflow Changes --- .github/workflows/script-test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/script-test.yaml b/.github/workflows/script-test.yaml index b8d3d30..695b5eb 100644 --- a/.github/workflows/script-test.yaml +++ b/.github/workflows/script-test.yaml @@ -120,6 +120,7 @@ jobs: sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source .github/workflows/scripts/app-test/pr-build.func|g' "$RUNNING_FILE" echo "Executing $RUNNING_FILE" export TERM=xterm-256color + ERROR_MSG=$(./$RUNNING_FILE 2>&1 > /dev/null) echo "Finished running $FILE" if [ -n "$ERROR_MSG" ]; then From a5c2727daab5223329b32b4d26aea1b9cf39d889 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 14:22:51 +0200 Subject: [PATCH 0420/1614] WF Test --- .github/workflows/script-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/script-test.yaml b/.github/workflows/script-test.yaml index 695b5eb..b41c20e 100644 --- a/.github/workflows/script-test.yaml +++ b/.github/workflows/script-test.yaml @@ -120,7 +120,7 @@ jobs: sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source .github/workflows/scripts/app-test/pr-build.func|g' "$RUNNING_FILE" echo "Executing $RUNNING_FILE" export TERM=xterm-256color - + ./$RUNNING_FILE ERROR_MSG=$(./$RUNNING_FILE 2>&1 > /dev/null) echo "Finished running $FILE" if [ -n "$ERROR_MSG" ]; then From 2df099b8a41e0d51b262f187b4464ab4c890fbe2 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 15:11:51 +0200 Subject: [PATCH 0421/1614] Update PVE Version check --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 162f36b..c8fe690 100644 --- a/misc/build.func +++ b/misc/build.func @@ -196,7 +196,7 @@ root_check() { # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { - if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-9](\.[0-9]+)*"; then msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." From 7171d2a04949a3d75a1ba811afb999749ca7e1c4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:13:04 +0200 Subject: [PATCH 0422/1614] NODEJS Helper --- misc/helpers.func | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/misc/helpers.func b/misc/helpers.func index fc7b437..ea620de 100644 --- a/misc/helpers.func +++ b/misc/helpers.func @@ -153,3 +153,69 @@ exit-script() { echo -e "\n${CROSS}${RD}User exited script${CL}\n" exit } + +install_node_and_modules() { + local NODE_VERSION="${NODE_VERSION:-22}" + local NODE_MODULE="${NODE_MODULE:-}" + local CURRENT_NODE_VERSION="" + local NEED_NODE_INSTALL=false + + if command -v node >/dev/null; then + CURRENT_NODE_VERSION="$(node -v | grep -oP '^v\K[0-9]+')" + if [[ "$CURRENT_NODE_VERSION" != "$NODE_VERSION" ]]; then + msg_info "Node.js Version $CURRENT_NODE_VERSION found, replacing with $NODE_VERSION" + NEED_NODE_INSTALL=true + fi + else + msg_info "Node.js not found, installing version $NODE_VERSION" + NEED_NODE_INSTALL=true + fi + + if [[ "$NEED_NODE_INSTALL" == true ]]; then + $STD apt-get purge -y nodejs + rm -f /etc/apt/sources.list.d/nodesource.list + rm -f /etc/apt/keyrings/nodesource.gpg + + mkdir -p /etc/apt/keyrings + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \ + gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_VERSION}.x nodistro main" \ + > /etc/apt/sources.list.d/nodesource.list + + $STD apt-get update + $STD apt-get install -y nodejs + msg_ok "Installed Node.js ${NODE_VERSION}" + fi + + if [[ -n "$NODE_MODULE" ]]; then + IFS=',' read -ra MODULES <<< "$NODE_MODULE" + for mod in "${MODULES[@]}"; do + local MODULE_NAME MODULE_REQ_VERSION MODULE_INSTALLED_VERSION + if [[ "$mod" == *"@"* ]]; then + MODULE_NAME="${mod%@*}" + MODULE_REQ_VERSION="${mod#*@}" + else + MODULE_NAME="$mod" + MODULE_REQ_VERSION="latest" + fi + + if npm list -g --depth=0 "$MODULE_NAME" >/dev/null 2>&1; then + MODULE_INSTALLED_VERSION="$(npm list -g --depth=0 "$MODULE_NAME" | grep "$MODULE_NAME@" | awk -F@ '{print $2}' | tr -d '[:space:]')" + if [[ "$MODULE_REQ_VERSION" != "latest" && "$MODULE_REQ_VERSION" != "$MODULE_INSTALLED_VERSION" ]]; then + msg_info "Updating $MODULE_NAME from v$MODULE_INSTALLED_VERSION to v$MODULE_REQ_VERSION" + $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}" + elif [[ "$MODULE_REQ_VERSION" == "latest" ]]; then + msg_info "Updating $MODULE_NAME to latest version" + $STD npm install -g "${MODULE_NAME}@latest" + else + msg_ok "$MODULE_NAME@$MODULE_INSTALLED_VERSION already installed" + fi + else + msg_info "Installing $MODULE_NAME@$MODULE_REQ_VERSION" + $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}" + fi + done + msg_ok "Node Modules processed" + fi +} From 43804cc2b6e00472eecb86a90db8aa9e8552dcaa Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:16:03 +0200 Subject: [PATCH 0423/1614] postgres-helper --- misc/helpers.func | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/misc/helpers.func b/misc/helpers.func index ea620de..79a7af1 100644 --- a/misc/helpers.func +++ b/misc/helpers.func @@ -219,3 +219,43 @@ install_node_and_modules() { msg_ok "Node Modules processed" fi } + +function install_postgresql() { + local PG_VERSION="${PG_VERSION:-15}" + local CURRENT_PG_VERSION="" + local DISTRO + local NEED_PG_INSTALL=false + DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" + + if command -v psql >/dev/null; then + CURRENT_PG_VERSION="$(psql -V | grep -oP '\s\K[0-9]+(?=\.)')" + if [[ "$CURRENT_PG_VERSION" != "$PG_VERSION" ]]; then + msg_info "PostgreSQL Version $CURRENT_PG_VERSION found, replacing with $PG_VERSION" + NEED_PG_INSTALL=true + fi + else + msg_info "PostgreSQL not found, installing version $PG_VERSION" + NEED_PG_INSTALL=true + fi + + if [[ "$NEED_PG_INSTALL" == true ]]; then + msg_info "Stopping PostgreSQL if running" + systemctl stop postgresql >/dev/null 2>&1 || true + + msg_info "Removing conflicting PostgreSQL packages" + $STD apt-get purge -y "postgresql*" + rm -f /etc/apt/sources.list.d/pgdg.list /etc/apt/trusted.gpg.d/postgresql.gpg + + msg_info "Setting up PostgreSQL Repository" + curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ + gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg + + echo "deb https://apt.postgresql.org/pub/repos/apt ${DISTRO}-pgdg main" \ + > /etc/apt/sources.list.d/pgdg.list + + $STD apt-get update + $STD apt-get install -y "postgresql-${PG_VERSION}" + + msg_ok "Installed PostgreSQL ${PG_VERSION}" + fi +} From b99d3d4dc49c3e93e6709aed02e5ea1c7cf8e6fe Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:16:58 +0200 Subject: [PATCH 0424/1614] mysql & mariadb helper --- misc/helpers.func | 74 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/misc/helpers.func b/misc/helpers.func index 79a7af1..f11874a 100644 --- a/misc/helpers.func +++ b/misc/helpers.func @@ -259,3 +259,77 @@ function install_postgresql() { msg_ok "Installed PostgreSQL ${PG_VERSION}" fi } + +function install_mariadb() { + local MARIADB_VERSION="${MARIADB_VERSION:-10.11}" + local CURRENT_VERSION="" + local NEED_INSTALL=false + + if command -v mariadb >/dev/null; then + CURRENT_VERSION="$(mariadb --version | grep -oP 'Ver\s+\K[0-9]+\.[0-9]+')" + if [[ "$CURRENT_VERSION" != "$MARIADB_VERSION" ]]; then + msg_info "MariaDB $CURRENT_VERSION found, replacing with $MARIADB_VERSION" + NEED_INSTALL=true + else + msg_ok "MariaDB $MARIADB_VERSION already installed" + fi + else + msg_info "MariaDB not found, installing version $MARIADB_VERSION" + NEED_INSTALL=true + fi + + if [[ "$NEED_INSTALL" == true ]]; then + msg_info "Removing conflicting MariaDB packages" + $STD systemctl stop mariadb >/dev/null 2>&1 || true + $STD apt-get purge -y 'mariadb*' + rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg + + msg_info "Setting up MariaDB Repository" + curl -fsSL "https://mariadb.org/mariadb_release_signing_key.asc" | gpg --dearmor -o /etc/apt/trusted.gpg.d/mariadb.gpg + DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" + echo "deb [signed-by=/etc/apt/trusted.gpg.d/mariadb.gpg] http://mirror.mariadb.org/repo/${MARIADB_VERSION}/debian ${DISTRO_CODENAME} main" \ + > /etc/apt/sources.list.d/mariadb.list + + $STD apt-get update + $STD apt-get install -y mariadb-server mariadb-client + + msg_ok "Installed MariaDB $MARIADB_VERSION" + fi +} + +function install_mysql() { + local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" + local CURRENT_VERSION="" + local NEED_INSTALL=false + + if command -v mysql >/dev/null; then + CURRENT_VERSION="$(mysql --version | grep -oP 'Distrib\s+\K[0-9]+\.[0-9]+')" + if [[ "$CURRENT_VERSION" != "$MYSQL_VERSION" ]]; then + msg_info "MySQL $CURRENT_VERSION found, replacing with $MYSQL_VERSION" + NEED_INSTALL=true + else + msg_ok "MySQL $MYSQL_VERSION already installed" + fi + else + msg_info "MySQL not found, installing version $MYSQL_VERSION" + NEED_INSTALL=true + fi + + if [[ "$NEED_INSTALL" == true ]]; then + msg_info "Removing conflicting MySQL packages" + $STD systemctl stop mysql >/dev/null 2>&1 || true + $STD apt-get purge -y 'mysql*' + rm -f /etc/apt/sources.list.d/mysql.list /etc/apt/trusted.gpg.d/mysql.gpg + + msg_info "Setting up MySQL APT Repository" + DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" + curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | gpg --dearmor -o /etc/apt/trusted.gpg.d/mysql.gpg + echo "deb [signed-by=/etc/apt/trusted.gpg.d/mysql.gpg] https://repo.mysql.com/apt/debian/ ${DISTRO_CODENAME} mysql-${MYSQL_VERSION}" \ + > /etc/apt/sources.list.d/mysql.list + + $STD apt-get update + $STD apt-get install -y mysql-server + + msg_ok "Installed MySQL $MYSQL_VERSION" + fi +} From b96a376f92457050376a09452cdec5408daf2b3f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:21:53 +0200 Subject: [PATCH 0425/1614] Update debian-install.sh --- install/debian-install.sh | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/install/debian-install.sh b/install/debian-install.sh index da3b55b..bed4f72 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -17,18 +17,31 @@ msg_info "Installing Dependencies" $STD apt-get install -y gnupg2 msg_ok "Installed Dependencies" -msg_info "Setup DISTRO env" -DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" -msg_ok "Setup DISTRO" +# Example Setting for Test +NODE_VERSION="20" +NODE_MODULE="pnpm@9.8.1,yarn" -echo -e $DISTRO +PG_VERSION="15" +MARIADB_VERSION="10.11" +MYSQL_VERSION="8.0" -msg_info "Setting up PostgreSQL Repository" -curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg -echo "deb https://apt.postgresql.org/pub/repos/apt ${DISTRO}-pgdg main" >/etc/apt/sources.list.d/pgdg.list -apt-get update -$STD apt-get install -y postgresql -msg_ok "Set up PostgreSQL Repository" +install_node_and_modules +install_postgresql +install_mariadb +install_mysql + +# msg_info "Setup DISTRO env" +# DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" +# msg_ok "Setup DISTRO" + +# echo -e $DISTRO + +# msg_info "Setting up PostgreSQL Repository" +# curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg +# echo "deb https://apt.postgresql.org/pub/repos/apt ${DISTRO}-pgdg main" >/etc/apt/sources.list.d/pgdg.list +# apt-get update +# $STD apt-get install -y postgresql +# msg_ok "Set up PostgreSQL Repository" # msg_info "Setting up Matrix Server" # curl -fsSL https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg -o /usr/share/keyrings/matrix-org-archive-keyring.gpg From 84ad6b86ee13e765460bb692ebd74b19173ae21a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:24:32 +0200 Subject: [PATCH 0426/1614] Update install.func --- misc/install.func | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/install.func b/misc/install.func index 69afe15..8848f90 100644 --- a/misc/install.func +++ b/misc/install.func @@ -446,3 +446,5 @@ fetch_and_deploy_gh_release() { $STD msg_ok "Deployed $app v$version to /opt/$app" rm -rf "$tmpdir" } + +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helpers.func) From d7daf851b9f566c9e5aa726c5532672e5f79d3bf Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 15:25:34 +0200 Subject: [PATCH 0427/1614] Test new version wf --- .github/workflows/get-versions-from-gh.yaml | 76 +++++++++ .github/workflows/scripts/get-gh-release.sh | 39 +++++ .github/workflows/scripts/repos.txt | 168 ++++++++++++++++++++ 3 files changed, 283 insertions(+) create mode 100644 .github/workflows/get-versions-from-gh.yaml create mode 100644 .github/workflows/scripts/get-gh-release.sh create mode 100644 .github/workflows/scripts/repos.txt diff --git a/.github/workflows/get-versions-from-gh.yaml b/.github/workflows/get-versions-from-gh.yaml new file mode 100644 index 0000000..584688c --- /dev/null +++ b/.github/workflows/get-versions-from-gh.yaml @@ -0,0 +1,76 @@ +name: Crawl Versions from newreleases.io + +on: + workflow_dispatch: + schedule: + # Runs at 12:00 AM and 12:00 PM UTC + - cron: "0 0,12 * * *" + +permissions: + contents: write + pull-requests: write + +jobs: + crawl-versions: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + with: + repository: community-scripts/ProxmoxVED + ref: main + + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + + - name: Crawl from newreleases.io + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + scripts/get-gh-release.sh + + - name: Commit JSON + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "GitHub Actions[bot]" + git checkout -b update_versions || git checkout update_versions + git add frontend/public/json/versions.json + if git diff --cached --quiet; then + echo "No changes detected." + echo "changed=false" >> "$GITHUB_ENV" + exit 0 + else + echo "Changes detected:" + git diff --stat --cached + echo "changed=true" >> "$GITHUB_ENV" + fi + git commit -m "Update versions.json" + git push origin update_versions --force + gh pr create --title "[AUTOMATIC PR]Update versions.json" --body "Update versions.json, crawled from newreleases.io" --base main --head update_versions + + - name: Approve pull request + if: env.changed == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_NUMBER=$(gh pr list --head "update_versions" --json number --jq '.[].number') + if [ -n "$PR_NUMBER" ]; then + gh pr review $PR_NUMBER --approve + fi + + - name: Re-approve pull request after update + if: env.changed == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_NUMBER=$(gh pr list --head "update_versions" --json number --jq '.[].number') + if [ -n "$PR_NUMBER" ]; then + gh pr review $PR_NUMBER --approve + fi diff --git a/.github/workflows/scripts/get-gh-release.sh b/.github/workflows/scripts/get-gh-release.sh new file mode 100644 index 0000000..5062d8b --- /dev/null +++ b/.github/workflows/scripts/get-gh-release.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +INPUT_FILE="repos.txt" +OUTPUT_FILE="../../public/frontend/versions.json" +TMP_FILE="releases_tmp.json" + +if [ -f "$OUTPUT_FILE" ]; then + cp "$OUTPUT_FILE" "$TMP_FILE" +else + echo "[]" > "$TMP_FILE" +fi + +while IFS= read -r repo; do + echo "Checking $repo..." + + response=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/${repo}/releases/latest") + tag=$(echo "$response" | jq -r .tag_name) + date=$(echo "$response" | jq -r .published_at) + + if [[ "$tag" == "null" || "$date" == "null" ]]; then + echo "No release found for $repo" + continue + fi + + existing_version=$(jq -r --arg name "$repo" '.[] | select(.name == $name) | .version' "$TMP_FILE") + + if [[ "$existing_version" != "$tag" ]]; then + echo "New release for $repo: $tag" + jq --arg name "$repo" 'del(.[] | select(.name == $name))' "$TMP_FILE" > "$TMP_FILE.tmp" && mv "$TMP_FILE.tmp" "$TMP_FILE" + + jq --arg name "$repo" --arg version "$tag" --arg date "$date" \ + '. += [{"name": $name, "version": $version, "date": $date}]' "$TMP_FILE" > "$TMP_FILE.tmp" && mv "$TMP_FILE.tmp" "$TMP_FILE" + else + echo "No change for $repo" + fi + +done < "$INPUT_FILE" + +mv "$TMP_FILE" "$OUTPUT_FILE" diff --git a/.github/workflows/scripts/repos.txt b/.github/workflows/scripts/repos.txt new file mode 100644 index 0000000..9cb0d65 --- /dev/null +++ b/.github/workflows/scripts/repos.txt @@ -0,0 +1,168 @@ +0xERR0R/blocky +aceberg/WatchYourLAN +actualbudget/actual-server +agl/jbig2enc +alexta69/metube +AlexxIT/go2rtc +apache/tika +ArtifexSoftware/ghostpdl-downloads +Athou/commafeed +authelia/authelia +azukaar/Cosmos-Server +bastienwirtz/homer +benjaminjonard/koillection +benzino77/tasmocompiler +blakeblackshear/frigate +bluenviron/mediamtx +BookStackApp/BookStack +browserless/chrome +Bubka/2FAuth +caddyserver/xcaddy +clusterzx/paperless-ai +cockpit-project/cockpit +community-scripts/ProxmoxVE +CorentinTh/it-tools +dani-garcia/bw_web_builds +dani-garcia/vaultwarden +deepch/RTSPtoWeb +diced/zipline +docker/compose +docmost/docmost +documenso/documenso +Dolibarr/dolibarr +donaldzou/WGDashboard +Donkie/Spoolman +duplicati/duplicati +ellite/wallos +ErsatzTV/ErsatzTV +evcc-io/evcc +excalidraw/excalidraw +Fallenbagel/jellyseerr +firefly-iii/firefly-iii +FlareSolverr/FlareSolverr +Forceu/barcodebuddy +Forceu/Gokapi +FreshRSS/FreshRSS +FunkeyFlo/ps5-mqtt +gethomepage/homepage +glanceapp/glance +glpi-project/glpi +gnmyt/myspeed +go-gitea/gitea +google-coral/test_data +gotify/server +gotson/komga +gristlabs/grist-core +grocy/grocy +hansmi/prometheus-paperless-exporter +hargata/lubelog +heiher/hev-socks5-server +henrygd/beszel +hivemq/hivemq-community-edition +hoarder-app/hoarder +homarr-labs/homarr +hywax/mafl +ie13/jbig2enc +immich-app/immich +inspircd/inspircd +intel-iot-devkit/sample-videos +ipfs/kubo +Jackett/Jackett +janeczku/calibre-web +jhuckaby/Cronicle +juanfont/headscale +Kareadita/Kavita +keycloak/keycloak +kimai/kimai +knadh/listmonk +Koenkk/zigbee2mqtt +Kometa-Team/Kometa +Kozea/Radicale +leiweibau/Pi +libusb/libusb +linkwarden/linkwarden +linuxserver/docker-paperless-ngx +linuxserver/Heimdall +Lissy93/dashy +louislam/uptime-kuma +Luligu/matterbridge +MagicMirrorOrg/MagicMirror +matze/wastebin +maxmind/geoipupdate +MediaBrowser/Emby +meilisearch/meilisearch +mikefarah/yq +minio/minio +monicahq/monica +morpheus65535/bazarr +motioneye-project/motioneye +msgbyte/tianji +mylar3/mylar3 +navidrome/navidrome +netbox-community/netbox +NginxProxyManager/nginx-proxy-manager +NodeBB/NodeBB +ollama/ollama +Ombi-app/Ombi +openobserve/openobserve +openvinotoolkit/open_model_zoo +open-webui/open-webui +paperless-ngx/paperless-ngx +Part-DB/Part-DB-server +paymenter/paymenter +Pf2eToolsOrg/Pf2eTools +pgaskin/kepubify +phpipam/phpipam +pocketbase/pocketbase +pocket-id/pocket-id +PrivateBin/PrivateBin +projectsend/projectsend +prometheus/alertmanager +prometheus/prometheus +prometheus-pve/prometheus-pve-exporter +pymedusa/Medusa +rabbitmq/signing-keys +Requarks/wiki +revenz/Fenrus +rogerfar/rdt-client +rustdesk/rustdesk-server +sabnzbd/sabnzbd +sabre-io/baikal +sbondCo/Watcharr +schlagmichdoch/PairDrop +sct/overseerr +seanmorley15/AdventureLog +searxng/searxng +semaphoreui/semaphore +silverbulletmd/silverbullet +snipe/snipe-it +stackblitz-labs/bolt +Stirling-Tools/Stirling-PDF +stonith404/pingvin-share +Suwayomi/Suwayomi-Server +sysadminsmedia/homebox +TasmoAdmin/TasmoAdmin +Tautulli/Tautulli +thelounge/thelounge-deb +thomiceli/opengist +Threadfin/Threadfin +tobychui/zoraxy +toniebox-reverse-engineering/teddycloud +traccar/traccar +traefik/traefik +trapexit/mergerfs +TriliumNext/Notes +tteck/Proxmox +umami-software/umami +usememos/memos +vabene1111/recipes +ventoy/PXE +VictoriaMetrics/VictoriaMetrics +wavelog/wavelog +wger-project/wger +Y2Z/monolith +yt-dlp/yt-dlp +YuukanOO/seelf +zitadel/zitadel +znerol/prometheus-pve-exporter +zwave-js/zwave-js-ui From 815d5f10e32e9732de1bd7aa7b0e1737d8d3cb66 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 15:27:18 +0200 Subject: [PATCH 0428/1614] Test new version wf --- .github/workflows/get-versions-from-gh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/get-versions-from-gh.yaml b/.github/workflows/get-versions-from-gh.yaml index 584688c..eb62f8e 100644 --- a/.github/workflows/get-versions-from-gh.yaml +++ b/.github/workflows/get-versions-from-gh.yaml @@ -1,4 +1,4 @@ -name: Crawl Versions from newreleases.io +name: Crawl Versions from github on: workflow_dispatch: From 587fb137871035c96fcc767d30d48b563191cf90 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 15:28:35 +0200 Subject: [PATCH 0429/1614] Test new version wf --- .github/workflows/get-versions-from-gh.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/get-versions-from-gh.yaml b/.github/workflows/get-versions-from-gh.yaml index eb62f8e..099ee71 100644 --- a/.github/workflows/get-versions-from-gh.yaml +++ b/.github/workflows/get-versions-from-gh.yaml @@ -28,10 +28,11 @@ jobs: app-id: ${{ vars.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - - name: Crawl from newreleases.io + - name: Crawl from Github API env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + chmod +x scripts/get-gh-release.sh scripts/get-gh-release.sh - name: Commit JSON From 9d306e00a0fb5a5fc8fd012f1d7dd117ba56ea08 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:30:02 +0200 Subject: [PATCH 0430/1614] test --- misc/build.func | 3 +++ misc/install.func | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index c8fe690..2adff7a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1614,3 +1614,6 @@ trap 'exit_script' EXIT trap 'post_update_to_api "failed" "$BASH_COMMAND"' ERR trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM + +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helpers.func) + diff --git a/misc/install.func b/misc/install.func index 8848f90..69afe15 100644 --- a/misc/install.func +++ b/misc/install.func @@ -446,5 +446,3 @@ fetch_and_deploy_gh_release() { $STD msg_ok "Deployed $app v$version to /opt/$app" rm -rf "$tmpdir" } - -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helpers.func) From ea84022bdbef1939de45f909d3eda9f2b43998e5 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 15:30:10 +0200 Subject: [PATCH 0431/1614] Test new version wf --- .github/workflows/get-versions-from-gh.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/get-versions-from-gh.yaml b/.github/workflows/get-versions-from-gh.yaml index 099ee71..a64d775 100644 --- a/.github/workflows/get-versions-from-gh.yaml +++ b/.github/workflows/get-versions-from-gh.yaml @@ -32,6 +32,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + ls chmod +x scripts/get-gh-release.sh scripts/get-gh-release.sh From d0b41e2d8ef5724754f4671dab510c64d9dd24a3 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 15:30:28 +0200 Subject: [PATCH 0432/1614] Test new version wf --- .github/workflows/get-versions-from-gh.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/get-versions-from-gh.yaml b/.github/workflows/get-versions-from-gh.yaml index a64d775..514bf0c 100644 --- a/.github/workflows/get-versions-from-gh.yaml +++ b/.github/workflows/get-versions-from-gh.yaml @@ -33,6 +33,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | ls + chmod +x scripts/get-gh-release.sh scripts/get-gh-release.sh From 34233445593115eedecfedf71e8819339e8fc045 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 15:31:12 +0200 Subject: [PATCH 0433/1614] Test new version wf --- .github/workflows/get-versions-from-gh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/get-versions-from-gh.yaml b/.github/workflows/get-versions-from-gh.yaml index 514bf0c..eab76f5 100644 --- a/.github/workflows/get-versions-from-gh.yaml +++ b/.github/workflows/get-versions-from-gh.yaml @@ -34,7 +34,7 @@ jobs: run: | ls - chmod +x scripts/get-gh-release.sh + chmod +x .github/workflows/scripts/get-gh-release.sh scripts/get-gh-release.sh - name: Commit JSON From 87859f99bd2068470e02d3623841e59789513b91 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 15:32:00 +0200 Subject: [PATCH 0434/1614] WF --- .github/workflows/get-versions-from-gh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/get-versions-from-gh.yaml b/.github/workflows/get-versions-from-gh.yaml index eab76f5..71b6add 100644 --- a/.github/workflows/get-versions-from-gh.yaml +++ b/.github/workflows/get-versions-from-gh.yaml @@ -35,7 +35,7 @@ jobs: ls chmod +x .github/workflows/scripts/get-gh-release.sh - scripts/get-gh-release.sh + .github/workflows/scripts/get-gh-release.sh - name: Commit JSON env: From d00f0aa7f3e184203efd192e2e2cc8c3b1286961 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 15:33:32 +0200 Subject: [PATCH 0435/1614] WF --- .github/workflows/scripts/get-gh-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/get-gh-release.sh b/.github/workflows/scripts/get-gh-release.sh index 5062d8b..af2f7ce 100644 --- a/.github/workflows/scripts/get-gh-release.sh +++ b/.github/workflows/scripts/get-gh-release.sh @@ -1,7 +1,7 @@ #!/bin/bash INPUT_FILE="repos.txt" -OUTPUT_FILE="../../public/frontend/versions.json" +OUTPUT_FILE="public/frontend/versions.json" TMP_FILE="releases_tmp.json" if [ -f "$OUTPUT_FILE" ]; then From 4e6dbefd2d8fc082fd69697d51a0385c96f62a1b Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 10 Apr 2025 15:35:39 +0200 Subject: [PATCH 0436/1614] WF --- .github/workflows/scripts/get-gh-release.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scripts/get-gh-release.sh b/.github/workflows/scripts/get-gh-release.sh index af2f7ce..ddd966d 100644 --- a/.github/workflows/scripts/get-gh-release.sh +++ b/.github/workflows/scripts/get-gh-release.sh @@ -1,7 +1,7 @@ #!/bin/bash -INPUT_FILE="repos.txt" -OUTPUT_FILE="public/frontend/versions.json" +INPUT_FILE=".github/workflows/scripts/repos.txt" +OUTPUT_FILE="frontend/public/json/versions.json" TMP_FILE="releases_tmp.json" if [ -f "$OUTPUT_FILE" ]; then @@ -36,4 +36,4 @@ while IFS= read -r repo; do done < "$INPUT_FILE" -mv "$TMP_FILE" "$OUTPUT_FILE" +#mv "$TMP_FILE" "$OUTPUT_FILE" From d26a192d0e5da699d171190a6eef3eeb6db5518f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:38:33 +0200 Subject: [PATCH 0437/1614] test --- misc/build.func | 2 +- misc/helper.func | 179 +++++++++++++++++++++++++++++++++++++++++++++ misc/helpers.func | 180 ---------------------------------------------- 3 files changed, 180 insertions(+), 181 deletions(-) create mode 100644 misc/helper.func diff --git a/misc/build.func b/misc/build.func index 2adff7a..2053de3 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1615,5 +1615,5 @@ trap 'post_update_to_api "failed" "$BASH_COMMAND"' ERR trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helpers.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) diff --git a/misc/helper.func b/misc/helper.func new file mode 100644 index 0000000..e66ae92 --- /dev/null +++ b/misc/helper.func @@ -0,0 +1,179 @@ +install_node_and_modules() { + local NODE_VERSION="${NODE_VERSION:-22}" + local NODE_MODULE="${NODE_MODULE:-}" + local CURRENT_NODE_VERSION="" + local NEED_NODE_INSTALL=false + + if command -v node >/dev/null; then + CURRENT_NODE_VERSION="$(node -v | grep -oP '^v\K[0-9]+')" + if [[ "$CURRENT_NODE_VERSION" != "$NODE_VERSION" ]]; then + msg_info "Node.js Version $CURRENT_NODE_VERSION found, replacing with $NODE_VERSION" + NEED_NODE_INSTALL=true + fi + else + msg_info "Node.js not found, installing version $NODE_VERSION" + NEED_NODE_INSTALL=true + fi + + if [[ "$NEED_NODE_INSTALL" == true ]]; then + $STD apt-get purge -y nodejs + rm -f /etc/apt/sources.list.d/nodesource.list + rm -f /etc/apt/keyrings/nodesource.gpg + + mkdir -p /etc/apt/keyrings + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \ + gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_VERSION}.x nodistro main" \ + > /etc/apt/sources.list.d/nodesource.list + + $STD apt-get update + $STD apt-get install -y nodejs + msg_ok "Installed Node.js ${NODE_VERSION}" + fi + + if [[ -n "$NODE_MODULE" ]]; then + IFS=',' read -ra MODULES <<< "$NODE_MODULE" + for mod in "${MODULES[@]}"; do + local MODULE_NAME MODULE_REQ_VERSION MODULE_INSTALLED_VERSION + if [[ "$mod" == *"@"* ]]; then + MODULE_NAME="${mod%@*}" + MODULE_REQ_VERSION="${mod#*@}" + else + MODULE_NAME="$mod" + MODULE_REQ_VERSION="latest" + fi + + if npm list -g --depth=0 "$MODULE_NAME" >/dev/null 2>&1; then + MODULE_INSTALLED_VERSION="$(npm list -g --depth=0 "$MODULE_NAME" | grep "$MODULE_NAME@" | awk -F@ '{print $2}' | tr -d '[:space:]')" + if [[ "$MODULE_REQ_VERSION" != "latest" && "$MODULE_REQ_VERSION" != "$MODULE_INSTALLED_VERSION" ]]; then + msg_info "Updating $MODULE_NAME from v$MODULE_INSTALLED_VERSION to v$MODULE_REQ_VERSION" + $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}" + elif [[ "$MODULE_REQ_VERSION" == "latest" ]]; then + msg_info "Updating $MODULE_NAME to latest version" + $STD npm install -g "${MODULE_NAME}@latest" + else + msg_ok "$MODULE_NAME@$MODULE_INSTALLED_VERSION already installed" + fi + else + msg_info "Installing $MODULE_NAME@$MODULE_REQ_VERSION" + $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}" + fi + done + msg_ok "Node Modules processed" + fi +} + +function install_postgresql() { + local PG_VERSION="${PG_VERSION:-15}" + local CURRENT_PG_VERSION="" + local DISTRO + local NEED_PG_INSTALL=false + DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" + + if command -v psql >/dev/null; then + CURRENT_PG_VERSION="$(psql -V | grep -oP '\s\K[0-9]+(?=\.)')" + if [[ "$CURRENT_PG_VERSION" != "$PG_VERSION" ]]; then + msg_info "PostgreSQL Version $CURRENT_PG_VERSION found, replacing with $PG_VERSION" + NEED_PG_INSTALL=true + fi + else + msg_info "PostgreSQL not found, installing version $PG_VERSION" + NEED_PG_INSTALL=true + fi + + if [[ "$NEED_PG_INSTALL" == true ]]; then + msg_info "Stopping PostgreSQL if running" + systemctl stop postgresql >/dev/null 2>&1 || true + + msg_info "Removing conflicting PostgreSQL packages" + $STD apt-get purge -y "postgresql*" + rm -f /etc/apt/sources.list.d/pgdg.list /etc/apt/trusted.gpg.d/postgresql.gpg + + msg_info "Setting up PostgreSQL Repository" + curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ + gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg + + echo "deb https://apt.postgresql.org/pub/repos/apt ${DISTRO}-pgdg main" \ + > /etc/apt/sources.list.d/pgdg.list + + $STD apt-get update + $STD apt-get install -y "postgresql-${PG_VERSION}" + + msg_ok "Installed PostgreSQL ${PG_VERSION}" + fi +} + +function install_mariadb() { + local MARIADB_VERSION="${MARIADB_VERSION:-10.11}" + local CURRENT_VERSION="" + local NEED_INSTALL=false + + if command -v mariadb >/dev/null; then + CURRENT_VERSION="$(mariadb --version | grep -oP 'Ver\s+\K[0-9]+\.[0-9]+')" + if [[ "$CURRENT_VERSION" != "$MARIADB_VERSION" ]]; then + msg_info "MariaDB $CURRENT_VERSION found, replacing with $MARIADB_VERSION" + NEED_INSTALL=true + else + msg_ok "MariaDB $MARIADB_VERSION already installed" + fi + else + msg_info "MariaDB not found, installing version $MARIADB_VERSION" + NEED_INSTALL=true + fi + + if [[ "$NEED_INSTALL" == true ]]; then + msg_info "Removing conflicting MariaDB packages" + $STD systemctl stop mariadb >/dev/null 2>&1 || true + $STD apt-get purge -y 'mariadb*' + rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg + + msg_info "Setting up MariaDB Repository" + curl -fsSL "https://mariadb.org/mariadb_release_signing_key.asc" | gpg --dearmor -o /etc/apt/trusted.gpg.d/mariadb.gpg + DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" + echo "deb [signed-by=/etc/apt/trusted.gpg.d/mariadb.gpg] http://mirror.mariadb.org/repo/${MARIADB_VERSION}/debian ${DISTRO_CODENAME} main" \ + > /etc/apt/sources.list.d/mariadb.list + + $STD apt-get update + $STD apt-get install -y mariadb-server mariadb-client + + msg_ok "Installed MariaDB $MARIADB_VERSION" + fi +} + +function install_mysql() { + local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" + local CURRENT_VERSION="" + local NEED_INSTALL=false + + if command -v mysql >/dev/null; then + CURRENT_VERSION="$(mysql --version | grep -oP 'Distrib\s+\K[0-9]+\.[0-9]+')" + if [[ "$CURRENT_VERSION" != "$MYSQL_VERSION" ]]; then + msg_info "MySQL $CURRENT_VERSION found, replacing with $MYSQL_VERSION" + NEED_INSTALL=true + else + msg_ok "MySQL $MYSQL_VERSION already installed" + fi + else + msg_info "MySQL not found, installing version $MYSQL_VERSION" + NEED_INSTALL=true + fi + + if [[ "$NEED_INSTALL" == true ]]; then + msg_info "Removing conflicting MySQL packages" + $STD systemctl stop mysql >/dev/null 2>&1 || true + $STD apt-get purge -y 'mysql*' + rm -f /etc/apt/sources.list.d/mysql.list /etc/apt/trusted.gpg.d/mysql.gpg + + msg_info "Setting up MySQL APT Repository" + DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" + curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | gpg --dearmor -o /etc/apt/trusted.gpg.d/mysql.gpg + echo "deb [signed-by=/etc/apt/trusted.gpg.d/mysql.gpg] https://repo.mysql.com/apt/debian/ ${DISTRO_CODENAME} mysql-${MYSQL_VERSION}" \ + > /etc/apt/sources.list.d/mysql.list + + $STD apt-get update + $STD apt-get install -y mysql-server + + msg_ok "Installed MySQL $MYSQL_VERSION" + fi +} diff --git a/misc/helpers.func b/misc/helpers.func index f11874a..fc7b437 100644 --- a/misc/helpers.func +++ b/misc/helpers.func @@ -153,183 +153,3 @@ exit-script() { echo -e "\n${CROSS}${RD}User exited script${CL}\n" exit } - -install_node_and_modules() { - local NODE_VERSION="${NODE_VERSION:-22}" - local NODE_MODULE="${NODE_MODULE:-}" - local CURRENT_NODE_VERSION="" - local NEED_NODE_INSTALL=false - - if command -v node >/dev/null; then - CURRENT_NODE_VERSION="$(node -v | grep -oP '^v\K[0-9]+')" - if [[ "$CURRENT_NODE_VERSION" != "$NODE_VERSION" ]]; then - msg_info "Node.js Version $CURRENT_NODE_VERSION found, replacing with $NODE_VERSION" - NEED_NODE_INSTALL=true - fi - else - msg_info "Node.js not found, installing version $NODE_VERSION" - NEED_NODE_INSTALL=true - fi - - if [[ "$NEED_NODE_INSTALL" == true ]]; then - $STD apt-get purge -y nodejs - rm -f /etc/apt/sources.list.d/nodesource.list - rm -f /etc/apt/keyrings/nodesource.gpg - - mkdir -p /etc/apt/keyrings - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \ - gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg - - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_VERSION}.x nodistro main" \ - > /etc/apt/sources.list.d/nodesource.list - - $STD apt-get update - $STD apt-get install -y nodejs - msg_ok "Installed Node.js ${NODE_VERSION}" - fi - - if [[ -n "$NODE_MODULE" ]]; then - IFS=',' read -ra MODULES <<< "$NODE_MODULE" - for mod in "${MODULES[@]}"; do - local MODULE_NAME MODULE_REQ_VERSION MODULE_INSTALLED_VERSION - if [[ "$mod" == *"@"* ]]; then - MODULE_NAME="${mod%@*}" - MODULE_REQ_VERSION="${mod#*@}" - else - MODULE_NAME="$mod" - MODULE_REQ_VERSION="latest" - fi - - if npm list -g --depth=0 "$MODULE_NAME" >/dev/null 2>&1; then - MODULE_INSTALLED_VERSION="$(npm list -g --depth=0 "$MODULE_NAME" | grep "$MODULE_NAME@" | awk -F@ '{print $2}' | tr -d '[:space:]')" - if [[ "$MODULE_REQ_VERSION" != "latest" && "$MODULE_REQ_VERSION" != "$MODULE_INSTALLED_VERSION" ]]; then - msg_info "Updating $MODULE_NAME from v$MODULE_INSTALLED_VERSION to v$MODULE_REQ_VERSION" - $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}" - elif [[ "$MODULE_REQ_VERSION" == "latest" ]]; then - msg_info "Updating $MODULE_NAME to latest version" - $STD npm install -g "${MODULE_NAME}@latest" - else - msg_ok "$MODULE_NAME@$MODULE_INSTALLED_VERSION already installed" - fi - else - msg_info "Installing $MODULE_NAME@$MODULE_REQ_VERSION" - $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}" - fi - done - msg_ok "Node Modules processed" - fi -} - -function install_postgresql() { - local PG_VERSION="${PG_VERSION:-15}" - local CURRENT_PG_VERSION="" - local DISTRO - local NEED_PG_INSTALL=false - DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" - - if command -v psql >/dev/null; then - CURRENT_PG_VERSION="$(psql -V | grep -oP '\s\K[0-9]+(?=\.)')" - if [[ "$CURRENT_PG_VERSION" != "$PG_VERSION" ]]; then - msg_info "PostgreSQL Version $CURRENT_PG_VERSION found, replacing with $PG_VERSION" - NEED_PG_INSTALL=true - fi - else - msg_info "PostgreSQL not found, installing version $PG_VERSION" - NEED_PG_INSTALL=true - fi - - if [[ "$NEED_PG_INSTALL" == true ]]; then - msg_info "Stopping PostgreSQL if running" - systemctl stop postgresql >/dev/null 2>&1 || true - - msg_info "Removing conflicting PostgreSQL packages" - $STD apt-get purge -y "postgresql*" - rm -f /etc/apt/sources.list.d/pgdg.list /etc/apt/trusted.gpg.d/postgresql.gpg - - msg_info "Setting up PostgreSQL Repository" - curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg - - echo "deb https://apt.postgresql.org/pub/repos/apt ${DISTRO}-pgdg main" \ - > /etc/apt/sources.list.d/pgdg.list - - $STD apt-get update - $STD apt-get install -y "postgresql-${PG_VERSION}" - - msg_ok "Installed PostgreSQL ${PG_VERSION}" - fi -} - -function install_mariadb() { - local MARIADB_VERSION="${MARIADB_VERSION:-10.11}" - local CURRENT_VERSION="" - local NEED_INSTALL=false - - if command -v mariadb >/dev/null; then - CURRENT_VERSION="$(mariadb --version | grep -oP 'Ver\s+\K[0-9]+\.[0-9]+')" - if [[ "$CURRENT_VERSION" != "$MARIADB_VERSION" ]]; then - msg_info "MariaDB $CURRENT_VERSION found, replacing with $MARIADB_VERSION" - NEED_INSTALL=true - else - msg_ok "MariaDB $MARIADB_VERSION already installed" - fi - else - msg_info "MariaDB not found, installing version $MARIADB_VERSION" - NEED_INSTALL=true - fi - - if [[ "$NEED_INSTALL" == true ]]; then - msg_info "Removing conflicting MariaDB packages" - $STD systemctl stop mariadb >/dev/null 2>&1 || true - $STD apt-get purge -y 'mariadb*' - rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg - - msg_info "Setting up MariaDB Repository" - curl -fsSL "https://mariadb.org/mariadb_release_signing_key.asc" | gpg --dearmor -o /etc/apt/trusted.gpg.d/mariadb.gpg - DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" - echo "deb [signed-by=/etc/apt/trusted.gpg.d/mariadb.gpg] http://mirror.mariadb.org/repo/${MARIADB_VERSION}/debian ${DISTRO_CODENAME} main" \ - > /etc/apt/sources.list.d/mariadb.list - - $STD apt-get update - $STD apt-get install -y mariadb-server mariadb-client - - msg_ok "Installed MariaDB $MARIADB_VERSION" - fi -} - -function install_mysql() { - local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" - local CURRENT_VERSION="" - local NEED_INSTALL=false - - if command -v mysql >/dev/null; then - CURRENT_VERSION="$(mysql --version | grep -oP 'Distrib\s+\K[0-9]+\.[0-9]+')" - if [[ "$CURRENT_VERSION" != "$MYSQL_VERSION" ]]; then - msg_info "MySQL $CURRENT_VERSION found, replacing with $MYSQL_VERSION" - NEED_INSTALL=true - else - msg_ok "MySQL $MYSQL_VERSION already installed" - fi - else - msg_info "MySQL not found, installing version $MYSQL_VERSION" - NEED_INSTALL=true - fi - - if [[ "$NEED_INSTALL" == true ]]; then - msg_info "Removing conflicting MySQL packages" - $STD systemctl stop mysql >/dev/null 2>&1 || true - $STD apt-get purge -y 'mysql*' - rm -f /etc/apt/sources.list.d/mysql.list /etc/apt/trusted.gpg.d/mysql.gpg - - msg_info "Setting up MySQL APT Repository" - DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" - curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | gpg --dearmor -o /etc/apt/trusted.gpg.d/mysql.gpg - echo "deb [signed-by=/etc/apt/trusted.gpg.d/mysql.gpg] https://repo.mysql.com/apt/debian/ ${DISTRO_CODENAME} mysql-${MYSQL_VERSION}" \ - > /etc/apt/sources.list.d/mysql.list - - $STD apt-get update - $STD apt-get install -y mysql-server - - msg_ok "Installed MySQL $MYSQL_VERSION" - fi -} From 97d75c3ee74dd43c06fd02165919cf12f1a37853 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:49:03 +0200 Subject: [PATCH 0438/1614] Update install.func --- misc/install.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/install.func b/misc/install.func index 69afe15..d5c7b1d 100644 --- a/misc/install.func +++ b/misc/install.func @@ -218,6 +218,7 @@ EOF $STD apt-get update $STD apt-get install -y sudo curl mc msg_ok "Core dependencies installed" + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) } # This function modifies the message of the day (motd) and SSH settings From 8706093d698c9f67d8b730ce6d4caa8b6d3effc1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:58:12 +0200 Subject: [PATCH 0439/1614] Update debian-install.sh --- install/debian-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/debian-install.sh b/install/debian-install.sh index bed4f72..e87137d 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -19,7 +19,7 @@ msg_ok "Installed Dependencies" # Example Setting for Test NODE_VERSION="20" -NODE_MODULE="pnpm@9.8.1,yarn" +NODE_MODULE="pnpm@10.1,yarn" PG_VERSION="15" MARIADB_VERSION="10.11" From 4171e4b8ae44c12ad45519e8390f1382d4de4dc8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 16:05:40 +0200 Subject: [PATCH 0440/1614] Update helper.func --- misc/helper.func | 51 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/misc/helper.func b/misc/helper.func index e66ae92..d1fb221 100644 --- a/misc/helper.func +++ b/misc/helper.func @@ -4,34 +4,52 @@ install_node_and_modules() { local CURRENT_NODE_VERSION="" local NEED_NODE_INSTALL=false + # Check if Node.js is already installed if command -v node >/dev/null; then CURRENT_NODE_VERSION="$(node -v | grep -oP '^v\K[0-9]+')" if [[ "$CURRENT_NODE_VERSION" != "$NODE_VERSION" ]]; then - msg_info "Node.js Version $CURRENT_NODE_VERSION found, replacing with $NODE_VERSION" + msg_info "Node.js version $CURRENT_NODE_VERSION found, replacing with $NODE_VERSION" NEED_NODE_INSTALL=true + else + msg_ok "Node.js $NODE_VERSION already installed" fi else msg_info "Node.js not found, installing version $NODE_VERSION" NEED_NODE_INSTALL=true fi + # Install Node.js if required if [[ "$NEED_NODE_INSTALL" == true ]]; then $STD apt-get purge -y nodejs - rm -f /etc/apt/sources.list.d/nodesource.list - rm -f /etc/apt/keyrings/nodesource.gpg + rm -f /etc/apt/sources.list.d/nodesource.list /etc/apt/keyrings/nodesource.gpg mkdir -p /etc/apt/keyrings - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \ - gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + + if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \ + gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; then + msg_error "Failed to download or import NodeSource GPG key" + exit 1 + fi echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_VERSION}.x nodistro main" \ > /etc/apt/sources.list.d/nodesource.list - $STD apt-get update - $STD apt-get install -y nodejs + if ! apt-get update >/dev/null 2>&1; then + msg_error "Failed to update APT repositories after adding NodeSource" + exit 1 + fi + + if ! apt-get install -y nodejs >/dev/null 2>&1; then + msg_error "Failed to install Node.js ${NODE_VERSION} from NodeSource" + exit 1 + fi + msg_ok "Installed Node.js ${NODE_VERSION}" fi + export NODE_OPTIONS="--max_old_space_size=4096" + + # Install global Node modules if [[ -n "$NODE_MODULE" ]]; then IFS=',' read -ra MODULES <<< "$NODE_MODULE" for mod in "${MODULES[@]}"; do @@ -44,26 +62,37 @@ install_node_and_modules() { MODULE_REQ_VERSION="latest" fi + # Check if the module is already installed if npm list -g --depth=0 "$MODULE_NAME" >/dev/null 2>&1; then MODULE_INSTALLED_VERSION="$(npm list -g --depth=0 "$MODULE_NAME" | grep "$MODULE_NAME@" | awk -F@ '{print $2}' | tr -d '[:space:]')" if [[ "$MODULE_REQ_VERSION" != "latest" && "$MODULE_REQ_VERSION" != "$MODULE_INSTALLED_VERSION" ]]; then msg_info "Updating $MODULE_NAME from v$MODULE_INSTALLED_VERSION to v$MODULE_REQ_VERSION" - $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}" + if ! $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}"; then + msg_error "Failed to update $MODULE_NAME to version $MODULE_REQ_VERSION" + exit 1 + fi elif [[ "$MODULE_REQ_VERSION" == "latest" ]]; then msg_info "Updating $MODULE_NAME to latest version" - $STD npm install -g "${MODULE_NAME}@latest" + if ! $STD npm install -g "${MODULE_NAME}@latest"; then + msg_error "Failed to update $MODULE_NAME to latest version" + exit 1 + fi else msg_ok "$MODULE_NAME@$MODULE_INSTALLED_VERSION already installed" fi else msg_info "Installing $MODULE_NAME@$MODULE_REQ_VERSION" - $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}" + if ! $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}"; then + msg_error "Failed to install $MODULE_NAME@$MODULE_REQ_VERSION" + exit 1 + fi fi done - msg_ok "Node Modules processed" + msg_ok "All requested Node modules have been processed" fi } + function install_postgresql() { local PG_VERSION="${PG_VERSION:-15}" local CURRENT_PG_VERSION="" From 2622703e8be7a78736cfd622901f235bcdee0b40 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 16:16:02 +0200 Subject: [PATCH 0441/1614] Update debian-install.sh --- install/debian-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/debian-install.sh b/install/debian-install.sh index e87137d..bf10167 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -23,12 +23,12 @@ NODE_MODULE="pnpm@10.1,yarn" PG_VERSION="15" MARIADB_VERSION="10.11" -MYSQL_VERSION="8.0" +#MYSQL_VERSION="8.0" install_node_and_modules install_postgresql install_mariadb -install_mysql +#install_mysql # msg_info "Setup DISTRO env" # DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" From 403f08fd637de5a769abd88faf843c18293d2726 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 10 Apr 2025 16:22:12 +0200 Subject: [PATCH 0442/1614] gh function into helper.func --- misc/helper.func | 172 ++++++++++++++++++++++++++++++++++++++++++++++ misc/install.func | 171 --------------------------------------------- 2 files changed, 172 insertions(+), 171 deletions(-) diff --git a/misc/helper.func b/misc/helper.func index d1fb221..1205c68 100644 --- a/misc/helper.func +++ b/misc/helper.func @@ -206,3 +206,175 @@ function install_mysql() { msg_ok "Installed MySQL $MYSQL_VERSION" fi } + +fetch_and_deploy_gh_release() { + local repo="$1" + local app=$(echo ${APPLICATION,,} | tr -d ' ') + local api_url="https://api.github.com/repos/$repo/releases/latest" + local header=() + local attempt=0 + local max_attempts=3 + local api_response tag http_code + local current_version="" + local curl_timeout="--connect-timeout 10 --max-time 30" + + # Check if the app directory exists and if there's a version file + if [[ -f "/opt/${app}_version.txt" ]]; then + current_version=$(cat "/opt/${app}_version.txt") + $STD msg_info "Current version: $current_version" + fi + + # ensure that jq is installed + if ! command -v jq &>/dev/null; then + $STD msg_info "Installing jq..." + apt-get update -qq &>/dev/null + apt-get install -y jq &>/dev/null || { + msg_error "Failed to install jq" + return 1 + } + fi + + [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") + + until [[ $attempt -ge $max_attempts ]]; do + ((attempt++)) || true + $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" + + api_response=$(curl $curl_timeout -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url") + http_code="${api_response:(-3)}" + + if [[ "$http_code" == "404" ]]; then + msg_error "Repository $repo has no Release candidate (404)" + return 1 + fi + + if [[ "$http_code" != "200" ]]; then + $STD msg_info "Request failed with HTTP $http_code, retrying...\n" + sleep $((attempt * 2)) + continue + fi + + api_response=$(/dev/null; then + msg_error "Repository not found: $repo" + return 1 + fi + + tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + + if [[ -z "$tag" ]]; then + $STD msg_info "Empty tag received, retrying...\n" + sleep $((attempt * 2)) + continue + fi + + $STD msg_ok "Found release: $tag for $repo" + break + done + + if [[ -z "$tag" ]]; then + msg_error "Failed to fetch release for $repo after $max_attempts attempts." + exit 1 + fi + + # Version comparison (if we already have this version, skip) + if [[ "$current_version" == "$tag" ]]; then + $STD msg_info "Already running the latest version ($tag). Skipping update." + return 0 + fi + + local version="$tag" + local base_url="https://github.com/$repo/releases/download/v$tag" + local tmpdir + tmpdir=$(mktemp -d) || return 1 + + # Extract list of assets from the Release API + local assets urls + assets=$(echo "$api_response" | jq -r '.assets[].browser_download_url') || true + + # Detect current architecture + local arch + if command -v dpkg &>/dev/null; then + arch=$(dpkg --print-architecture) + elif command -v uname &>/dev/null; then + case "$(uname -m)" in + x86_64) arch="amd64" ;; + aarch64) arch="arm64" ;; + armv7l) arch="armv7" ;; + armv6l) arch="armv6" ;; + *) arch="unknown" ;; + esac + else + arch="unknown" + fi + $STD msg_info "Detected system architecture: $arch" + + # Try to find a matching asset for our architecture + local url="" + for u in $assets; do + if [[ "$u" =~ $arch.*\.tar\.gz$ ]]; then + url="$u" + $STD msg_info "Found matching architecture asset: $url" + break + fi + done + + # Fallback to other architectures if our specific one isn't found + if [[ -z "$url" ]]; then + for u in $assets; do + if [[ "$u" =~ (x86_64|amd64|arm64|armv7|armv6).*\.tar\.gz$ ]]; then + url="$u" + $STD msg_info "Architecture-specific asset not found, using: $url" + break + fi + done + fi + + # Fallback to any tar.gz + if [[ -z "$url" ]]; then + for u in $assets; do + if [[ "$u" =~ \.tar\.gz$ ]]; then + url="$u" + $STD msg_info "Using generic tarball: $url" + break + fi + done + fi + + # Final fallback to GitHub source tarball + if [[ -z "$url" ]]; then + url="https://github.com/$repo/archive/refs/tags/$version.tar.gz" + $STD msg_info "Trying GitHub source tarball fallback: $url" + fi + + local filename="${url##*/}" + $STD msg_info "Downloading $url" + + if ! curl $curl_timeout -fsSL -o "$tmpdir/$filename" "$url"; then + msg_error "Failed to download release asset from $url" + rm -rf "$tmpdir" + return 1 + fi + + mkdir -p "/opt/$app" + + tar -xzf "$tmpdir/$filename" -C "$tmpdir" + local content_root + content_root=$(find "$tmpdir" -mindepth 1 -maxdepth 1 -type d) + if [[ $(echo "$content_root" | wc -l) -eq 1 ]]; then + cp -r "$content_root"/* "/opt/$app/" + else + cp -r "$tmpdir"/* "/opt/$app/" + fi + + echo "$version" >"/opt/${app}_version.txt" + $STD msg_ok "Deployed $app v$version to /opt/$app" + rm -rf "$tmpdir" +} diff --git a/misc/install.func b/misc/install.func index d5c7b1d..5d1bae4 100644 --- a/misc/install.func +++ b/misc/install.func @@ -276,174 +276,3 @@ EOF fi } -fetch_and_deploy_gh_release() { - local repo="$1" - local app=$(echo ${APPLICATION,,} | tr -d ' ') - local api_url="https://api.github.com/repos/$repo/releases/latest" - local header=() - local attempt=0 - local max_attempts=3 - local api_response tag http_code - local current_version="" - local curl_timeout="--connect-timeout 10 --max-time 30" - - # Check if the app directory exists and if there's a version file - if [[ -f "/opt/${app}_version.txt" ]]; then - current_version=$(cat "/opt/${app}_version.txt") - $STD msg_info "Current version: $current_version" - fi - - # ensure that jq is installed - if ! command -v jq &>/dev/null; then - $STD msg_info "Installing jq..." - apt-get update -qq &>/dev/null - apt-get install -y jq &>/dev/null || { - msg_error "Failed to install jq" - return 1 - } - fi - - [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") - - until [[ $attempt -ge $max_attempts ]]; do - ((attempt++)) || true - $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" - - api_response=$(curl $curl_timeout -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url") - http_code="${api_response:(-3)}" - - if [[ "$http_code" == "404" ]]; then - msg_error "Repository $repo has no Release candidate (404)" - return 1 - fi - - if [[ "$http_code" != "200" ]]; then - $STD msg_info "Request failed with HTTP $http_code, retrying...\n" - sleep $((attempt * 2)) - continue - fi - - api_response=$(/dev/null; then - msg_error "Repository not found: $repo" - return 1 - fi - - tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') - [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" - - if [[ -z "$tag" ]]; then - $STD msg_info "Empty tag received, retrying...\n" - sleep $((attempt * 2)) - continue - fi - - $STD msg_ok "Found release: $tag for $repo" - break - done - - if [[ -z "$tag" ]]; then - msg_error "Failed to fetch release for $repo after $max_attempts attempts." - exit 1 - fi - - # Version comparison (if we already have this version, skip) - if [[ "$current_version" == "$tag" ]]; then - $STD msg_info "Already running the latest version ($tag). Skipping update." - return 0 - fi - - local version="$tag" - local base_url="https://github.com/$repo/releases/download/v$tag" - local tmpdir - tmpdir=$(mktemp -d) || return 1 - - # Extract list of assets from the Release API - local assets urls - assets=$(echo "$api_response" | jq -r '.assets[].browser_download_url') || true - - # Detect current architecture - local arch - if command -v dpkg &>/dev/null; then - arch=$(dpkg --print-architecture) - elif command -v uname &>/dev/null; then - case "$(uname -m)" in - x86_64) arch="amd64" ;; - aarch64) arch="arm64" ;; - armv7l) arch="armv7" ;; - armv6l) arch="armv6" ;; - *) arch="unknown" ;; - esac - else - arch="unknown" - fi - $STD msg_info "Detected system architecture: $arch" - - # Try to find a matching asset for our architecture - local url="" - for u in $assets; do - if [[ "$u" =~ $arch.*\.tar\.gz$ ]]; then - url="$u" - $STD msg_info "Found matching architecture asset: $url" - break - fi - done - - # Fallback to other architectures if our specific one isn't found - if [[ -z "$url" ]]; then - for u in $assets; do - if [[ "$u" =~ (x86_64|amd64|arm64|armv7|armv6).*\.tar\.gz$ ]]; then - url="$u" - $STD msg_info "Architecture-specific asset not found, using: $url" - break - fi - done - fi - - # Fallback to any tar.gz - if [[ -z "$url" ]]; then - for u in $assets; do - if [[ "$u" =~ \.tar\.gz$ ]]; then - url="$u" - $STD msg_info "Using generic tarball: $url" - break - fi - done - fi - - # Final fallback to GitHub source tarball - if [[ -z "$url" ]]; then - url="https://github.com/$repo/archive/refs/tags/$version.tar.gz" - $STD msg_info "Trying GitHub source tarball fallback: $url" - fi - - local filename="${url##*/}" - $STD msg_info "Downloading $url" - - if ! curl $curl_timeout -fsSL -o "$tmpdir/$filename" "$url"; then - msg_error "Failed to download release asset from $url" - rm -rf "$tmpdir" - return 1 - fi - - mkdir -p "/opt/$app" - - tar -xzf "$tmpdir/$filename" -C "$tmpdir" - local content_root - content_root=$(find "$tmpdir" -mindepth 1 -maxdepth 1 -type d) - if [[ $(echo "$content_root" | wc -l) -eq 1 ]]; then - cp -r "$content_root"/* "/opt/$app/" - else - cp -r "$tmpdir"/* "/opt/$app/" - fi - - echo "$version" >"/opt/${app}_version.txt" - $STD msg_ok "Deployed $app v$version to /opt/$app" - rm -rf "$tmpdir" -} From 3aa1fd0e9834f09bd8fc50be3633ca0ec715d9f3 Mon Sep 17 00:00:00 2001 From: elvito Date: Thu, 10 Apr 2025 19:03:24 +0200 Subject: [PATCH 0443/1614] Create umlautadaptarr.json --- frontend/public/json/umlautadaptarr.json | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 frontend/public/json/umlautadaptarr.json diff --git a/frontend/public/json/umlautadaptarr.json b/frontend/public/json/umlautadaptarr.json new file mode 100644 index 0000000..a96d2f0 --- /dev/null +++ b/frontend/public/json/umlautadaptarr.json @@ -0,0 +1,34 @@ +{ + "name": "UmlautAdaptarr", + "slug": "umlautadaptarr", + "categories": [ + 0 + ], + "date_created": "2025-04-08", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 5005, + "documentation": null, + "website": "https://github.com/PCJones/UmlautAdaptarr", + "logo": "LINK TO LOGO", + "description": "A tool to work around Sonarr, Radarr, Lidarr and Readarrs problems with foreign languages", + "install_methods": [ + { + "type": "default", + "script": "ct/umlautadaptarr.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "root", + "password": null + }, + "notes": [] +} From 89dc5f6d0b34ed052b6b8a56e36a57209f4c8c6c Mon Sep 17 00:00:00 2001 From: elvito Date: Thu, 10 Apr 2025 19:04:44 +0200 Subject: [PATCH 0444/1614] Create umlautadaptarr --- ct/headers/umlautadaptarr | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 ct/headers/umlautadaptarr diff --git a/ct/headers/umlautadaptarr b/ct/headers/umlautadaptarr new file mode 100644 index 0000000..e382cef --- /dev/null +++ b/ct/headers/umlautadaptarr @@ -0,0 +1,5 @@ + _ _ _ _ _ _ _ + | | | |_ __ | |__ _ _ _| |_ /_\ __| |__ _ _ __| |_ __ _ _ _ _ _ + | |_| | ' \| / _` | || | _|/ _ \/ _` / _` | '_ \ _/ _` | '_| '_| + \___/|_|_|_|_\__,_|\_,_|\__/_/ \_\__,_\__,_| .__/\__\__,_|_| |_| + |_| From aa1451ff26e92fa44934ec18b528eca5e7161ed5 Mon Sep 17 00:00:00 2001 From: elvito Date: Thu, 10 Apr 2025 19:10:03 +0200 Subject: [PATCH 0445/1614] Create umlautadaptarr.sh --- ct/umlautadaptarr.sh | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 ct/umlautadaptarr.sh diff --git a/ct/umlautadaptarr.sh b/ct/umlautadaptarr.sh new file mode 100644 index 0000000..5b672fd --- /dev/null +++ b/ct/umlautadaptarr.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: elvito +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/PCJones/UmlautAdaptarr + +APP="Umlautadaptarr" +var_tags="arr" +var_cpu="1" +var_ram="512" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + # Check if installation is present | -f for file, -d for folder + if [[ ! -f /opt/UmlautAdaptarr/appsettings.json ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP..." + $STD cd /opt/UmlautAdaptarr || exit + $STD git pull origin master + $STD dotnet restore + $STD dotnet build --configuration Release + $STD systemctl restart umlautadaptarr + msg_ok "$APP has been updated." + 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}:[PORT]${CL}" From ffd311356e2d77e3e0b1aa7395c3f206e42fb04b Mon Sep 17 00:00:00 2001 From: elvito Date: Thu, 10 Apr 2025 19:13:18 +0200 Subject: [PATCH 0446/1614] Update umlautadaptarr.sh --- ct/umlautadaptarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/umlautadaptarr.sh b/ct/umlautadaptarr.sh index 5b672fd..960eb92 100644 --- a/ct/umlautadaptarr.sh +++ b/ct/umlautadaptarr.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/refs/heads/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: elvito # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE From 93525897a4b9f161bcb4c4dff201133b4bfe21e4 Mon Sep 17 00:00:00 2001 From: elvito Date: Thu, 10 Apr 2025 19:17:00 +0200 Subject: [PATCH 0447/1614] Create umlautadaptarr-install.sh --- install/umlautadaptarr-install.sh | 133 ++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 install/umlautadaptarr-install.sh diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh new file mode 100644 index 0000000..6884d97 --- /dev/null +++ b/install/umlautadaptarr-install.sh @@ -0,0 +1,133 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: elvito +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/PCJones/UmlautAdaptarr + +# Import Functions und Setup +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +# Installing Dependencies +msg_info "Installing Dependencies" +$STD apt update +$STD apt upgrade -y +$STD wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +$STD dpkg -i packages-microsoft-prod.deb +$STD apt-get update +$STD apt-get install -y \ + curl \ + unzip \ + git \ + dotnet-sdk-8.0 \ + aspnetcore-runtime-8.0 + msg_ok "Installed Dependencies" + +# Building & Installing UA +msg_info "Building & Installing Umlautadaptarr" +$STD git clone https://github.com/PCJones/UmlautAdaptarr.git /opt/ +$STD cd /opt/UmlautAdaptarr +$STD dotnet restore +$STD dotnet build --configuration Release +msg_ok "Installation completed" +# Configure appsettings.json +msg_info "Creating appsettings.json" +cat </opt/UmlautAdaptarr/appsettings.json +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + }, + "Console": { + "TimestampFormat": "yyyy-MM-dd HH:mm:ss::" + } + }, + "AllowedHosts": "*", + "Kestrel": { + "Endpoints": { + "Http": { + "Url": "http://[::]:5005" + } + } + }, + "Settings": { + "UserAgent": "UmlautAdaptarr/1.0", + "UmlautAdaptarrApiHost": "https://umlautadaptarr.pcjones.de/api/v1", + "IndexerRequestsCacheDurationInMinutes": 12 + }, + "Sonarr": [ + { + "Enabled": false, + "Name": "Sonarr", + "Host": "http://192.168.1.100:8989", + "ApiKey": "dein_sonarr_api_key" + } + ], + "Radarr": [ + { + "Enabled": false, + "Name": "Radarr", + "Host": "http://192.168.1.101:7878", + "ApiKey": "dein_radarr_api_key" + } + ], + "Lidarr": [ + { + "Enabled": false, + "Host": "http://192.168.1.102:8686", + "ApiKey": "dein_lidarr_api_key" + }, + ], + "Readarr": [ + { + "Enabled": false, + "Host": "http://192.168.1.103:8787", + "ApiKey": "dein_readarr_api_key" + }, + ], + "IpLeakTest": { + "Enabled": false + } +} +EOF +msg_ok "appsettings.json created" + +# Set up systemd service for UmlautAdaptarr +msg_info "Creating systemd Service" +cat </etc/systemd/system/umlautadaptarr.service +[Unit] +Description=UmlautAdaptarr Service +After=network.target + +[Service] +Type=Core +WorkingDirectory=/opt/UmlautAdaptarr +ExecStart=/usr/bin/dotnet /opt/UmlautAdaptarr/bin/Release/net8.0/UmlautAdaptarr.dll --urls=http://0.0.0.0:5005 +Restart=always +User=root +Group=root +Environment=ASPNETCORE_ENVIRONMENT=Production + +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl daemon-reload +$STD systemctl enable umlautadaptarr.service +$STD systemctl start umlautadaptarr +msg_ok "Created systemd Service" + +motd_ssh +customize + +# Cleanup +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 235364518ad7a8ccb12ec8a8381102334d3aa26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Thu, 10 Apr 2025 15:57:01 -0300 Subject: [PATCH 0448/1614] Create jumpserver.json --- frontend/public/json/jumpserver.json | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 frontend/public/json/jumpserver.json diff --git a/frontend/public/json/jumpserver.json b/frontend/public/json/jumpserver.json new file mode 100644 index 0000000..cf1cdba --- /dev/null +++ b/frontend/public/json/jumpserver.json @@ -0,0 +1,34 @@ +{ + "name": "JumpServer", + "slug": "jumpserver", + "categories": [ + 6 + ], + "date_created": "2025-04-08", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://www.jumpserver.com/docs", + "website": "https://www.jumpserver.com/", + "logo": "https://avatars.githubusercontent.com/u/68588906", + "description": "JumpServer is an open-source Privileged Access Management (PAM) tool that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.", + "install_methods": [ + { + "type": "default", + "script": "ct/jumpserver.sh", + "resources": { + "cpu": 2, + "ram": 8192, + "hdd": 60, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "admin", + "password": "ChangeMe" + }, + "notes": [] +} From 3634a863b98d6289fa91d40cddf24e49a354987f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Thu, 10 Apr 2025 15:57:25 -0300 Subject: [PATCH 0449/1614] Create jumpserver-install.sh --- install/jumpserver-install.sh | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/jumpserver-install.sh diff --git a/install/jumpserver-install.sh b/install/jumpserver-install.sh new file mode 100644 index 0000000..41e7d66 --- /dev/null +++ b/install/jumpserver-install.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Nícolas Pastorello (opastorello) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://jumpserver.com/ + +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 \ + curl \ + tar \ + iptables +msg_ok "Installed Dependencies" + +msg_info "Installing JumpServer" +cd /opt +RELEASE=$(curl -fsSL https://api.github.com/repos/jumpserver/installer/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/') +curl -fsSL "https://github.com/jumpserver/installer/releases/download/${RELEASE}/jumpserver-installer-${RELEASE}.tar.gz" -o jumpserver-installer-${RELEASE}.tar.gz +$STD mkdir -p /opt/jumpserver +$STD tar -xzvf jumpserver-installer-${RELEASE}.tar.gz -C /opt/jumpserver --strip-components=1 +cd /opt/jumpserver +$STD ./jmsctl.sh install </opt/${APP}_version.txt +msg_ok "Installed JumpServer" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/jumpserver-installer-${RELEASE}.tar.gz +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 6b02f6cf96de270a617fffd1aaf790550b2678fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Thu, 10 Apr 2025 15:57:43 -0300 Subject: [PATCH 0450/1614] Create jumpserver.sh --- ct/jumpserver.sh | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 ct/jumpserver.sh diff --git a/ct/jumpserver.sh b/ct/jumpserver.sh new file mode 100644 index 0000000..4501ed9 --- /dev/null +++ b/ct/jumpserver.sh @@ -0,0 +1,67 @@ +#!/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: Nícolas Pastorello (opastorello) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://jumpserver.com/ + +APP="JumpServer" +var_tags="bastion-host;pam" +var_cpu="2" +var_ram="8192" +var_disk="60" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/jumpserver ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -fsSL https://api.github.com/repos/jumpserver/installer/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Updating ${APP} to ${RELEASE}" + if [[ -d /opt/jumpserver/config ]]; then + msg_info "Backing up /opt/jumpserver/config" + cp -r /opt/jumpserver/config /opt/jumpserver_config_backup + fi + echo "${RELEASE}" >/opt/${APP}_version.txt + rm -rf /opt/jumpserver + cd /opt + curl -fsSL "https://github.com/jumpserver/installer/releases/download/${RELEASE}/jumpserver-installer-${RELEASE}.tar.gz" -o jumpserver-installer-${RELEASE}.tar.gz + $STD mkdir -p /opt/jumpserver + $STD tar -xzvf jumpserver-installer-${RELEASE}.tar.gz -C /opt/jumpserver --strip-components=1 + if [[ -d /opt/jumpserver_config_backup ]]; then + msg_info "Restoring config backup" + cp -r /opt/jumpserver_config_backup /opt/jumpserver/config + rm -rf /opt/jumpserver_config_backup + fi + cd /opt/jumpserver + yes y | head -n 3 | $STD ./jmsctl.sh upgrade + $STD ./jmsctl.sh start + rm -rf /opt/jumpserver-installer-${RELEASE}.tar.gz + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}." + 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}:80${CL}" From 686e3217cf70ee8987c1fe645caaa2d3a35029a3 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 10 Apr 2025 23:33:49 +0200 Subject: [PATCH 0451/1614] Add alpine rclone script --- ct/alpine-rclone.sh | 54 ++++++++++++++++++++++++++++ install/alpine-rclone-install.sh | 62 ++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 ct/alpine-rclone.sh create mode 100644 install/alpine-rclone-install.sh diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh new file mode 100644 index 0000000..ddf33c5 --- /dev/null +++ b/ct/alpine-rclone.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/rclone/rclone + +APP="Alpine-rclone" +var_tags="${var_tags:-alpine;development}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-0.2}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [ ! -d /opt/rclone ]; then + msg_error "No ${APP} Installation Found!" + exit 1 + fi + + RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then + msg_info "Updating ${APP} LXC" + temp_file=$(mktemp) + curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file + $STD unzip -j -o $temp_file '*/**' -d /opt/rclone + rm -f $temp_file + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + + exit 0 +} + +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 IP:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh new file mode 100644 index 0000000..43d57f2 --- /dev/null +++ b/install/alpine-rclone-install.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/rclone/rclone + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing dependencies" +$STD apk add --no-cache \ + unzip \ + apache2-utils +msg_ok "Installed dependencies" + +msg_info "Installing rclone" +temp_file=$(mktemp) +mkdir -p /opt/rclone +RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file +unzip -j $temp_file '*/**' -d /opt/rclone +cd /opt/rclone +PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) +htpasswd -cb -B login.pwd admin $PASSWORD +{ + echo "rclone-Credentials" + echo "rclone User Name: admin" + echo "rclone Password: $PASSWORD" +} >>~/rclone.creds +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +rm -f $temp_file +msg_ok "Installed rclone" + +msg_info "Enabling rclone Service" +cat </etc/init.d/rclone +#!/sbin/openrc-run +description="rclone Service" +command="/opt/rclone/rclone" +command_args="rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-htpasswd /opt/rclone/login.pwd" +command_user="root" +pidfile="/var/run/rclone.pid" + +depend() { + use net +} +EOF +chmod +x /etc/init.d/rclone +$STD rc-update add rclone default +msg_ok "Enabled rclone Service" + +msg_info "Starting rclone" +$STD service rclone start +msg_ok "Started rclone" + +motd_ssh +customize From e04a478a27460685a91e8888f75c7586dfa92d77 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 10 Apr 2025 23:38:56 +0200 Subject: [PATCH 0452/1614] Update alpine rclone script --- ct/alpine-rclone.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index ddf33c5..d3b140e 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -6,7 +6,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # Source: https://github.com/rclone/rclone APP="Alpine-rclone" -var_tags="${var_tags:-alpine;development}" +var_tags="${var_tags:-alpine;backup}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-256}" var_disk="${var_disk:-0.2}" @@ -36,6 +36,7 @@ function update_script() { curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file $STD unzip -j -o $temp_file '*/**' -d /opt/rclone rm -f $temp_file + echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Updated Successfully" else msg_ok "No update required. ${APP} is already at ${RELEASE}" From 7ee3bdcf10b13595fe4ba1fdf13eafb9ae67b4ac Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 10 Apr 2025 23:43:12 +0200 Subject: [PATCH 0453/1614] Update rclone --- ct/alpine-rclone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index d3b140e..3fa00c6 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -5,7 +5,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/rclone/rclone -APP="Alpine-rclone" +APP="rclone" var_tags="${var_tags:-alpine;backup}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-256}" From a83ebbc7de9c1521ca89ef908a78a72b789d62c8 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 10 Apr 2025 23:51:03 +0200 Subject: [PATCH 0454/1614] Update rclone --- ct/alpine-rclone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index 3fa00c6..d3b140e 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -5,7 +5,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/rclone/rclone -APP="rclone" +APP="Alpine-rclone" var_tags="${var_tags:-alpine;backup}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-256}" From 99e29d7169a7f4e21d80cd8b4dc9ccab63180df7 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 10 Apr 2025 23:54:02 +0200 Subject: [PATCH 0455/1614] Add alpine rclone header --- ct/headers/alpine-rclone.cs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/alpine-rclone.cs diff --git a/ct/headers/alpine-rclone.cs b/ct/headers/alpine-rclone.cs new file mode 100644 index 0000000..4aea584 --- /dev/null +++ b/ct/headers/alpine-rclone.cs @@ -0,0 +1,6 @@ + ____ __ + / __ \_____/ /___ ____ ___ + / /_/ / ___/ / __ \/ __ \/ _ \ + / _, _/ /__/ / /_/ / / / / __/ +/_/ |_|\___/_/\____/_/ /_/\___/ + From 05bf942d507192e902dd7f4eb90a7bd2269ef206 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 10 Apr 2025 23:56:00 +0200 Subject: [PATCH 0456/1614] Update rclone header --- ct/headers/{alpine-rclone.cs => alpine-rclone} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/headers/{alpine-rclone.cs => alpine-rclone} (100%) diff --git a/ct/headers/alpine-rclone.cs b/ct/headers/alpine-rclone similarity index 100% rename from ct/headers/alpine-rclone.cs rename to ct/headers/alpine-rclone From 893b6865db62aaba1cb9872290c74f03693a4106 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 10 Apr 2025 23:59:54 +0200 Subject: [PATCH 0457/1614] Update rclone --- install/alpine-rclone-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index 43d57f2..4287c4e 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -24,10 +24,10 @@ temp_file=$(mktemp) mkdir -p /opt/rclone RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file -unzip -j $temp_file '*/**' -d /opt/rclone +$STD unzip -j $temp_file '*/**' -d /opt/rclone cd /opt/rclone PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) -htpasswd -cb -B login.pwd admin $PASSWORD +$STD htpasswd -cb -B login.pwd admin $PASSWORD { echo "rclone-Credentials" echo "rclone User Name: admin" @@ -43,6 +43,7 @@ cat </etc/init.d/rclone description="rclone Service" command="/opt/rclone/rclone" command_args="rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-htpasswd /opt/rclone/login.pwd" +command_background="yes" command_user="root" pidfile="/var/run/rclone.pid" From 9f30ea647565b756cd11a47d91216f16a546707b Mon Sep 17 00:00:00 2001 From: tremor021 Date: Fri, 11 Apr 2025 00:12:30 +0200 Subject: [PATCH 0458/1614] Fix rclone service file --- install/alpine-rclone-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index 4287c4e..c919b53 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -43,7 +43,7 @@ cat </etc/init.d/rclone description="rclone Service" command="/opt/rclone/rclone" command_args="rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-htpasswd /opt/rclone/login.pwd" -command_background="yes" +command_background="true" command_user="root" pidfile="/var/run/rclone.pid" From 0cf463c2caf230900b8e1cfd19aa6fd3a012fedd Mon Sep 17 00:00:00 2001 From: tremor021 Date: Fri, 11 Apr 2025 00:25:12 +0200 Subject: [PATCH 0459/1614] Add rclone json --- frontend/public/json/alpine-rclone.json | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 frontend/public/json/alpine-rclone.json diff --git a/frontend/public/json/alpine-rclone.json b/frontend/public/json/alpine-rclone.json new file mode 100644 index 0000000..dc798d1 --- /dev/null +++ b/frontend/public/json/alpine-rclone.json @@ -0,0 +1,50 @@ +{ + "name": "Alpine-rclone", + "slug": "alpine-rclone", + "categories": [ + 20 + ], + "date_created": "2025-04-11", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://rclone.org/docs/", + "website": "https://rclone.org/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/rclone.svg", + "description": "Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces", + "install_methods": [ + { + "type": "default", + "script": "ct/alpine-rclone.sh", + "resources": { + "cpu": 1, + "ram": 256, + "hdd": 0.2, + "os": "alpine", + "version": "3.21" + } + }, + { + "type": "alpine", + "script": "ct/alpine-rclone.sh", + "resources": { + "cpu": 1, + "ram": 256, + "hdd": 0.2, + "os": "alpine", + "version": "3.21" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "type": "info", + "text": "`cat ~/rclone.creds` to view login credentials" + } + ] +} From dda78c99718f3a1eeea4c7dbee4734288410d522 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Fri, 11 Apr 2025 00:55:21 +0200 Subject: [PATCH 0460/1614] Update json --- frontend/public/json/alpine-rclone.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/public/json/alpine-rclone.json b/frontend/public/json/alpine-rclone.json index dc798d1..2bd2b85 100644 --- a/frontend/public/json/alpine-rclone.json +++ b/frontend/public/json/alpine-rclone.json @@ -45,6 +45,10 @@ { "type": "info", "text": "`cat ~/rclone.creds` to view login credentials" + }, + { + "type": "info", + "text": "`htpasswd -b -B /opt/rclone/login.pwd newuser newuserpassword` to add more users." } ] } From d5c4bb67c2e4c13b6b64aac8cd3310c9d2417cd8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:26:50 +0200 Subject: [PATCH 0461/1614] source in customize --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index 5d1bae4..65e52c6 100644 --- a/misc/install.func +++ b/misc/install.func @@ -218,7 +218,6 @@ EOF $STD apt-get update $STD apt-get install -y sudo curl mc msg_ok "Core dependencies installed" - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) } # This function modifies the message of the day (motd) and SSH settings @@ -274,5 +273,6 @@ EOF chmod 700 /root/.ssh chmod 600 /root/.ssh/authorized_keys fi + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) } From 2b0fa2d07becb28b9b726d74d2547ca82c05bfc9 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:41:46 +0200 Subject: [PATCH 0462/1614] Update build.func --- misc/build.func | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index 2053de3..4f9f9e8 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1342,7 +1342,7 @@ get_gh_release() { } start() { - #source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/github.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" @@ -1615,5 +1615,3 @@ trap 'post_update_to_api "failed" "$BASH_COMMAND"' ERR trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) - From 6daff61ca22b637388ce565b50ed86b7111fb06c Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 08:44:05 +0200 Subject: [PATCH 0463/1614] Helper function --- misc/helpers.func | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/misc/helpers.func b/misc/helpers.func index fc7b437..f648316 100644 --- a/misc/helpers.func +++ b/misc/helpers.func @@ -104,7 +104,7 @@ root_check() { } pve_check() { - if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-9](\.[0-9]+)*"; then msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -136,17 +136,6 @@ ssh_check() { fi } -start_script() { - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} exit-script() { clear From d16ec63aa35b8797e947236ec287b3c489fe95c5 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 08:48:38 +0200 Subject: [PATCH 0464/1614] Switch to helper file --- misc/build.func | 226 +------------------------------------- misc/helpers.func | 270 ++++++++++++++++++++++++++++------------------ 2 files changed, 169 insertions(+), 327 deletions(-) diff --git a/misc/build.func b/misc/build.func index 4f9f9e8..514bed7 100644 --- a/misc/build.func +++ b/misc/build.func @@ -13,61 +13,13 @@ variables() { METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. } - source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) - -# This function sets various color variables using ANSI escape codes for formatting text in the terminal. -color() { - # Colors - YW=$(echo "\033[33m") - YWB=$(echo "\033[93m") - BL=$(echo "\033[36m") - RD=$(echo "\033[01;31m") - BGN=$(echo "\033[4;92m") - GN=$(echo "\033[1;92m") - DGN=$(echo "\033[32m") - - # Formatting - CL=$(echo "\033[m") - BOLD=$(echo "\033[1m") - HOLD=" " - TAB=" " - - # Icons - CM="${TAB}✔️${TAB}" - CROSS="${TAB}✖️${TAB}${CL}" - INFO="${TAB}💡${TAB}${CL}" - OS="${TAB}🖥️${TAB}${CL}" - OSVERSION="${TAB}🌟${TAB}${CL}" - CONTAINERTYPE="${TAB}📦${TAB}${CL}" - DISKSIZE="${TAB}💾${TAB}${CL}" - CPUCORE="${TAB}🧠${TAB}${CL}" - RAMSIZE="${TAB}🛠️${TAB}${CL}" - SEARCH="${TAB}🔍${TAB}${CL}" - VERBOSE_CROPPED="🔍${TAB}" - VERIFYPW="${TAB}🔐${TAB}${CL}" - CONTAINERID="${TAB}🆔${TAB}${CL}" - HOSTNAME="${TAB}🏠${TAB}${CL}" - BRIDGE="${TAB}🌉${TAB}${CL}" - NETWORK="${TAB}📡${TAB}${CL}" - GATEWAY="${TAB}🌐${TAB}${CL}" - DISABLEIPV6="${TAB}🚫${TAB}${CL}" - DEFAULT="${TAB}⚙️${TAB}${CL}" - MACADDRESS="${TAB}🔗${TAB}${CL}" - VLANTAG="${TAB}🏷️${TAB}${CL}" - ROOTSSH="${TAB}🔑${TAB}${CL}" - CREATING="${TAB}🚀${TAB}${CL}" - ADVANCED="${TAB}🧩${TAB}${CL}" - FUSE="${TAB}🔧${TAB}${CL}" -} - -# This function enables error handling in the script by setting options and defining a trap for the ERR signal. +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helpers.func) catch_errors() { set -Eeuo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } -# 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://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi @@ -84,127 +36,8 @@ error_handler() { echo -e "\n$error_message\n" } -# This function displays an informational message with logging support. -declare -A MSG_INFO_SHOWN -SPINNER_ACTIVE=0 -SPINNER_PID="" -SPINNER_MSG="" - trap 'stop_spinner' EXIT INT TERM HUP -start_spinner() { - local msg="$1" - local frames=(⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏) - local spin_i=0 - local interval=0.1 - - SPINNER_MSG="$msg" - printf "\r\e[2K" >&2 - - { - while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do - printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 - spin_i=$(((spin_i + 1) % ${#frames[@]})) - sleep "$interval" - done - } & - - SPINNER_PID=$! - disown "$SPINNER_PID" -} - -stop_spinner() { - if [[ ${SPINNER_PID+v} && -n "$SPINNER_PID" ]] && kill -0 "$SPINNER_PID" 2>/dev/null; then - kill "$SPINNER_PID" 2>/dev/null - sleep 0.1 - kill -0 "$SPINNER_PID" 2>/dev/null && kill -9 "$SPINNER_PID" 2>/dev/null - wait "$SPINNER_PID" 2>/dev/null || true - fi - SPINNER_ACTIVE=0 - unset SPINNER_PID -} - -spinner_guard() { - if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "$SPINNER_PID" ]]; then - kill "$SPINNER_PID" 2>/dev/null - wait "$SPINNER_PID" 2>/dev/null || true - SPINNER_ACTIVE=0 - unset SPINNER_PID - fi -} - -msg_info() { - local msg="$1" - [[ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]] && return - MSG_INFO_SHOWN["$msg"]=1 - - spinner_guard - SPINNER_ACTIVE=1 - start_spinner "$msg" -} - -msg_ok() { - local msg="$1" - stop_spinner - printf "\r\e[2K%s %b\n" "${CM}" "${GN}${msg}${CL}" >&2 - unset MSG_INFO_SHOWN["$msg"] -} - -msg_error() { - stop_spinner - local msg="$1" - printf "\r\e[2K%s %b\n" "${CROSS}" "${RD}${msg}${CL}" >&2 - log_message "ERROR" "$msg" -} - -log_message() { - local level="$1" - local message="$2" - local timestamp - local logdate - timestamp=$(date '+%Y-%m-%d %H:%M:%S') - logdate=$(date '+%Y-%m-%d') - - LOGDIR="/usr/local/community-scripts/logs" - mkdir -p "$LOGDIR" - - LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log" - echo "$timestamp - $level: $message" >>"$LOGFILE" -} - -# Check if the shell is using bash -shell_check() { - if [[ "$(basename "$SHELL")" != "bash" ]]; then - clear - msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell." - echo -e "\nExiting..." - sleep 2 - exit - fi -} - -# Run as root only -root_check() { - if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then - clear - msg_error "Please run this script as root." - echo -e "\nExiting..." - sleep 2 - exit - fi -} - -# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. -pve_check() { - if ! pveversion | grep -Eq "pve-manager/8\.[1-9](\.[0-9]+)*"; then - msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" - echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." - echo -e "Exiting..." - sleep 2 - exit - fi -} - # When a node is running tens of containers, it's possible to exceed the kernel's cryptographic key storage allocations. # These are tuneable, so verify if the currently deployment is approaching the limits, advise the user on how to tune the limits, and exit the script. # https://cleveruptime.com/docs/files/proc-key-users | https://docs.kernel.org/security/keys/core.html @@ -251,17 +84,6 @@ maxkeys_check() { echo -e "${CM}${GN} All kernel key limits are within safe thresholds.${CL}" } -# This function checks the system architecture and exits if it's not "amd64". -arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" - echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} - # Function to get the current IP address based on the distribution get_current_ip() { if [ -f /etc/os-release ]; then @@ -328,29 +150,6 @@ header_info() { echo "$header_content" } -# This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit. -ssh_check() { - if [[ -n "${SSH_CLIENT:+x}" ]]; then - dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "SSH DETECTED" \ - --yesno "It's advisable to utilize the Proxmox shell rather than SSH,\nas there may be potential complications with variable retrieval.\n\nProceed using SSH?" 12 72 \ - --ok-label "Yes" --cancel-label "No" - - case $? in - 0) - dialog --backtitle "[dev] Proxmox VE Helper Scripts" \ - --title "Proceed using SSH" \ - --msgbox "You've chosen to proceed using SSH.\n\nIf any issues arise, please run the script in the Proxmox shell before creating a repository issue." 10 72 - ;; - 1 | 255) - clear - printf "%s\n" "Exiting due to SSH usage. Please consider using the Proxmox shell." - exit - ;; - esac - fi -} - base_settings() { # Default Settings CT_TYPE="1" @@ -423,13 +222,6 @@ echo_default() { echo -e " " } -# This function is called when the user decides to exit the script. It clears the screen and displays an exit message. -exit_script() { - clear - echo -e "\n${CROSS}${RD}User exited script${CL}\n" - exit -} - # This function allows the user to configure advanced settings for the script. advanced_settings() { whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 @@ -1558,22 +1350,7 @@ EOF post_update_to_api "done" "none" } -set_std_mode() { - if [ "$VERB" = "yes" ]; then - STD="" - else - STD="silent" - fi -} - # Silent execution function -silent() { - if [ "$VERB" = "no" ]; then - "$@" >>"$LOGFILE" 2>&1 - else - "$@" 2>&1 | tee -a "$LOGFILE" - fi -} # 26.03.2025 disabled #exit_script() { @@ -1614,4 +1391,3 @@ trap 'exit_script' EXIT trap 'post_update_to_api "failed" "$BASH_COMMAND"' ERR trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM - diff --git a/misc/helpers.func b/misc/helpers.func index f648316..ddabc17 100644 --- a/misc/helpers.func +++ b/misc/helpers.func @@ -2,143 +2,209 @@ # Author: michelroegl-brunner # License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/LICENSE -colors() { +color() { + # Colors + YW=$(echo "\033[33m") + YWB=$(echo "\033[93m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") - YW=$(echo "\033[33m") - BL=$(echo "\033[36m") - RD=$(echo "\033[01;31m") - BGN=$(echo "\033[4;92m") - GN=$(echo "\033[1;92m") - DGN=$(echo "\033[32m") - CL=$(echo "\033[m") - - CL=$(echo "\033[m") - BOLD=$(echo "\033[1m") - BFR="\\r\\033[K" - HOLD=" " - TAB=" " - - CM="${TAB}✔️${TAB}${CL}" - CROSS="${TAB}✖️${TAB}${CL}" - INFO="${TAB}💡${TAB}${CL}" - OS="${TAB}🖥️${TAB}${CL}" - CONTAINERTYPE="${TAB}📦${TAB}${CL}" - DISKSIZE="${TAB}💾${TAB}${CL}" - CPUCORE="${TAB}🧠${TAB}${CL}" - RAMSIZE="${TAB}🛠️${TAB}${CL}" - CONTAINERID="${TAB}🆔${TAB}${CL}" - HOSTNAME="${TAB}🏠${TAB}${CL}" - BRIDGE="${TAB}🌉${TAB}${CL}" - GATEWAY="${TAB}🌐${TAB}${CL}" - DEFAULT="${TAB}⚙️${TAB}${CL}" - MACADDRESS="${TAB}🔗${TAB}${CL}" - VLANTAG="${TAB}🏷️${TAB}${CL}" - CREATING="${TAB}🚀${TAB}${CL}" - ADVANCED="${TAB}🧩${TAB}${CL}" + # Formatting + CL=$(echo "\033[m") + BOLD=$(echo "\033[1m") + HOLD=" " + TAB=" " + # Icons + CM="${TAB}✔️${TAB}" + CROSS="${TAB}✖️${TAB}${CL}" + INFO="${TAB}💡${TAB}${CL}" + OS="${TAB}🖥️${TAB}${CL}" + OSVERSION="${TAB}🌟${TAB}${CL}" + CONTAINERTYPE="${TAB}📦${TAB}${CL}" + DISKSIZE="${TAB}💾${TAB}${CL}" + CPUCORE="${TAB}🧠${TAB}${CL}" + RAMSIZE="${TAB}🛠️${TAB}${CL}" + SEARCH="${TAB}🔍${TAB}${CL}" + VERBOSE_CROPPED="🔍${TAB}" + VERIFYPW="${TAB}🔐${TAB}${CL}" + CONTAINERID="${TAB}🆔${TAB}${CL}" + HOSTNAME="${TAB}🏠${TAB}${CL}" + BRIDGE="${TAB}🌉${TAB}${CL}" + NETWORK="${TAB}📡${TAB}${CL}" + GATEWAY="${TAB}🌐${TAB}${CL}" + DISABLEIPV6="${TAB}🚫${TAB}${CL}" + DEFAULT="${TAB}⚙️${TAB}${CL}" + MACADDRESS="${TAB}🔗${TAB}${CL}" + VLANTAG="${TAB}🏷️${TAB}${CL}" + ROOTSSH="${TAB}🔑${TAB}${CL}" + CREATING="${TAB}🚀${TAB}${CL}" + ADVANCED="${TAB}🧩${TAB}${CL}" + FUSE="${TAB}🔧${TAB}${CL}" } +declare -A MSG_INFO_SHOWN +SPINNER_ACTIVE=0 +SPINNER_PID="" +SPINNER_MSG="" + start_spinner() { - local msg="$1" - local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') - local spin_i=0 - local interval=0.1 - local term_width=$(tput cols) + local msg="$1" + local frames=(⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏) + local spin_i=0 + local interval=0.1 - { - while [ "${SPINNER_ACTIVE:-1}" -eq 1 ]; do - printf "\r\e[2K${frames[spin_i]} ${YW}%b${CL}" "$msg" >&2 - spin_i=$(((spin_i + 1) % ${#frames[@]})) - sleep "$interval" - done - } & + SPINNER_MSG="$msg" + printf "\r\e[2K" >&2 - SPINNER_PID=$! + { + while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do + printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 + spin_i=$(((spin_i + 1) % ${#frames[@]})) + sleep "$interval" + done + } & + + SPINNER_PID=$! + disown "$SPINNER_PID" +} + +stop_spinner() { + if [[ ${SPINNER_PID+v} && -n "$SPINNER_PID" ]] && kill -0 "$SPINNER_PID" 2>/dev/null; then + kill "$SPINNER_PID" 2>/dev/null + sleep 0.1 + kill -0 "$SPINNER_PID" 2>/dev/null && kill -9 "$SPINNER_PID" 2>/dev/null + wait "$SPINNER_PID" 2>/dev/null || true + fi + SPINNER_ACTIVE=0 + unset SPINNER_PID +} + +spinner_guard() { + if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "$SPINNER_PID" ]]; then + kill "$SPINNER_PID" 2>/dev/null + wait "$SPINNER_PID" 2>/dev/null || true + SPINNER_ACTIVE=0 + unset SPINNER_PID + fi } msg_info() { - local msg="$1" - if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then - return - fi + local msg="$1" + if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then + return + fi - SPINNER_ACTIVE=1 - start_spinner "$msg" + SPINNER_ACTIVE=1 + start_spinner "$msg" } msg_ok() { - if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill "$SPINNER_PID" >/dev/null 2>&1 - wait "$SPINNER_PID" 2>/dev/null || true - fi + if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill "$SPINNER_PID" >/dev/null 2>&1 + wait "$SPINNER_PID" 2>/dev/null || true + fi - local msg="$1" - printf "\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 - unset SPINNER_PID - SPINNER_ACTIVE=0 + local msg="$1" + printf "\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 + unset SPINNER_PID + SPINNER_ACTIVE=0 - log_message "OK" "$msg" + log_message "OK" "$msg" } msg_error() { - if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill "$SPINNER_PID" >/dev/null 2>&1 - wait "$SPINNER_PID" 2>/dev/null || true - fi + if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill "$SPINNER_PID" >/dev/null 2>&1 + wait "$SPINNER_PID" 2>/dev/null || true + fi - local msg="$1" - printf "\r\e[2K${CROSS}${RD}%b${CL}\n" "$msg" >&2 - unset SPINNER_PID - SPINNER_ACTIVE=0 - log_message "ERROR" "$msg" + local msg="$1" + printf "\r\e[2K${CROSS}${RD}%b${CL}\n" "$msg" >&2 + unset SPINNER_PID + SPINNER_ACTIVE=0 + log_message "ERROR" "$msg" } root_check() { - if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then - clear - msg_error "Please run this script as root." - echo -e "\nExiting..." - sleep 2 - exit - fi + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi } pve_check() { - if ! pveversion | grep -Eq "pve-manager/8\.[1-9](\.[0-9]+)*"; then - msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" - echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." - echo -e "Exiting..." - sleep 2 - exit - fi + if ! pveversion | grep -Eq "pve-manager/8\.[1-9](\.[0-9]+)*"; then + msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." + echo -e "Exiting..." + sleep 2 + exit + fi } arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" - echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" - echo -e "Exiting..." - sleep 2 - exit - fi + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" + echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" + echo -e "Exiting..." + sleep 2 + exit + fi } ssh_check() { - if command -v pveversion >/dev/null 2>&1; then - if [ -n "${SSH_CLIENT:+x}" ]; then - if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then - echo "you've been warned" - else - clear - exit - fi - fi + if command -v pveversion >/dev/null 2>&1; then + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi fi + fi } +log_message() { + local level="$1" + local message="$2" + local timestamp + local logdate + timestamp=$(date '+%Y-%m-%d %H:%M:%S') + logdate=$(date '+%Y-%m-%d') + + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" + + LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log" + echo "$timestamp - $level: $message" >>"$LOGFILE" +} exit-script() { - clear - echo -e "\n${CROSS}${RD}User exited script${CL}\n" - exit + clear + echo -e "\n${CROSS}${RD}User exited script${CL}\n" + exit +} + +set_std_mode() { + if [ "$VERB" = "yes" ]; then + STD="" + else + STD="silent" + fi +} + +silent() { + if [ "$VERB" = "no" ]; then + "$@" >>"$LOGFILE" 2>&1 + else + "$@" 2>&1 | tee -a "$LOGFILE" + fi } From 5ef4415326cddf9dd637ea3f3c3954c41aa05a9f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:53:25 +0200 Subject: [PATCH 0465/1614] Update alpine-rclone.sh --- ct/alpine-rclone.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index d3b140e..e73eb81 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -21,13 +21,6 @@ catch_errors function update_script() { header_info - check_container_storage - check_container_resources - - if [ ! -d /opt/rclone ]; then - msg_error "No ${APP} Installation Found!" - exit 1 - fi RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then From 8049f67f1e5e1335ee1c8905aed10f2428bcb1ca Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 11 Apr 2025 06:53:42 +0000 Subject: [PATCH 0466/1614] Update .app files --- ct/headers/alpine-rclone | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/headers/alpine-rclone b/ct/headers/alpine-rclone index 4aea584..0b0e11f 100644 --- a/ct/headers/alpine-rclone +++ b/ct/headers/alpine-rclone @@ -1,6 +1,6 @@ - ____ __ - / __ \_____/ /___ ____ ___ - / /_/ / ___/ / __ \/ __ \/ _ \ - / _, _/ /__/ / /_/ / / / / __/ -/_/ |_|\___/_/\____/_/ /_/\___/ - + ___ __ _ __ + / | / /___ (_)___ ___ __________/ /___ ____ ___ + / /| | / / __ \/ / __ \/ _ \______/ ___/ ___/ / __ \/ __ \/ _ \ + / ___ |/ / /_/ / / / / / __/_____/ / / /__/ / /_/ / / / / __/ +/_/ |_/_/ .___/_/_/ /_/\___/ /_/ \___/_/\____/_/ /_/\___/ + /_/ From 3beb7b49a7c5837fcd512833a69043321654cd8e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:54:02 +0200 Subject: [PATCH 0467/1614] test remove source --- misc/build.func | 2 +- misc/install.func | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 4f9f9e8..5e2bbdb 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1342,7 +1342,7 @@ get_gh_release() { } start() { - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) + #source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" diff --git a/misc/install.func b/misc/install.func index 65e52c6..82a44f7 100644 --- a/misc/install.func +++ b/misc/install.func @@ -273,6 +273,6 @@ EOF chmod 700 /root/.ssh chmod 600 /root/.ssh/authorized_keys fi - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) + #source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) } From 2d35e54f466644866d3de0ae54006bd88f89a60e Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 08:57:06 +0200 Subject: [PATCH 0468/1614] Source the helpers for install.sh files --- misc/build.func | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 514bed7..39f634c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1204,7 +1204,9 @@ build_container() { if [ "$var_os" == "alpine" ]; then export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helpers.func)" + FUNCTIONS_FILE_PATH+="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + export FUNCTIONS_FILE_PATH fi export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" From 3bd3fb5836b1ae2a1bd22e305213dacd7388aae8 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 08:58:04 +0200 Subject: [PATCH 0469/1614] Factor out all duplicate code from install.func --- misc/install.func | 89 ----------------------------------------------- 1 file changed, 89 deletions(-) diff --git a/misc/install.func b/misc/install.func index 65e52c6..e0586ab 100644 --- a/misc/install.func +++ b/misc/install.func @@ -4,48 +4,6 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# This function sets color variables for formatting output in the terminal -color() { - # Colors - YW=$(echo "\033[33m") - YWB=$(echo "\033[93m") - BL=$(echo "\033[36m") - RD=$(echo "\033[01;31m") - GN=$(echo "\033[1;92m") - - # Formatting - CL=$(echo "\033[m") - BFR="\\r\\033[K" - BOLD=$(echo "\033[1m") - HOLD=" " - TAB=" " - - # System - RETRY_NUM=10 - RETRY_EVERY=3 - - # Icons - CM="${TAB}✔️${TAB}${CL}" - CROSS="${TAB}✖️${TAB}${CL}" - INFO="${TAB}💡${TAB}${CL}" - NETWORK="${TAB}📡${TAB}${CL}" - HOSTNAME="${TAB}🏠${TAB}${CL}" -} - -# Function to set STD mode based on verbosity -set_std_mode() { - if [ "$VERBOSE" = "yes" ]; then - STD="" - else - STD="silent" - fi -} - -# Silent execution function -silent() { - "$@" >/dev/null 2>&1 -} - # This function enables IPv6 if it's not disabled and sets verbose mode verb_ip6() { set_std_mode # Set STD mode based on VERBOSE @@ -80,46 +38,6 @@ error_handler() { fi } -# This function displays a spinner. -spinner() { - local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') - local spin_i=0 - local interval=0.1 - printf "\e[?25l" - - local color="${YWB}" - - while true; do - printf "\r ${color}%s${CL}" "${frames[spin_i]}" - spin_i=$(((spin_i + 1) % ${#frames[@]})) - sleep "$interval" - done -} - -# This function displays an informational message with a yellow color. -msg_info() { - local msg="$1" - echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}" - spinner & - SPINNER_PID=$! -} - -# This function displays a success message with a green color. -msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi - printf "\e[?25h" - local msg="$1" - echo -e "${BFR}${CM}${GN}${msg}${CL}" -} - -# This function displays a error message with a red color. -msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi - printf "\e[?25h" - local msg="$1" - echo -e "${BFR}${CROSS}${RD}${msg}${CL}" -} - # This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection setting_up_container() { msg_info "Setting up Container OS" @@ -148,12 +66,6 @@ setting_up_container() { msg_ok "Network Connected: ${BL}$(hostname -I)" } -exit_script() { - clear - echo -e "\n${CROSS}${RD}Script aborted.${CL}\n" - exit -} - # This function checks the network connection by pinging a known IP address and prompts the user to continue if the internet is not connected network_check() { set +e @@ -275,4 +187,3 @@ EOF fi source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) } - From 98e332c2e153fe1f7ab352d1fe1be6674ea00c10 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:03:52 +0200 Subject: [PATCH 0470/1614] Upsi, missed shell_check --- misc/helpers.func | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/misc/helpers.func b/misc/helpers.func index ddabc17..53e085e 100644 --- a/misc/helpers.func +++ b/misc/helpers.func @@ -128,7 +128,15 @@ msg_error() { SPINNER_ACTIVE=0 log_message "ERROR" "$msg" } - +shell_check() { + if [[ "$(basename "$SHELL")" != "bash" ]]; then + clear + msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell." + echo -e "\nExiting..." + sleep 2 + exit + fi +} root_check() { if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then clear From 44b1c98856d44b740bcf647dddc5f34b5a46c865 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 11 Apr 2025 09:10:08 +0200 Subject: [PATCH 0471/1614] push --- misc/build.func | 2 +- misc/install.func | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index f776ea2..39f634c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1134,7 +1134,7 @@ get_gh_release() { } start() { - #source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" diff --git a/misc/install.func b/misc/install.func index e0de4da..e0586ab 100644 --- a/misc/install.func +++ b/misc/install.func @@ -185,5 +185,5 @@ EOF chmod 700 /root/.ssh chmod 600 /root/.ssh/authorized_keys fi - #source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) } From 161f8c96bfeb2d95c5ad4789c9c8aadaa302b7e1 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:11:32 +0200 Subject: [PATCH 0472/1614] Its broken, send help --- misc/build.func | 2 ++ misc/install.func | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 39f634c..44c6b7d 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1206,6 +1206,8 @@ build_container() { else FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helpers.func)" FUNCTIONS_FILE_PATH+="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + echo -e ${FUNCTIONS_FILE_PATH} + exit 0 export FUNCTIONS_FILE_PATH fi export RANDOM_UUID="$RANDOM_UUID" diff --git a/misc/install.func b/misc/install.func index e0586ab..74daa01 100644 --- a/misc/install.func +++ b/misc/install.func @@ -4,7 +4,8 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# This function enables IPv6 if it's not disabled and sets verbose mode + + verb_ip6() { set_std_mode # Set STD mode based on VERBOSE From 0189aff842bf35d0ff6ee7f6ae5bcc4ff8c3ace3 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:12:25 +0200 Subject: [PATCH 0473/1614] Do what mick said --- misc/build.func | 4 ++-- misc/{helpers.func => core.func} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename misc/{helpers.func => core.func} (100%) diff --git a/misc/build.func b/misc/build.func index 44c6b7d..4ca23d4 100644 --- a/misc/build.func +++ b/misc/build.func @@ -14,7 +14,7 @@ variables() { RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helpers.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func) catch_errors() { set -Eeuo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR @@ -1204,7 +1204,7 @@ build_container() { if [ "$var_os" == "alpine" ]; then export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" else - FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helpers.func)" + FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func)" FUNCTIONS_FILE_PATH+="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" echo -e ${FUNCTIONS_FILE_PATH} exit 0 diff --git a/misc/helpers.func b/misc/core.func similarity index 100% rename from misc/helpers.func rename to misc/core.func From 8b23c38541ab8ebeae45833c620c88764820934c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 11 Apr 2025 09:13:30 +0200 Subject: [PATCH 0474/1614] push --- misc/build.func | 2 +- misc/install.func | 2 +- misc/{helper.func => tools.func} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename misc/{helper.func => tools.func} (100%) diff --git a/misc/build.func b/misc/build.func index 4ca23d4..58e0c97 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1134,7 +1134,7 @@ get_gh_release() { } start() { - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/tools.func) LOGDIR="/usr/local/community-scripts/logs" mkdir -p "$LOGDIR" diff --git a/misc/install.func b/misc/install.func index 74daa01..41e15d4 100644 --- a/misc/install.func +++ b/misc/install.func @@ -186,5 +186,5 @@ EOF chmod 700 /root/.ssh chmod 600 /root/.ssh/authorized_keys fi - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/tools.func) } diff --git a/misc/helper.func b/misc/tools.func similarity index 100% rename from misc/helper.func rename to misc/tools.func From 90af1d7ba9217104bd472cd7bf42ab03431b5565 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:15:12 +0200 Subject: [PATCH 0475/1614] Changes --- misc/build.func | 2 -- misc/install.func | 2 -- 2 files changed, 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index 58e0c97..ccc82c1 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1206,8 +1206,6 @@ build_container() { else FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func)" FUNCTIONS_FILE_PATH+="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" - echo -e ${FUNCTIONS_FILE_PATH} - exit 0 export FUNCTIONS_FILE_PATH fi export RANDOM_UUID="$RANDOM_UUID" diff --git a/misc/install.func b/misc/install.func index 41e15d4..598243d 100644 --- a/misc/install.func +++ b/misc/install.func @@ -4,8 +4,6 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE - - verb_ip6() { set_std_mode # Set STD mode based on VERBOSE From 8bc31939c8fe0bef963fea2fb9fe4c3fe61584cf Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:22:33 +0200 Subject: [PATCH 0476/1614] Unbreak it\? --- misc/build.func | 4 +--- misc/install.func | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index ccc82c1..ae3f8f4 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1204,9 +1204,7 @@ build_container() { if [ "$var_os" == "alpine" ]; then export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" else - FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func)" - FUNCTIONS_FILE_PATH+="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" - export FUNCTIONS_FILE_PATH + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" fi export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" diff --git a/misc/install.func b/misc/install.func index 598243d..76b23fd 100644 --- a/misc/install.func +++ b/misc/install.func @@ -1,9 +1,13 @@ +# Why dose it error out? # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # Co-Author: MickLesk +# Co-Author: michelroegl-brunner # License: MIT # https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +source <(wget -qO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func) + verb_ip6() { set_std_mode # Set STD mode based on VERBOSE From 20c9572c9018b7f1c4ac2ff8a6e166c704daf7b7 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:29:59 +0200 Subject: [PATCH 0477/1614] untangle the mess --- misc/build.func | 4 +++- misc/core.func | 32 +++++++++++++++++--------------- misc/install.func | 2 -- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/misc/build.func b/misc/build.func index ae3f8f4..ccc82c1 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1204,7 +1204,9 @@ build_container() { if [ "$var_os" == "alpine" ]; then export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func)" + FUNCTIONS_FILE_PATH+="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + export FUNCTIONS_FILE_PATH fi export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" diff --git a/misc/core.func b/misc/core.func index 53e085e..de18842 100644 --- a/misc/core.func +++ b/misc/core.func @@ -92,6 +92,21 @@ spinner_guard() { fi } +log_message() { + local level="$1" + local message="$2" + local timestamp + local logdate + timestamp=$(date '+%Y-%m-%d %H:%M:%S') + logdate=$(date '+%Y-%m-%d') + + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" + + LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log" + echo "$timestamp - $level: $message" >>"$LOGFILE" +} + msg_info() { local msg="$1" if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then @@ -128,6 +143,7 @@ msg_error() { SPINNER_ACTIVE=0 log_message "ERROR" "$msg" } + shell_check() { if [[ "$(basename "$SHELL")" != "bash" ]]; then clear @@ -137,6 +153,7 @@ shell_check() { exit fi } + root_check() { if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then clear @@ -180,21 +197,6 @@ ssh_check() { fi } -log_message() { - local level="$1" - local message="$2" - local timestamp - local logdate - timestamp=$(date '+%Y-%m-%d %H:%M:%S') - logdate=$(date '+%Y-%m-%d') - - LOGDIR="/usr/local/community-scripts/logs" - mkdir -p "$LOGDIR" - - LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log" - echo "$timestamp - $level: $message" >>"$LOGFILE" -} - exit-script() { clear echo -e "\n${CROSS}${RD}User exited script${CL}\n" diff --git a/misc/install.func b/misc/install.func index 76b23fd..c3186c7 100644 --- a/misc/install.func +++ b/misc/install.func @@ -6,8 +6,6 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -source <(wget -qO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func) - verb_ip6() { set_std_mode # Set STD mode based on VERBOSE From a7d0df02349fb58045781963d8a74f555d127e10 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:37:29 +0200 Subject: [PATCH 0478/1614] Revert some changes --- misc/build.func | 4 +- misc/install.func | 143 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 143 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index ccc82c1..ae3f8f4 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1204,9 +1204,7 @@ build_container() { if [ "$var_os" == "alpine" ]; then export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" else - FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func)" - FUNCTIONS_FILE_PATH+="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" - export FUNCTIONS_FILE_PATH + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" fi export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" diff --git a/misc/install.func b/misc/install.func index c3186c7..c9b6eda 100644 --- a/misc/install.func +++ b/misc/install.func @@ -1,4 +1,3 @@ -# Why dose it error out? # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # Co-Author: MickLesk @@ -6,6 +5,148 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +color() { + # Colors + YW=$(echo "\033[33m") + YWB=$(echo "\033[93m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") + + # Formatting + CL=$(echo "\033[m") + BOLD=$(echo "\033[1m") + HOLD=" " + TAB=" " + + # Icons + CM="${TAB}✔️${TAB}" + CROSS="${TAB}✖️${TAB}${CL}" + INFO="${TAB}💡${TAB}${CL}" + OS="${TAB}🖥️${TAB}${CL}" + OSVERSION="${TAB}🌟${TAB}${CL}" + CONTAINERTYPE="${TAB}📦${TAB}${CL}" + DISKSIZE="${TAB}💾${TAB}${CL}" + CPUCORE="${TAB}🧠${TAB}${CL}" + RAMSIZE="${TAB}🛠️${TAB}${CL}" + SEARCH="${TAB}🔍${TAB}${CL}" + VERBOSE_CROPPED="🔍${TAB}" + VERIFYPW="${TAB}🔐${TAB}${CL}" + CONTAINERID="${TAB}🆔${TAB}${CL}" + HOSTNAME="${TAB}🏠${TAB}${CL}" + BRIDGE="${TAB}🌉${TAB}${CL}" + NETWORK="${TAB}📡${TAB}${CL}" + GATEWAY="${TAB}🌐${TAB}${CL}" + DISABLEIPV6="${TAB}🚫${TAB}${CL}" + DEFAULT="${TAB}⚙️${TAB}${CL}" + MACADDRESS="${TAB}🔗${TAB}${CL}" + VLANTAG="${TAB}🏷️${TAB}${CL}" + ROOTSSH="${TAB}🔑${TAB}${CL}" + CREATING="${TAB}🚀${TAB}${CL}" + ADVANCED="${TAB}🧩${TAB}${CL}" + FUSE="${TAB}🔧${TAB}${CL}" +} + +declare -A MSG_INFO_SHOWN +SPINNER_ACTIVE=0 +SPINNER_PID="" +SPINNER_MSG="" + +start_spinner() { + local msg="$1" + local frames=(⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏) + local spin_i=0 + local interval=0.1 + + SPINNER_MSG="$msg" + printf "\r\e[2K" >&2 + + { + while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do + printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 + spin_i=$(((spin_i + 1) % ${#frames[@]})) + sleep "$interval" + done + } & + + SPINNER_PID=$! + disown "$SPINNER_PID" +} + +stop_spinner() { + if [[ ${SPINNER_PID+v} && -n "$SPINNER_PID" ]] && kill -0 "$SPINNER_PID" 2>/dev/null; then + kill "$SPINNER_PID" 2>/dev/null + sleep 0.1 + kill -0 "$SPINNER_PID" 2>/dev/null && kill -9 "$SPINNER_PID" 2>/dev/null + wait "$SPINNER_PID" 2>/dev/null || true + fi + SPINNER_ACTIVE=0 + unset SPINNER_PID +} + +spinner_guard() { + if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "$SPINNER_PID" ]]; then + kill "$SPINNER_PID" 2>/dev/null + wait "$SPINNER_PID" 2>/dev/null || true + SPINNER_ACTIVE=0 + unset SPINNER_PID + fi +} + +log_message() { + local level="$1" + local message="$2" + local timestamp + local logdate + timestamp=$(date '+%Y-%m-%d %H:%M:%S') + logdate=$(date '+%Y-%m-%d') + + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" + + LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log" + echo "$timestamp - $level: $message" >>"$LOGFILE" +} + +msg_info() { + local msg="$1" + if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then + return + fi + + SPINNER_ACTIVE=1 + start_spinner "$msg" +} + +msg_ok() { + if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill "$SPINNER_PID" >/dev/null 2>&1 + wait "$SPINNER_PID" 2>/dev/null || true + fi + + local msg="$1" + printf "\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 + unset SPINNER_PID + SPINNER_ACTIVE=0 + + log_message "OK" "$msg" +} + +msg_error() { + if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill "$SPINNER_PID" >/dev/null 2>&1 + wait "$SPINNER_PID" 2>/dev/null || true + fi + + local msg="$1" + printf "\r\e[2K${CROSS}${RD}%b${CL}\n" "$msg" >&2 + unset SPINNER_PID + SPINNER_ACTIVE=0 + log_message "ERROR" "$msg" +} + verb_ip6() { set_std_mode # Set STD mode based on VERBOSE From a3eec8025475bcb6772132f88a793fa054331d52 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 11 Apr 2025 09:38:50 +0200 Subject: [PATCH 0479/1614] test --- ct/alpine-rclone.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index e73eb81..3bcccfa 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -34,8 +34,6 @@ function update_script() { else msg_ok "No update required. ${APP} is already at ${RELEASE}" fi - - exit 0 } start From d3a1ef54638c83ba35b6e74a139f68f018476c10 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:39:03 +0200 Subject: [PATCH 0480/1614] Revert some changes --- misc/install.func | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/install.func b/misc/install.func index c9b6eda..cd201b1 100644 --- a/misc/install.func +++ b/misc/install.func @@ -49,6 +49,14 @@ color() { FUSE="${TAB}🔧${TAB}${CL}" } +set_std_mode() { + if [ "$VERB" = "yes" ]; then + STD="" + else + STD="silent" + fi +} + declare -A MSG_INFO_SHOWN SPINNER_ACTIVE=0 SPINNER_PID="" From 1931ed33b3770d7fd6d47110a950824bcf082c44 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:44:29 +0200 Subject: [PATCH 0481/1614] Revert some changes --- misc/install.func | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/install.func b/misc/install.func index cd201b1..d1a3883 100644 --- a/misc/install.func +++ b/misc/install.func @@ -188,6 +188,9 @@ error_handler() { fi } +RETRY_NUM=10 +RETRY_EVERY=3 + # This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection setting_up_container() { msg_info "Setting up Container OS" From 71d1f0423bd3c628e58cc3600129e033de496eea Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:48:54 +0200 Subject: [PATCH 0482/1614] Revert some changes --- misc/install.func | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/misc/install.func b/misc/install.func index d1a3883..1095dc2 100644 --- a/misc/install.func +++ b/misc/install.func @@ -103,21 +103,6 @@ spinner_guard() { fi } -log_message() { - local level="$1" - local message="$2" - local timestamp - local logdate - timestamp=$(date '+%Y-%m-%d %H:%M:%S') - logdate=$(date '+%Y-%m-%d') - - LOGDIR="/usr/local/community-scripts/logs" - mkdir -p "$LOGDIR" - - LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log" - echo "$timestamp - $level: $message" >>"$LOGFILE" -} - msg_info() { local msg="$1" if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then From e22f83151dcd6085f040ac2d690955becc3b1c3c Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:55:45 +0200 Subject: [PATCH 0483/1614] Revert some changes --- misc/install.func | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/install.func b/misc/install.func index 1095dc2..a4997a7 100644 --- a/misc/install.func +++ b/misc/install.func @@ -124,7 +124,6 @@ msg_ok() { unset SPINNER_PID SPINNER_ACTIVE=0 - log_message "OK" "$msg" } msg_error() { @@ -137,7 +136,7 @@ msg_error() { printf "\r\e[2K${CROSS}${RD}%b${CL}\n" "$msg" >&2 unset SPINNER_PID SPINNER_ACTIVE=0 - log_message "ERROR" "$msg" + } verb_ip6() { From d4533d338d7f8b7d7a467b3b856644039b38aa66 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 11 Apr 2025 09:59:12 +0200 Subject: [PATCH 0484/1614] Revert --- misc/install.func | 158 ++++++++++++++++------------------------------ 1 file changed, 53 insertions(+), 105 deletions(-) diff --git a/misc/install.func b/misc/install.func index a4997a7..23963b2 100644 --- a/misc/install.func +++ b/misc/install.func @@ -11,134 +11,46 @@ color() { YWB=$(echo "\033[93m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") - BGN=$(echo "\033[4;92m") GN=$(echo "\033[1;92m") - DGN=$(echo "\033[32m") # Formatting CL=$(echo "\033[m") + BFR="\\r\\033[K" BOLD=$(echo "\033[1m") HOLD=" " TAB=" " + # System + RETRY_NUM=10 + RETRY_EVERY=3 + # Icons - CM="${TAB}✔️${TAB}" + CM="${TAB}✔️${TAB}${CL}" CROSS="${TAB}✖️${TAB}${CL}" INFO="${TAB}💡${TAB}${CL}" + NETWORK="${TAB}📡${TAB}${CL}" OS="${TAB}🖥️${TAB}${CL}" OSVERSION="${TAB}🌟${TAB}${CL}" - CONTAINERTYPE="${TAB}📦${TAB}${CL}" - DISKSIZE="${TAB}💾${TAB}${CL}" - CPUCORE="${TAB}🧠${TAB}${CL}" - RAMSIZE="${TAB}🛠️${TAB}${CL}" - SEARCH="${TAB}🔍${TAB}${CL}" - VERBOSE_CROPPED="🔍${TAB}" - VERIFYPW="${TAB}🔐${TAB}${CL}" - CONTAINERID="${TAB}🆔${TAB}${CL}" HOSTNAME="${TAB}🏠${TAB}${CL}" - BRIDGE="${TAB}🌉${TAB}${CL}" - NETWORK="${TAB}📡${TAB}${CL}" GATEWAY="${TAB}🌐${TAB}${CL}" - DISABLEIPV6="${TAB}🚫${TAB}${CL}" DEFAULT="${TAB}⚙️${TAB}${CL}" - MACADDRESS="${TAB}🔗${TAB}${CL}" - VLANTAG="${TAB}🏷️${TAB}${CL}" - ROOTSSH="${TAB}🔑${TAB}${CL}" - CREATING="${TAB}🚀${TAB}${CL}" - ADVANCED="${TAB}🧩${TAB}${CL}" - FUSE="${TAB}🔧${TAB}${CL}" } +# Function to set STD mode based on verbosity set_std_mode() { - if [ "$VERB" = "yes" ]; then + if [ "$VERBOSE" = "yes" ]; then STD="" else STD="silent" fi } -declare -A MSG_INFO_SHOWN -SPINNER_ACTIVE=0 -SPINNER_PID="" -SPINNER_MSG="" - -start_spinner() { - local msg="$1" - local frames=(⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏) - local spin_i=0 - local interval=0.1 - - SPINNER_MSG="$msg" - printf "\r\e[2K" >&2 - - { - while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do - printf "\r\e[2K%s %b" "${frames[spin_i]}" "${YW}${SPINNER_MSG}${CL}" >&2 - spin_i=$(((spin_i + 1) % ${#frames[@]})) - sleep "$interval" - done - } & - - SPINNER_PID=$! - disown "$SPINNER_PID" -} - -stop_spinner() { - if [[ ${SPINNER_PID+v} && -n "$SPINNER_PID" ]] && kill -0 "$SPINNER_PID" 2>/dev/null; then - kill "$SPINNER_PID" 2>/dev/null - sleep 0.1 - kill -0 "$SPINNER_PID" 2>/dev/null && kill -9 "$SPINNER_PID" 2>/dev/null - wait "$SPINNER_PID" 2>/dev/null || true - fi - SPINNER_ACTIVE=0 - unset SPINNER_PID -} - -spinner_guard() { - if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "$SPINNER_PID" ]]; then - kill "$SPINNER_PID" 2>/dev/null - wait "$SPINNER_PID" 2>/dev/null || true - SPINNER_ACTIVE=0 - unset SPINNER_PID - fi -} - -msg_info() { - local msg="$1" - if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then - return - fi - - SPINNER_ACTIVE=1 - start_spinner "$msg" -} - -msg_ok() { - if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill "$SPINNER_PID" >/dev/null 2>&1 - wait "$SPINNER_PID" 2>/dev/null || true - fi - - local msg="$1" - printf "\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 - unset SPINNER_PID - SPINNER_ACTIVE=0 - -} - -msg_error() { - if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then - kill "$SPINNER_PID" >/dev/null 2>&1 - wait "$SPINNER_PID" 2>/dev/null || true - fi - - local msg="$1" - printf "\r\e[2K${CROSS}${RD}%b${CL}\n" "$msg" >&2 - unset SPINNER_PID - SPINNER_ACTIVE=0 - +# Silent execution function +silent() { + "$@" >/dev/null 2>&1 } +# This function enables IPv6 if it's not disabled and sets verbose mode verb_ip6() { set_std_mode # Set STD mode based on VERBOSE @@ -156,8 +68,8 @@ catch_errors() { # This function handles errors error_handler() { - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi printf "\e[?25h" local exit_code="$?" local line_number="$1" @@ -172,9 +84,45 @@ error_handler() { fi } -RETRY_NUM=10 -RETRY_EVERY=3 +# This function displays a spinner. +spinner() { + local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') + local spin_i=0 + local interval=0.1 + printf "\e[?25l" + local color="${YWB}" + + while true; do + printf "\r ${color}%s${CL}" "${frames[spin_i]}" + spin_i=$(((spin_i + 1) % ${#frames[@]})) + sleep "$interval" + done +} + +# This function displays an informational message with a yellow color. +msg_info() { + local msg="$1" + echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}" + spinner & + SPINNER_PID=$! +} + +# This function displays a success message with a green color. +msg_ok() { + if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${CM}${GN}${msg}${CL}" +} + +# This function displays a error message with a red color. +msg_error() { + if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${CROSS}${RD}${msg}${CL}" +} # This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection setting_up_container() { msg_info "Setting up Container OS" From bc3f8665164007e4e7faff1a3edcfd84aa12f1d2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 11 Apr 2025 10:14:57 +0200 Subject: [PATCH 0485/1614] Update alpine-rclone.sh --- ct/alpine-rclone.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index 3bcccfa..285f867 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -21,7 +21,6 @@ catch_errors function update_script() { header_info - RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then msg_info "Updating ${APP} LXC" @@ -34,6 +33,8 @@ function update_script() { else msg_ok "No update required. ${APP} is already at ${RELEASE}" fi + + exit 0 } start From cacfd4abd7352a6ae117d49165e69adefe6e535c Mon Sep 17 00:00:00 2001 From: tremor021 Date: Fri, 11 Apr 2025 11:38:20 +0200 Subject: [PATCH 0486/1614] Update alpine-rclone.sh --- ct/alpine-rclone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index 285f867..8371f15 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -5,7 +5,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/rclone/rclone -APP="Alpine-rclone" +APP="rclone" var_tags="${var_tags:-alpine;backup}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-256}" From 67e35acfcf67747773edb60adde8f7a72ea2e7b6 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 11 Apr 2025 09:38:37 +0000 Subject: [PATCH 0487/1614] Update .app files --- ct/headers/alpine-rclone | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/headers/alpine-rclone b/ct/headers/alpine-rclone index 0b0e11f..6474bf6 100644 --- a/ct/headers/alpine-rclone +++ b/ct/headers/alpine-rclone @@ -1,6 +1,6 @@ - ___ __ _ __ - / | / /___ (_)___ ___ __________/ /___ ____ ___ - / /| | / / __ \/ / __ \/ _ \______/ ___/ ___/ / __ \/ __ \/ _ \ - / ___ |/ / /_/ / / / / / __/_____/ / / /__/ / /_/ / / / / __/ -/_/ |_/_/ .___/_/_/ /_/\___/ /_/ \___/_/\____/_/ /_/\___/ - /_/ + __ + __________/ /___ ____ ___ + / ___/ ___/ / __ \/ __ \/ _ \ + / / / /__/ / /_/ / / / / __/ +/_/ \___/_/\____/_/ /_/\___/ + From 5ddf7aea9b48895ee14f2b74955710ca6a567318 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Fri, 11 Apr 2025 11:50:59 +0200 Subject: [PATCH 0488/1614] Revert rclone update --- ct/alpine-rclone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index 8371f15..285f867 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -5,7 +5,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/rclone/rclone -APP="rclone" +APP="Alpine-rclone" var_tags="${var_tags:-alpine;backup}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-256}" From 375fa30d2effd8427859631a4175184804d2b360 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Fri, 11 Apr 2025 11:59:41 +0200 Subject: [PATCH 0489/1614] formatting --- ct/alpine-rclone.sh | 8 ++++---- install/alpine-rclone-install.sh | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index 285f867..b8ca3ca 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -25,10 +25,10 @@ function update_script() { if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then msg_info "Updating ${APP} LXC" temp_file=$(mktemp) - curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file - $STD unzip -j -o $temp_file '*/**' -d /opt/rclone - rm -f $temp_file - echo "${RELEASE}" >/opt/${APPLICATION}_version.txt + curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" + $STD unzip -j -o "$temp_file" '*/**' -d /opt/rclone + rm -f "$temp_file" + echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt msg_ok "Updated Successfully" else msg_ok "No update required. ${APP} is already at ${RELEASE}" diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index c919b53..a1191d8 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -23,18 +23,18 @@ msg_info "Installing rclone" temp_file=$(mktemp) mkdir -p /opt/rclone RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file -$STD unzip -j $temp_file '*/**' -d /opt/rclone +curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" +$STD unzip -j "$temp_file" '*/**' -d /opt/rclone cd /opt/rclone PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) -$STD htpasswd -cb -B login.pwd admin $PASSWORD +$STD htpasswd -cb -B login.pwd admin "$PASSWORD" { echo "rclone-Credentials" echo "rclone User Name: admin" echo "rclone Password: $PASSWORD" } >>~/rclone.creds -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -rm -f $temp_file +echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt +rm -f "$temp_file" msg_ok "Installed rclone" msg_info "Enabling rclone Service" From 1c3004973dda555eb61430f075280b0ecddc4d7d Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 11 Apr 2025 09:59:56 +0000 Subject: [PATCH 0490/1614] Update .app files --- ct/headers/alpine-rclone | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/headers/alpine-rclone b/ct/headers/alpine-rclone index 6474bf6..0b0e11f 100644 --- a/ct/headers/alpine-rclone +++ b/ct/headers/alpine-rclone @@ -1,6 +1,6 @@ - __ - __________/ /___ ____ ___ - / ___/ ___/ / __ \/ __ \/ _ \ - / / / /__/ / /_/ / / / / __/ -/_/ \___/_/\____/_/ /_/\___/ - + ___ __ _ __ + / | / /___ (_)___ ___ __________/ /___ ____ ___ + / /| | / / __ \/ / __ \/ _ \______/ ___/ ___/ / __ \/ __ \/ _ \ + / ___ |/ / /_/ / / / / / __/_____/ / / /__/ / /_/ / / / / __/ +/_/ |_/_/ .___/_/_/ /_/\___/ /_/ \___/_/\____/_/ /_/\___/ + /_/ From 5abe2f805fded1defbb18265bbe671a4e5a2798a Mon Sep 17 00:00:00 2001 From: tremor021 Date: Fri, 11 Apr 2025 12:01:29 +0200 Subject: [PATCH 0491/1614] update --- install/alpine-rclone-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index a1191d8..7d29fbb 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -25,7 +25,7 @@ mkdir -p /opt/rclone RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" $STD unzip -j "$temp_file" '*/**' -d /opt/rclone -cd /opt/rclone +cd /opt/rclone || exit PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) $STD htpasswd -cb -B login.pwd admin "$PASSWORD" { From cc6871bf75879bc20d2cfa23c6ef36594f48d8e2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 11 Apr 2025 14:23:08 +0200 Subject: [PATCH 0492/1614] Update install.func --- misc/install.func | 370 +++++++++++++++++++++++----------------------- 1 file changed, 186 insertions(+), 184 deletions(-) diff --git a/misc/install.func b/misc/install.func index 23963b2..6bffab7 100644 --- a/misc/install.func +++ b/misc/install.func @@ -6,197 +6,197 @@ # https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE color() { - # Colors - YW=$(echo "\033[33m") - YWB=$(echo "\033[93m") - BL=$(echo "\033[36m") - RD=$(echo "\033[01;31m") - GN=$(echo "\033[1;92m") + # Colors + YW=$(echo "\033[33m") + YWB=$(echo "\033[93m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + GN=$(echo "\033[1;92m") - # Formatting - CL=$(echo "\033[m") - BFR="\\r\\033[K" - BOLD=$(echo "\033[1m") - HOLD=" " - TAB=" " + # Formatting + CL=$(echo "\033[m") + BFR="\\r\\033[K" + BOLD=$(echo "\033[1m") + HOLD=" " + TAB=" " - # System - RETRY_NUM=10 - RETRY_EVERY=3 + # System + RETRY_NUM=10 + RETRY_EVERY=3 - # Icons - CM="${TAB}✔️${TAB}${CL}" - CROSS="${TAB}✖️${TAB}${CL}" - INFO="${TAB}💡${TAB}${CL}" - NETWORK="${TAB}📡${TAB}${CL}" - OS="${TAB}🖥️${TAB}${CL}" - OSVERSION="${TAB}🌟${TAB}${CL}" - HOSTNAME="${TAB}🏠${TAB}${CL}" - GATEWAY="${TAB}🌐${TAB}${CL}" - DEFAULT="${TAB}⚙️${TAB}${CL}" + # Icons + CM="${TAB}✔️${TAB}${CL}" + CROSS="${TAB}✖️${TAB}${CL}" + INFO="${TAB}💡${TAB}${CL}" + NETWORK="${TAB}📡${TAB}${CL}" + OS="${TAB}🖥️${TAB}${CL}" + OSVERSION="${TAB}🌟${TAB}${CL}" + HOSTNAME="${TAB}🏠${TAB}${CL}" + GATEWAY="${TAB}🌐${TAB}${CL}" + DEFAULT="${TAB}⚙️${TAB}${CL}" } # Function to set STD mode based on verbosity set_std_mode() { - if [ "$VERBOSE" = "yes" ]; then - STD="" - else - STD="silent" - fi + if [ "$VERBOSE" = "yes" ]; then + STD="" + else + STD="silent" + fi } # Silent execution function silent() { - "$@" >/dev/null 2>&1 + "$@" >/dev/null 2>&1 } # This function enables IPv6 if it's not disabled and sets verbose mode verb_ip6() { - set_std_mode # Set STD mode based on VERBOSE + set_std_mode # Set STD mode based on VERBOSE - if [ "$DISABLEIPV6" == "yes" ]; then - echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf - $STD sysctl -p - fi + if [ "$DISABLEIPV6" == "yes" ]; then + echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf + $STD sysctl -p + fi } # This function sets error handling options and defines the error_handler function to handle errors catch_errors() { - set -Eeuo pipefail - trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } # This function handles errors error_handler() { - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) - if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi - printf "\e[?25h" - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message" - if [[ "$line_number" -eq 50 ]]; then - echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" - post_update_to_api "failed" "No error message, script ran in silent mode" - else - post_update_to_api "failed" "${command}" - fi + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi + printf "\e[?25h" + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message" + if [[ "$line_number" -eq 50 ]]; then + echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" + post_update_to_api "failed" "No error message, script ran in silent mode" + else + post_update_to_api "failed" "${command}" + fi } # This function displays a spinner. spinner() { - local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') - local spin_i=0 - local interval=0.1 - printf "\e[?25l" + local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') + local spin_i=0 + local interval=0.1 + printf "\e[?25l" - local color="${YWB}" + local color="${YWB}" - while true; do - printf "\r ${color}%s${CL}" "${frames[spin_i]}" - spin_i=$(((spin_i + 1) % ${#frames[@]})) - sleep "$interval" - done + while true; do + printf "\r ${color}%s${CL}" "${frames[spin_i]}" + spin_i=$(((spin_i + 1) % ${#frames[@]})) + sleep "$interval" + done } # This function displays an informational message with a yellow color. msg_info() { - local msg="$1" - echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}" - spinner & - SPINNER_PID=$! + local msg="$1" + echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}" + spinner & + SPINNER_PID=$! } # This function displays a success message with a green color. msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi - printf "\e[?25h" - local msg="$1" - echo -e "${BFR}${CM}${GN}${msg}${CL}" + if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${CM}${GN}${msg}${CL}" } # This function displays a error message with a red color. msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi - printf "\e[?25h" - local msg="$1" - echo -e "${BFR}${CROSS}${RD}${msg}${CL}" + if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${CROSS}${RD}${msg}${CL}" } # This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection setting_up_container() { - msg_info "Setting up Container OS" - sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen - locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1) - echo "LANG=${locale_line}" >/etc/default/locale - locale-gen >/dev/null - export LANG=${locale_line} - echo $tz >/etc/timezone - ln -sf /usr/share/zoneinfo/$tz /etc/localtime - for ((i = RETRY_NUM; i > 0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break + msg_info "Setting up Container OS" + sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen + locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1) + echo "LANG=${locale_line}" >/etc/default/locale + locale-gen >/dev/null + export LANG=${locale_line} + echo $tz >/etc/timezone + ln -sf /usr/share/zoneinfo/$tz /etc/localtime + for ((i = RETRY_NUM; i > 0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + done + if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e "${NETWORK}Check Network Settings" + exit 1 fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - done - if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e "${NETWORK}Check Network Settings" - exit 1 - fi - rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED - systemctl disable -q --now systemd-networkd-wait-online.service - msg_ok "Set up Container OS" - msg_ok "Network Connected: ${BL}$(hostname -I)" + rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + systemctl disable -q --now systemd-networkd-wait-online.service + msg_ok "Set up Container OS" + msg_ok "Network Connected: ${BL}$(hostname -I)" } # This function checks the network connection by pinging a known IP address and prompts the user to continue if the internet is not connected network_check() { - set +e - trap - ERR - ipv4_connected=false - ipv6_connected=false - sleep 1 - # Check IPv4 connectivity to Google, Cloudflare & Quad9 DNS servers. - if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then - msg_ok "IPv4 Internet Connected" - ipv4_connected=true - else - msg_error "IPv4 Internet Not Connected" - fi - - # Check IPv6 connectivity to Google, Cloudflare & Quad9 DNS servers. - if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null || ping6 -c 1 -W 1 2001:4860:4860::8888 &>/dev/null || ping6 -c 1 -W 1 2620:fe::fe &>/dev/null; then - msg_ok "IPv6 Internet Connected" - ipv6_connected=true - else - msg_error "IPv6 Internet Not Connected" - fi - - # If both IPv4 and IPv6 checks fail, prompt the user - if [[ $ipv4_connected == false && $ipv6_connected == false ]]; then - read -r -p "No Internet detected,would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e "${INFO}${RD}Expect Issues Without Internet${CL}" + set +e + trap - ERR + ipv4_connected=false + ipv6_connected=false + sleep 1 + # Check IPv4 connectivity to Google, Cloudflare & Quad9 DNS servers. + if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then + msg_ok "IPv4 Internet Connected" + ipv4_connected=true else - echo -e "${NETWORK}Check Network Settings" - exit 1 + msg_error "IPv4 Internet Not Connected" fi - fi - RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') - if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi - set -e - trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + # Check IPv6 connectivity to Google, Cloudflare & Quad9 DNS servers. + if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null || ping6 -c 1 -W 1 2001:4860:4860::8888 &>/dev/null || ping6 -c 1 -W 1 2620:fe::fe &>/dev/null; then + msg_ok "IPv6 Internet Connected" + ipv6_connected=true + else + msg_error "IPv6 Internet Not Connected" + fi + + # If both IPv4 and IPv6 checks fail, prompt the user + if [[ $ipv4_connected == false && $ipv6_connected == false ]]; then + read -r -p "No Internet detected,would you like to continue anyway? " prompt + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + echo -e "${INFO}${RD}Expect Issues Without Internet${CL}" + else + echo -e "${NETWORK}Check Network Settings" + exit 1 + fi + fi + + RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') + if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi + set -e + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } # This function updates the Container OS by running apt-get update and upgrade update_os() { - msg_info "Updating Container OS" - if [[ "$CACHER" == "yes" ]]; then - echo "Acquire::http::Proxy-Auto-Detect \"/usr/local/bin/apt-proxy-detect.sh\";" >/etc/apt/apt.conf.d/00aptproxy - cat </usr/local/bin/apt-proxy-detect.sh + msg_info "Updating Container OS" + if [[ "$CACHER" == "yes" ]]; then + echo "Acquire::http::Proxy-Auto-Detect \"/usr/local/bin/apt-proxy-detect.sh\";" >/etc/apt/apt.conf.d/00aptproxy + cat </usr/local/bin/apt-proxy-detect.sh #!/bin/bash if nc -w1 -z "${CACHER_IP}" 3142; then echo -n "http://${CACHER_IP}:3142" @@ -204,71 +204,73 @@ else echo -n "DIRECT" fi EOF - chmod +x /usr/local/bin/apt-proxy-detect.sh - fi - $STD apt-get update - $STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade - rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED - msg_ok "Updated Container OS" + chmod +x /usr/local/bin/apt-proxy-detect.sh + fi + $STD apt-get update + $STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade + rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Container OS" + + msg_info "Installing core dependencies" + $STD apt-get update + $STD apt-get install -y sudo curl mc + msg_ok "Core dependencies installed" + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) - msg_info "Installing core dependencies" - $STD apt-get update - $STD apt-get install -y sudo curl mc - msg_ok "Core dependencies installed" } # This function modifies the message of the day (motd) and SSH settings motd_ssh() { - grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >>/root/.bashrc + grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >>/root/.bashrc - if [ -f "/etc/os-release" ]; then - OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"') - OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"') - elif [ -f "/etc/debian_version" ]; then - OS_NAME="Debian" - OS_VERSION=$(cat /etc/debian_version) - fi + if [ -f "/etc/os-release" ]; then + OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"') + OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"') + elif [ -f "/etc/debian_version" ]; then + OS_NAME="Debian" + OS_VERSION=$(cat /etc/debian_version) + fi - PROFILE_FILE="/etc/profile.d/00_lxc-details.sh" - echo "echo -e \"\"" >"$PROFILE_FILE" - echo -e "echo -e \"${BOLD}${YW}${APPLICATION} LXC Container - DEV Repository${CL}\"" >>"$PROFILE_FILE" - echo -e "echo -e \"${RD}WARNING: This is a DEVELOPMENT version (ProxmoxVED). Do NOT use in production!${CL}\"" >>"$PROFILE_FILE" - echo -e "echo -e \"${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >>"$PROFILE_FILE" - echo -e "echo -e \"${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE" - echo -e "echo -e \"${YW} IP Address: ${GN}\$(hostname -I | awk '{print \$1}')${CL}\"" >>"$PROFILE_FILE" - echo -e "echo -e \"${YW} Repository: ${GN}https://github.com/community-scripts/ProxmoxVED${CL}\"" >>"$PROFILE_FILE" - echo "echo \"\"" >>"$PROFILE_FILE" + PROFILE_FILE="/etc/profile.d/00_lxc-details.sh" + echo "echo -e \"\"" >"$PROFILE_FILE" + echo -e "echo -e \"${BOLD}${YW}${APPLICATION} LXC Container - DEV Repository${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${RD}WARNING: This is a DEVELOPMENT version (ProxmoxVED). Do NOT use in production!${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${YW} IP Address: ${GN}\$(hostname -I | awk '{print \$1}')${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${YW} Repository: ${GN}https://github.com/community-scripts/ProxmoxVED${CL}\"" >>"$PROFILE_FILE" + echo "echo \"\"" >>"$PROFILE_FILE" - chmod -x /etc/update-motd.d/* + chmod -x /etc/update-motd.d/* - if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd - fi + if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd + fi } # This function customizes the container by modifying the getty service and enabling auto-login for the root user customize() { - if [[ "$PASSWORD" == "" ]]; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE + if [[ "$PASSWORD" == "" ]]; then + msg_info "Customizing Container" + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" - fi - echo "bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update - chmod +x /usr/bin/update - if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then - mkdir -p /root/.ssh - echo "${SSH_AUTHORIZED_KEY}" >/root/.ssh/authorized_keys - chmod 700 /root/.ssh - chmod 600 /root/.ssh/authorized_keys - fi - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/tools.func) + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" + fi + echo "bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update + chmod +x /usr/bin/update + if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then + mkdir -p /root/.ssh + echo "${SSH_AUTHORIZED_KEY}" >/root/.ssh/authorized_keys + chmod 700 /root/.ssh + chmod 600 /root/.ssh/authorized_keys + fi + #source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/tools.func) } From 6207a582fcede01706df3ca329385c5409d44f1f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 11 Apr 2025 14:31:37 +0200 Subject: [PATCH 0493/1614] fix tools source --- misc/install.func | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/install.func b/misc/install.func index 6bffab7..7d42cef 100644 --- a/misc/install.func +++ b/misc/install.func @@ -215,7 +215,7 @@ EOF $STD apt-get update $STD apt-get install -y sudo curl mc msg_ok "Core dependencies installed" - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helper.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/tools.func) } @@ -272,5 +272,4 @@ EOF chmod 700 /root/.ssh chmod 600 /root/.ssh/authorized_keys fi - #source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/tools.func) } From ebf2e2553e086d630e73a82748716c7ee4bc6986 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 16:06:18 +0000 Subject: [PATCH 0494/1614] Bump vite in /frontend in the npm_and_yarn group across 1 directory Bumps the npm_and_yarn group with 1 update in the /frontend directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). Updates `vite` from 6.2.5 to 6.2.6 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v6.2.6/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v6.2.6/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 6.2.6 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] --- frontend/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 085f7e5..5cf8053 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -9665,9 +9665,9 @@ "license": "MIT" }, "node_modules/vite": { - "version": "6.2.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.5.tgz", - "integrity": "sha512-j023J/hCAa4pRIUH6J9HemwYfjB5llR2Ps0CWeikOtdR8+pAURAk0DoJC5/mm9kd+UgdnIy7d6HE4EAvlYhPhA==", + "version": "6.2.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.6.tgz", + "integrity": "sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==", "dev": true, "license": "MIT", "dependencies": { From 170f9df6c6deef47773ac007d694371c7a66da90 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Sat, 12 Apr 2025 12:32:15 +0000 Subject: [PATCH 0495/1614] Update versions.json --- frontend/public/json/versions.json | 369 ++++++++++++++--------------- 1 file changed, 177 insertions(+), 192 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index a19e310..f3096b8 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,8 +1,183 @@ [ + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-12T10:30:19Z" + }, + { + "name": "home-assistant/core", + "version": "2025.4.2", + "date": "2025-04-12T09:46:22Z" + }, + { + "name": "readeck/readeck", + "version": "0.18.0", + "date": "2025-04-12T08:55:32Z" + }, + { + "name": "runtipi/runtipi", + "version": "nightly", + "date": "2025-04-08T07:12:33Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1767", + "date": "2025-04-12T06:06:09Z" + }, + { + "name": "morpheus65535/bazarr", + "version": "v1.5.1", + "date": "2025-01-01T16:15:52Z" + }, + { + "name": "StarFleetCPTN/GoMFT", + "version": "v0.2.10", + "date": "2025-04-12T01:53:46Z" + }, + { + "name": "Bubka/2FAuth", + "version": "v5.5.2", + "date": "2025-04-11T22:00:06Z" + }, + { + "name": "homarr-labs/homarr", + "version": "v1.16.0", + "date": "2025-04-11T19:15:24Z" + }, + { + "name": "rabbitmq/rabbitmq-server", + "version": "v4.0.8", + "date": "2025-04-03T05:11:15Z" + }, + { + "name": "firefly-iii/firefly-iii", + "version": "v6.2.10", + "date": "2025-03-22T13:02:26Z" + }, + { + "name": "tailscale/tailscale", + "version": "v1.82.4", + "date": "2025-04-11T17:58:09Z" + }, + { + "name": "coder/code-server", + "version": "v4.99.2", + "date": "2025-04-11T17:57:47Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.2.0", + "date": "2025-04-11T12:48:27Z" + }, + { + "name": "duplicati/duplicati", + "version": "v2.1.0.113-2.1.0.113_canary_2025-04-11", + "date": "2025-04-11T16:57:07Z" + }, + { + "name": "TriliumNext/Notes", + "version": "v0.0.0", + "date": "2025-04-11T14:18:00Z" + }, + { + "name": "emqx/emqx", + "version": "e5.9.0-beta.3", + "date": "2025-04-11T14:17:53Z" + }, + { + "name": "NLnetLabs/unbound", + "version": "release-1.23.0rc2", + "date": "2025-04-11T13:24:25Z" + }, + { + "name": "MediaBrowser/Emby.Releases", + "version": "4.8.11.0", + "date": "2025-03-10T06:39:11Z" + }, + { + "name": "docmost/docmost", + "version": "v0.10.1", + "date": "2025-04-11T12:42:08Z" + }, + { + "name": "dgtlmoon/changedetection.io", + "version": "0.49.13", + "date": "2025-04-11T11:48:06Z" + }, + { + "name": "semaphoreui/semaphore", + "version": "v2.13.13", + "date": "2025-04-11T10:15:13Z" + }, + { + "name": "sabnzbd/sabnzbd", + "version": "4.5.1", + "date": "2025-04-11T09:57:47Z" + }, + { + "name": "Stirling-Tools/Stirling-PDF", + "version": "v0.45.4", + "date": "2025-04-11T08:45:04Z" + }, + { + "name": "home-assistant/operating-system", + "version": "15.1", + "date": "2025-03-31T13:42:20Z" + }, { "name": "outline/outline", - "version": "v0.82.1-19", - "date": "2025-04-10T01:03:03Z" + "version": "v0.83.0", + "date": "2025-04-11T03:53:10Z" + }, + { + "name": "openobserve/openobserve", + "version": "v0.14.6-rc3", + "date": "2025-04-11T03:08:28Z" + }, + { + "name": "Luligu/matterbridge", + "version": "2.2.8", + "date": "2025-04-10T20:30:49Z" + }, + { + "name": "netbox-community/netbox", + "version": "v4.2.7", + "date": "2025-04-10T20:08:13Z" + }, + { + "name": "gristlabs/grist-core", + "version": "v1.5.1", + "date": "2025-04-10T19:48:43Z" + }, + { + "name": "apache/cassandra", + "version": "cassandra-5.0.4", + "date": "2025-04-10T16:32:00Z" + }, + { + "name": "VictoriaMetrics/VictoriaMetrics", + "version": "v1.18.0-victorialogs", + "date": "2025-04-10T15:05:20Z" + }, + { + "name": "NodeBB/NodeBB", + "version": "v4.2.1", + "date": "2025-04-10T14:03:47Z" + }, + { + "name": "Paymenter/Paymenter", + "version": "v1.0.3", + "date": "2025-04-10T13:57:39Z" + }, + { + "name": "docker/compose", + "version": "v2.35.0", + "date": "2025-04-10T13:45:22Z" + }, + { + "name": "n8n-io/n8n", + "version": "n8n@1.86.1", + "date": "2025-04-09T09:20:55Z" }, { "name": "glanceapp/glance", @@ -19,26 +194,11 @@ "version": "v2.15.1", "date": "2025-04-09T22:26:39Z" }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-09T20:29:25Z" - }, { "name": "syncthing/syncthing", "version": "v2.0.0-beta.7", "date": "2025-04-09T13:41:32Z" }, - { - "name": "NodeBB/NodeBB", - "version": "v4.3.0-beta.1", - "date": "2025-04-09T19:06:10Z" - }, - { - "name": "docmost/docmost", - "version": "v0.10.0", - "date": "2025-04-09T18:58:20Z" - }, { "name": "Prowlarr/Prowlarr", "version": "v1.33.3.5008", @@ -49,16 +209,6 @@ "version": "v7.4.0", "date": "2025-04-09T17:36:14Z" }, - { - "name": "MediaBrowser/Emby.Releases", - "version": "4.8.11.0", - "date": "2025-03-10T06:39:11Z" - }, - { - "name": "Stirling-Tools/Stirling-PDF", - "version": "v0.45.3", - "date": "2025-04-09T17:17:58Z" - }, { "name": "Brandawg93/PeaNUT", "version": "v5.7.1", @@ -79,11 +229,6 @@ "version": "v5.35.2", "date": "2025-04-09T13:46:58Z" }, - { - "name": "homarr-labs/homarr", - "version": "v1.15.0", - "date": "2025-04-09T13:27:14Z" - }, { "name": "zitadel/zitadel", "version": "v2.69.10", @@ -94,51 +239,16 @@ "version": "debian/12.0.14", "date": "2025-04-09T10:09:00Z" }, - { - "name": "n8n-io/n8n", - "version": "n8n@1.86.1", - "date": "2025-04-09T09:20:55Z" - }, { "name": "esphome/esphome", "version": "2025.3.3", "date": "2025-03-31T22:07:05Z" }, - { - "name": "runtipi/runtipi", - "version": "nightly", - "date": "2025-04-08T07:12:33Z" - }, - { - "name": "morpheus65535/bazarr", - "version": "v1.5.1", - "date": "2025-01-01T16:15:52Z" - }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1751", - "date": "2025-04-09T06:00:36Z" - }, - { - "name": "StarFleetCPTN/GoMFT", - "version": "v0.2.7", - "date": "2025-04-09T04:53:30Z" - }, { "name": "OliveTin/OliveTin", "version": "2025.4.8", "date": "2025-04-08T22:02:50Z" }, - { - "name": "coder/code-server", - "version": "v4.99.1", - "date": "2025-04-08T21:35:21Z" - }, - { - "name": "semaphoreui/semaphore", - "version": "v2.13.12", - "date": "2025-04-08T20:54:58Z" - }, { "name": "minio/minio", "version": "RELEASE.2025-04-08T15-41-24Z", @@ -149,11 +259,6 @@ "version": "version/2025.2.4", "date": "2025-04-08T18:39:57Z" }, - { - "name": "keycloak/keycloak", - "version": "26.1.4", - "date": "2025-03-13T15:41:42Z" - }, { "name": "influxdata/influxdb", "version": "v1.12.0rc1", @@ -169,11 +274,6 @@ "version": "v0.107.59", "date": "2025-03-21T11:11:39Z" }, - { - "name": "openobserve/openobserve", - "version": "v0.14.6-rc2", - "date": "2025-04-08T14:42:54Z" - }, { "name": "element-hq/synapse", "version": "v1.128.0", @@ -189,11 +289,6 @@ "version": "v0.303.0-rc.1", "date": "2025-04-07T04:39:38Z" }, - { - "name": "NLnetLabs/unbound", - "version": "release-1.23.0rc1", - "date": "2025-04-08T06:39:46Z" - }, { "name": "pelican-dev/panel", "version": "v1.0.0-beta19", @@ -229,21 +324,11 @@ "version": "v1.10.0", "date": "2025-04-07T14:32:15Z" }, - { - "name": "apache/cassandra", - "version": "5.0.4-tentative", - "date": "2025-04-07T12:05:05Z" - }, { "name": "Graylog2/graylog2-server", "version": "6.2.0-beta.4", "date": "2025-04-07T11:28:13Z" }, - { - "name": "VictoriaMetrics/VictoriaMetrics", - "version": "pmm-6401-v1.115.0", - "date": "2025-04-07T11:15:53Z" - }, { "name": "fallenbagel/jellyseerr", "version": "preview-back-to-axios", @@ -279,16 +364,6 @@ "version": "v0.6.2", "date": "2025-04-07T03:41:23Z" }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.10", - "date": "2025-03-22T13:02:26Z" - }, - { - "name": "Luligu/matterbridge", - "version": "2.2.7", - "date": "2025-04-06T20:00:53Z" - }, { "name": "Dolibarr/dolibarr", "version": "21.0.1", @@ -334,11 +409,6 @@ "version": "v13.5.0", "date": "2025-04-06T11:24:50Z" }, - { - "name": "TriliumNext/Notes", - "version": "v0.92.6", - "date": "2025-04-06T10:38:54Z" - }, { "name": "kimai/kimai", "version": "2.32.0", @@ -369,11 +439,6 @@ "version": "2.3", "date": "2025-04-05T18:05:36Z" }, - { - "name": "Paymenter/Paymenter", - "version": "v1.0.2", - "date": "2025-04-05T17:40:25Z" - }, { "name": "bastienwirtz/homer", "version": "v25.04.1", @@ -394,11 +459,6 @@ "version": "v25.4.0", "date": "2025-04-05T04:14:57Z" }, - { - "name": "home-assistant/core", - "version": "2025.4.1", - "date": "2025-04-04T20:59:57Z" - }, { "name": "Koenkk/zigbee2mqtt", "version": "2.2.1", @@ -408,80 +468,5 @@ "name": "Athou/commafeed", "version": "5.7.0", "date": "2025-04-04T18:10:16Z" - }, - { - "name": "icereed/paperless-gpt", - "version": "v0.14.4", - "date": "2025-04-04T14:18:53Z" - }, - { - "name": "apache/tomcat", - "version": "9.0.104", - "date": "2025-04-04T12:58:11Z" - }, - { - "name": "sabnzbd/sabnzbd", - "version": "4.5.0", - "date": "2025-03-30T16:17:11Z" - }, - { - "name": "dgtlmoon/changedetection.io", - "version": "0.49.12", - "date": "2025-04-04T07:31:08Z" - }, - { - "name": "OctoPrint/OctoPrint", - "version": "1.10.3", - "date": "2024-11-05T09:20:50Z" - }, - { - "name": "rabbitmq/rabbitmq-server", - "version": "v4.0.8", - "date": "2025-04-03T05:11:15Z" - }, - { - "name": "BookStackApp/BookStack", - "version": "v25.02.2", - "date": "2025-04-02T16:39:50Z" - }, - { - "name": "cloudflare/cloudflared", - "version": "2025.4.0", - "date": "2025-04-02T15:38:53Z" - }, - { - "name": "hargata/lubelog", - "version": "v1.4.6", - "date": "2025-04-02T14:07:12Z" - }, - { - "name": "immich-app/immich", - "version": "v1.131.3", - "date": "2025-04-01T22:48:22Z" - }, - { - "name": "MagicMirrorOrg/MagicMirror", - "version": "v2.31.0", - "date": "2025-04-01T18:12:45Z" - }, - { - "name": "theonedev/onedev", - "version": "v11.8.6", - "date": "2025-04-01T13:52:03Z" - }, - { - "name": "neo4j/neo4j", - "version": "5.26.5", - "date": "2025-04-01T09:32:48Z" - }, - { - "name": "diced/zipline", - "version": "v4.0.2", - "date": "2025-04-01T04:51:05Z" - }, - { - "name": "Kometa-Team/Kometa", - "version": "v2.2.0", - "date": "2025-03-31T21:31:48Z" } ] From 110eb3995e18d5c4dd1cd78a07469f14ad59cc12 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 12 Apr 2025 19:32:07 +0200 Subject: [PATCH 0496/1614] Update ct/jumpserver.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/jumpserver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jumpserver.sh b/ct/jumpserver.sh index 4501ed9..7031e11 100644 --- a/ct/jumpserver.sh +++ b/ct/jumpserver.sh @@ -1,5 +1,5 @@ #!/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: Nícolas Pastorello (opastorello) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE From 53fc40fe105ef222dbbf52fdc4c92cdf87af6a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Sat, 12 Apr 2025 15:03:51 -0300 Subject: [PATCH 0497/1614] Update ct/jumpserver.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/jumpserver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jumpserver.sh b/ct/jumpserver.sh index 7031e11..184a327 100644 --- a/ct/jumpserver.sh +++ b/ct/jumpserver.sh @@ -3,7 +3,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # Copyright (c) 2021-2025 community-scripts ORG # Author: Nícolas Pastorello (opastorello) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://jumpserver.com/ +# Source: https://github.com/jumpserver/jumpserver APP="JumpServer" var_tags="bastion-host;pam" From eb76b2aba73637de85abcc1e487bd41176b40382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Sat, 12 Apr 2025 15:03:59 -0300 Subject: [PATCH 0498/1614] Update ct/jumpserver.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/jumpserver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jumpserver.sh b/ct/jumpserver.sh index 184a327..f439cb5 100644 --- a/ct/jumpserver.sh +++ b/ct/jumpserver.sh @@ -39,7 +39,7 @@ function update_script() { rm -rf /opt/jumpserver cd /opt curl -fsSL "https://github.com/jumpserver/installer/releases/download/${RELEASE}/jumpserver-installer-${RELEASE}.tar.gz" -o jumpserver-installer-${RELEASE}.tar.gz - $STD mkdir -p /opt/jumpserver + mkdir -p /opt/jumpserver $STD tar -xzvf jumpserver-installer-${RELEASE}.tar.gz -C /opt/jumpserver --strip-components=1 if [[ -d /opt/jumpserver_config_backup ]]; then msg_info "Restoring config backup" From e0512ed2f71bf58108f2e7ae1af201fcb3af85b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Sat, 12 Apr 2025 15:04:12 -0300 Subject: [PATCH 0499/1614] Update frontend/public/json/jumpserver.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- frontend/public/json/jumpserver.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/jumpserver.json b/frontend/public/json/jumpserver.json index cf1cdba..2d0cf57 100644 --- a/frontend/public/json/jumpserver.json +++ b/frontend/public/json/jumpserver.json @@ -11,7 +11,7 @@ "interface_port": 80, "documentation": "https://www.jumpserver.com/docs", "website": "https://www.jumpserver.com/", - "logo": "https://avatars.githubusercontent.com/u/68588906", + "logo": "https://raw.githubusercontent.com/jumpserver/jumpserver/refs/heads/dev/apps/static/img/logo.png", "description": "JumpServer is an open-source Privileged Access Management (PAM) tool that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.", "install_methods": [ { From 02ae2e010967b3f56f331adf51d99a8d0c36f508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Sat, 12 Apr 2025 15:04:19 -0300 Subject: [PATCH 0500/1614] Update install/jumpserver-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/jumpserver-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/jumpserver-install.sh b/install/jumpserver-install.sh index 41e7d66..e9c11ca 100644 --- a/install/jumpserver-install.sh +++ b/install/jumpserver-install.sh @@ -3,7 +3,7 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: Nícolas Pastorello (opastorello) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://jumpserver.com/ +# Source: https://github.com/jumpserver/jumpserver source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color From 86f1e8be33a759a48966538377e60226f852fc2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Sat, 12 Apr 2025 15:04:23 -0300 Subject: [PATCH 0501/1614] Update install/jumpserver-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/jumpserver-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/jumpserver-install.sh b/install/jumpserver-install.sh index e9c11ca..4cc2539 100644 --- a/install/jumpserver-install.sh +++ b/install/jumpserver-install.sh @@ -24,7 +24,7 @@ msg_info "Installing JumpServer" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/jumpserver/installer/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/') curl -fsSL "https://github.com/jumpserver/installer/releases/download/${RELEASE}/jumpserver-installer-${RELEASE}.tar.gz" -o jumpserver-installer-${RELEASE}.tar.gz -$STD mkdir -p /opt/jumpserver +mkdir -p /opt/jumpserver $STD tar -xzvf jumpserver-installer-${RELEASE}.tar.gz -C /opt/jumpserver --strip-components=1 cd /opt/jumpserver $STD ./jmsctl.sh install < Date: Sun, 13 Apr 2025 12:33:41 +0000 Subject: [PATCH 0502/1614] Update versions.json --- frontend/public/json/versions.json | 162 +++++++++++++++-------------- 1 file changed, 86 insertions(+), 76 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index f3096b8..eff2049 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,8 +1,88 @@ [ + { + "name": "evcc-io/evcc", + "version": "0.203.0", + "date": "2025-04-13T11:49:39Z" + }, { "name": "fhem/fhem-mirror", "version": "6.2", - "date": "2025-04-12T10:30:19Z" + "date": "2025-04-13T10:32:39Z" + }, + { + "name": "syncthing/syncthing", + "version": "v2.0.0-beta.9", + "date": "2025-04-12T13:58:29Z" + }, + { + "name": "Lidarr/Lidarr", + "version": "v2.10.3.4602", + "date": "2025-03-23T11:00:37Z" + }, + { + "name": "Readarr/Readarr", + "version": "v2.0.0.4645", + "date": "2017-03-07T18:56:06Z" + }, + { + "name": "Prowlarr/Prowlarr", + "version": "v1.33.3.5008", + "date": "2025-04-09T17:58:37Z" + }, + { + "name": "Radarr/Radarr", + "version": "v5.21.1.9799", + "date": "2025-03-24T15:52:12Z" + }, + { + "name": "morpheus65535/bazarr", + "version": "v1.5.1", + "date": "2025-01-01T16:15:52Z" + }, + { + "name": "open-webui/open-webui", + "version": "v0.6.4", + "date": "2025-04-13T06:01:32Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1773", + "date": "2025-04-13T05:56:23Z" + }, + { + "name": "slskd/slskd", + "version": "0.22.4", + "date": "2025-04-13T00:14:13Z" + }, + { + "name": "Tautulli/Tautulli", + "version": "v2.15.2", + "date": "2025-04-12T23:27:51Z" + }, + { + "name": "StarFleetCPTN/GoMFT", + "version": "v0.2.11", + "date": "2025-04-12T21:13:08Z" + }, + { + "name": "semaphoreui/semaphore", + "version": "v2.14.0-beta1", + "date": "2025-04-12T20:14:09Z" + }, + { + "name": "karakeep-app/karakeep", + "version": "sdk/v0.23.2", + "date": "2025-04-12T18:37:40Z" + }, + { + "name": "MediaBrowser/Emby.Releases", + "version": "4.8.11.0", + "date": "2025-03-10T06:39:11Z" + }, + { + "name": "rogerfar/rdt-client", + "version": "v2.0.104", + "date": "2025-04-12T14:24:39Z" }, { "name": "home-assistant/core", @@ -16,23 +96,8 @@ }, { "name": "runtipi/runtipi", - "version": "nightly", - "date": "2025-04-08T07:12:33Z" - }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1767", - "date": "2025-04-12T06:06:09Z" - }, - { - "name": "morpheus65535/bazarr", - "version": "v1.5.1", - "date": "2025-01-01T16:15:52Z" - }, - { - "name": "StarFleetCPTN/GoMFT", - "version": "v0.2.10", - "date": "2025-04-12T01:53:46Z" + "version": "v3.10.0", + "date": "2025-03-15T14:38:16Z" }, { "name": "Bubka/2FAuth", @@ -89,11 +154,6 @@ "version": "release-1.23.0rc2", "date": "2025-04-11T13:24:25Z" }, - { - "name": "MediaBrowser/Emby.Releases", - "version": "4.8.11.0", - "date": "2025-03-10T06:39:11Z" - }, { "name": "docmost/docmost", "version": "v0.10.1", @@ -104,11 +164,6 @@ "version": "0.49.13", "date": "2025-04-11T11:48:06Z" }, - { - "name": "semaphoreui/semaphore", - "version": "v2.13.13", - "date": "2025-04-11T10:15:13Z" - }, { "name": "sabnzbd/sabnzbd", "version": "4.5.1", @@ -194,16 +249,6 @@ "version": "v2.15.1", "date": "2025-04-09T22:26:39Z" }, - { - "name": "syncthing/syncthing", - "version": "v2.0.0-beta.7", - "date": "2025-04-09T13:41:32Z" - }, - { - "name": "Prowlarr/Prowlarr", - "version": "v1.33.3.5008", - "date": "2025-04-09T17:58:37Z" - }, { "name": "jupyter/notebook", "version": "v7.4.0", @@ -219,11 +264,6 @@ "version": "10.0.18", "date": "2025-02-12T11:07:02Z" }, - { - "name": "slskd/slskd", - "version": "0.22.3", - "date": "2025-04-09T14:02:12Z" - }, { "name": "HabitRPG/habitica", "version": "v5.35.2", @@ -359,11 +399,6 @@ "version": "server/public/v0.1.11", "date": "2025-03-28T14:04:31Z" }, - { - "name": "open-webui/open-webui", - "version": "v0.6.2", - "date": "2025-04-07T03:41:23Z" - }, { "name": "Dolibarr/dolibarr", "version": "21.0.1", @@ -394,16 +429,6 @@ "version": "v1.19.7", "date": "2025-04-06T14:22:44Z" }, - { - "name": "Radarr/Radarr", - "version": "v5.21.1.9799", - "date": "2025-03-24T15:52:12Z" - }, - { - "name": "karakeep-app/karakeep", - "version": "extension/v1.2.4", - "date": "2025-04-06T11:56:18Z" - }, { "name": "TechnitiumSoftware/DnsServer", "version": "v13.5.0", @@ -450,23 +475,8 @@ "date": "2025-04-05T12:07:32Z" }, { - "name": "Kozea/Radicale", - "version": "v3.5.1", - "date": "2025-04-05T06:20:18Z" - }, - { - "name": "actualbudget/actual", - "version": "v25.4.0", - "date": "2025-04-05T04:14:57Z" - }, - { - "name": "Koenkk/zigbee2mqtt", - "version": "2.2.1", - "date": "2025-04-04T20:15:48Z" - }, - { - "name": "Athou/commafeed", - "version": "5.7.0", - "date": "2025-04-04T18:10:16Z" + "name": "MagicMirrorOrg/MagicMirror", + "version": "v2.31.0", + "date": "2025-04-01T18:12:45Z" } ] From ef1e7ecf881e84cf8d77ee8d418281a5f9e6fca5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:22:37 +0200 Subject: [PATCH 0503/1614] remove adguard --- ct/alpine-adguard.sh | 46 --- install/alpine-adguard-install.sh | 47 --- misc/tools.func | 637 +++++++++++++++--------------- 3 files changed, 318 insertions(+), 412 deletions(-) delete mode 100644 ct/alpine-adguard.sh delete mode 100644 install/alpine-adguard-install.sh diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh deleted file mode 100644 index 99481f1..0000000 --- a/ct/alpine-adguard.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://adguardhome.com/ - -APP="Alpine-AdGuard" -var_tags="${var_tags:-alpine;networking}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-256}" -var_disk="${var_disk:-1}" -var_os="${var_os:-alpine}" -var_version="${var_version:-3.21}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade - msg_ok "Updated Alpine Packages" - - msg_info "Updating AdGuard Home" - $STD /opt/adguardhome/AdGuardHome --update - msg_ok "Updated AdGuard Home" - - msg_info "Restarting AdGuard Home" - $STD rc-service adguardhome restart - msg_ok "Restarted AdGuard Home" - - exit 0 -} - -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}:3000${CL}" diff --git a/install/alpine-adguard-install.sh b/install/alpine-adguard-install.sh deleted file mode 100644 index fa0d5ba..0000000 --- a/install/alpine-adguard-install.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://adguardhome.com/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Downloading AdGuard Home" -$STD curl -fsSL -o /tmp/AdGuardHome_linux_amd64.tar.gz \ - "https://github.com/AdguardTeam/AdGuardHome/releases/latest/download/AdGuardHome_linux_amd64.tar.gz" -msg_ok "Downloaded AdGuard Home" - -msg_info "Installing AdGuard Home" -$STD tar -xzf /tmp/AdGuardHome_linux_amd64.tar.gz -C /opt -$STD rm /tmp/AdGuardHome_linux_amd64.tar.gz -msg_ok "Installed AdGuard Home" - -msg_info "Creating AdGuard Home Service" -cat </etc/init.d/adguardhome -#!/sbin/openrc-run -name="AdGuardHome" -description="AdGuard Home Service" -command="/opt/AdGuardHome/AdGuardHome" -command_background="yes" -pidfile="/run/adguardhome.pid" -EOF -$STD chmod +x /etc/init.d/adguardhome -msg_ok "Created AdGuard Home Service" - -msg_info "Enabling AdGuard Home Service" -$STD rc-update add adguardhome default -msg_ok "Enabled AdGuard Home Service" - -msg_info "Starting AdGuard Home" -$STD rc-service adguardhome start -msg_ok "Started AdGuard Home" - -motd_ssh -customize diff --git a/misc/tools.func b/misc/tools.func index 1205c68..fdde509 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -1,380 +1,379 @@ install_node_and_modules() { - local NODE_VERSION="${NODE_VERSION:-22}" - local NODE_MODULE="${NODE_MODULE:-}" - local CURRENT_NODE_VERSION="" - local NEED_NODE_INSTALL=false + local NODE_VERSION="${NODE_VERSION:-22}" + local NODE_MODULE="${NODE_MODULE:-}" + local CURRENT_NODE_VERSION="" + local NEED_NODE_INSTALL=false - # Check if Node.js is already installed - if command -v node >/dev/null; then - CURRENT_NODE_VERSION="$(node -v | grep -oP '^v\K[0-9]+')" - if [[ "$CURRENT_NODE_VERSION" != "$NODE_VERSION" ]]; then - msg_info "Node.js version $CURRENT_NODE_VERSION found, replacing with $NODE_VERSION" - NEED_NODE_INSTALL=true - else - msg_ok "Node.js $NODE_VERSION already installed" - fi - else - msg_info "Node.js not found, installing version $NODE_VERSION" - NEED_NODE_INSTALL=true - fi - - # Install Node.js if required - if [[ "$NEED_NODE_INSTALL" == true ]]; then - $STD apt-get purge -y nodejs - rm -f /etc/apt/sources.list.d/nodesource.list /etc/apt/keyrings/nodesource.gpg - - mkdir -p /etc/apt/keyrings - - if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \ - gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; then - msg_error "Failed to download or import NodeSource GPG key" - exit 1 - fi - - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_VERSION}.x nodistro main" \ - > /etc/apt/sources.list.d/nodesource.list - - if ! apt-get update >/dev/null 2>&1; then - msg_error "Failed to update APT repositories after adding NodeSource" - exit 1 - fi - - if ! apt-get install -y nodejs >/dev/null 2>&1; then - msg_error "Failed to install Node.js ${NODE_VERSION} from NodeSource" - exit 1 - fi - - msg_ok "Installed Node.js ${NODE_VERSION}" - fi - - export NODE_OPTIONS="--max_old_space_size=4096" - - # Install global Node modules - if [[ -n "$NODE_MODULE" ]]; then - IFS=',' read -ra MODULES <<< "$NODE_MODULE" - for mod in "${MODULES[@]}"; do - local MODULE_NAME MODULE_REQ_VERSION MODULE_INSTALLED_VERSION - if [[ "$mod" == *"@"* ]]; then - MODULE_NAME="${mod%@*}" - MODULE_REQ_VERSION="${mod#*@}" - else - MODULE_NAME="$mod" - MODULE_REQ_VERSION="latest" - fi - - # Check if the module is already installed - if npm list -g --depth=0 "$MODULE_NAME" >/dev/null 2>&1; then - MODULE_INSTALLED_VERSION="$(npm list -g --depth=0 "$MODULE_NAME" | grep "$MODULE_NAME@" | awk -F@ '{print $2}' | tr -d '[:space:]')" - if [[ "$MODULE_REQ_VERSION" != "latest" && "$MODULE_REQ_VERSION" != "$MODULE_INSTALLED_VERSION" ]]; then - msg_info "Updating $MODULE_NAME from v$MODULE_INSTALLED_VERSION to v$MODULE_REQ_VERSION" - if ! $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}"; then - msg_error "Failed to update $MODULE_NAME to version $MODULE_REQ_VERSION" - exit 1 - fi - elif [[ "$MODULE_REQ_VERSION" == "latest" ]]; then - msg_info "Updating $MODULE_NAME to latest version" - if ! $STD npm install -g "${MODULE_NAME}@latest"; then - msg_error "Failed to update $MODULE_NAME to latest version" - exit 1 - fi + # Check if Node.js is already installed + if command -v node >/dev/null; then + CURRENT_NODE_VERSION="$(node -v | grep -oP '^v\K[0-9]+')" + if [[ "$CURRENT_NODE_VERSION" != "$NODE_VERSION" ]]; then + msg_info "Node.js version $CURRENT_NODE_VERSION found, replacing with $NODE_VERSION" + NEED_NODE_INSTALL=true else - msg_ok "$MODULE_NAME@$MODULE_INSTALLED_VERSION already installed" + msg_ok "Node.js $NODE_VERSION already installed" fi - else - msg_info "Installing $MODULE_NAME@$MODULE_REQ_VERSION" - if ! $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}"; then - msg_error "Failed to install $MODULE_NAME@$MODULE_REQ_VERSION" - exit 1 + else + msg_info "Node.js not found, installing version $NODE_VERSION" + NEED_NODE_INSTALL=true + fi + + # Install Node.js if required + if [[ "$NEED_NODE_INSTALL" == true ]]; then + $STD apt-get purge -y nodejs + rm -f /etc/apt/sources.list.d/nodesource.list /etc/apt/keyrings/nodesource.gpg + + mkdir -p /etc/apt/keyrings + + if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | + gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; then + msg_error "Failed to download or import NodeSource GPG key" + exit 1 fi - fi - done - msg_ok "All requested Node modules have been processed" - fi + + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_VERSION}.x nodistro main" \ + >/etc/apt/sources.list.d/nodesource.list + + if ! apt-get update >/dev/null 2>&1; then + msg_error "Failed to update APT repositories after adding NodeSource" + exit 1 + fi + + if ! apt-get install -y nodejs >/dev/null 2>&1; then + msg_error "Failed to install Node.js ${NODE_VERSION} from NodeSource" + exit 1 + fi + + msg_ok "Installed Node.js ${NODE_VERSION}" + fi + + export NODE_OPTIONS="--max_old_space_size=4096" + + # Install global Node modules + if [[ -n "$NODE_MODULE" ]]; then + IFS=',' read -ra MODULES <<<"$NODE_MODULE" + for mod in "${MODULES[@]}"; do + local MODULE_NAME MODULE_REQ_VERSION MODULE_INSTALLED_VERSION + if [[ "$mod" == *"@"* ]]; then + MODULE_NAME="${mod%@*}" + MODULE_REQ_VERSION="${mod#*@}" + else + MODULE_NAME="$mod" + MODULE_REQ_VERSION="latest" + fi + + # Check if the module is already installed + if npm list -g --depth=0 "$MODULE_NAME" >/dev/null 2>&1; then + MODULE_INSTALLED_VERSION="$(npm list -g --depth=0 "$MODULE_NAME" | grep "$MODULE_NAME@" | awk -F@ '{print $2}' | tr -d '[:space:]')" + if [[ "$MODULE_REQ_VERSION" != "latest" && "$MODULE_REQ_VERSION" != "$MODULE_INSTALLED_VERSION" ]]; then + msg_info "Updating $MODULE_NAME from v$MODULE_INSTALLED_VERSION to v$MODULE_REQ_VERSION" + if ! $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}"; then + msg_error "Failed to update $MODULE_NAME to version $MODULE_REQ_VERSION" + exit 1 + fi + elif [[ "$MODULE_REQ_VERSION" == "latest" ]]; then + msg_info "Updating $MODULE_NAME to latest version" + if ! $STD npm install -g "${MODULE_NAME}@latest"; then + msg_error "Failed to update $MODULE_NAME to latest version" + exit 1 + fi + else + msg_ok "$MODULE_NAME@$MODULE_INSTALLED_VERSION already installed" + fi + else + msg_info "Installing $MODULE_NAME@$MODULE_REQ_VERSION" + if ! $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}"; then + msg_error "Failed to install $MODULE_NAME@$MODULE_REQ_VERSION" + exit 1 + fi + fi + done + msg_ok "All requested Node modules have been processed" + fi } - function install_postgresql() { - local PG_VERSION="${PG_VERSION:-15}" - local CURRENT_PG_VERSION="" - local DISTRO - local NEED_PG_INSTALL=false - DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" + local PG_VERSION="${PG_VERSION:-15}" + local CURRENT_PG_VERSION="" + local DISTRO + local NEED_PG_INSTALL=false + DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" - if command -v psql >/dev/null; then - CURRENT_PG_VERSION="$(psql -V | grep -oP '\s\K[0-9]+(?=\.)')" - if [[ "$CURRENT_PG_VERSION" != "$PG_VERSION" ]]; then - msg_info "PostgreSQL Version $CURRENT_PG_VERSION found, replacing with $PG_VERSION" - NEED_PG_INSTALL=true + if command -v psql >/dev/null; then + CURRENT_PG_VERSION="$(psql -V | grep -oP '\s\K[0-9]+(?=\.)')" + if [[ "$CURRENT_PG_VERSION" != "$PG_VERSION" ]]; then + msg_info "PostgreSQL Version $CURRENT_PG_VERSION found, replacing with $PG_VERSION" + NEED_PG_INSTALL=true + fi + else + msg_info "PostgreSQL not found, installing version $PG_VERSION" + NEED_PG_INSTALL=true fi - else - msg_info "PostgreSQL not found, installing version $PG_VERSION" - NEED_PG_INSTALL=true - fi - if [[ "$NEED_PG_INSTALL" == true ]]; then - msg_info "Stopping PostgreSQL if running" - systemctl stop postgresql >/dev/null 2>&1 || true + if [[ "$NEED_PG_INSTALL" == true ]]; then + msg_info "Stopping PostgreSQL if running" + systemctl stop postgresql >/dev/null 2>&1 || true - msg_info "Removing conflicting PostgreSQL packages" - $STD apt-get purge -y "postgresql*" - rm -f /etc/apt/sources.list.d/pgdg.list /etc/apt/trusted.gpg.d/postgresql.gpg + msg_info "Removing conflicting PostgreSQL packages" + $STD apt-get purge -y "postgresql*" + rm -f /etc/apt/sources.list.d/pgdg.list /etc/apt/trusted.gpg.d/postgresql.gpg - msg_info "Setting up PostgreSQL Repository" - curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg + msg_info "Setting up PostgreSQL Repository" + curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | + gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg - echo "deb https://apt.postgresql.org/pub/repos/apt ${DISTRO}-pgdg main" \ - > /etc/apt/sources.list.d/pgdg.list + echo "deb https://apt.postgresql.org/pub/repos/apt ${DISTRO}-pgdg main" \ + >/etc/apt/sources.list.d/pgdg.list - $STD apt-get update - $STD apt-get install -y "postgresql-${PG_VERSION}" + $STD apt-get update + $STD apt-get install -y "postgresql-${PG_VERSION}" - msg_ok "Installed PostgreSQL ${PG_VERSION}" - fi + msg_ok "Installed PostgreSQL ${PG_VERSION}" + fi } function install_mariadb() { - local MARIADB_VERSION="${MARIADB_VERSION:-10.11}" - local CURRENT_VERSION="" - local NEED_INSTALL=false + local MARIADB_VERSION="${MARIADB_VERSION:-10.11}" + local CURRENT_VERSION="" + local NEED_INSTALL=false - if command -v mariadb >/dev/null; then - CURRENT_VERSION="$(mariadb --version | grep -oP 'Ver\s+\K[0-9]+\.[0-9]+')" - if [[ "$CURRENT_VERSION" != "$MARIADB_VERSION" ]]; then - msg_info "MariaDB $CURRENT_VERSION found, replacing with $MARIADB_VERSION" - NEED_INSTALL=true + if command -v mariadb >/dev/null; then + CURRENT_VERSION="$(mariadb --version | grep -oP 'Ver\s+\K[0-9]+\.[0-9]+')" + if [[ "$CURRENT_VERSION" != "$MARIADB_VERSION" ]]; then + msg_info "MariaDB $CURRENT_VERSION found, replacing with $MARIADB_VERSION" + NEED_INSTALL=true + else + msg_ok "MariaDB $MARIADB_VERSION already installed" + fi else - msg_ok "MariaDB $MARIADB_VERSION already installed" + msg_info "MariaDB not found, installing version $MARIADB_VERSION" + NEED_INSTALL=true fi - else - msg_info "MariaDB not found, installing version $MARIADB_VERSION" - NEED_INSTALL=true - fi - if [[ "$NEED_INSTALL" == true ]]; then - msg_info "Removing conflicting MariaDB packages" - $STD systemctl stop mariadb >/dev/null 2>&1 || true - $STD apt-get purge -y 'mariadb*' - rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg + if [[ "$NEED_INSTALL" == true ]]; then + msg_info "Removing conflicting MariaDB packages" + $STD systemctl stop mariadb >/dev/null 2>&1 || true + $STD apt-get purge -y 'mariadb*' + rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg - msg_info "Setting up MariaDB Repository" - curl -fsSL "https://mariadb.org/mariadb_release_signing_key.asc" | gpg --dearmor -o /etc/apt/trusted.gpg.d/mariadb.gpg - DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" - echo "deb [signed-by=/etc/apt/trusted.gpg.d/mariadb.gpg] http://mirror.mariadb.org/repo/${MARIADB_VERSION}/debian ${DISTRO_CODENAME} main" \ - > /etc/apt/sources.list.d/mariadb.list + msg_info "Setting up MariaDB Repository" + curl -fsSL "https://mariadb.org/mariadb_release_signing_key.asc" | gpg --dearmor -o /etc/apt/trusted.gpg.d/mariadb.gpg + DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" + echo "deb [signed-by=/etc/apt/trusted.gpg.d/mariadb.gpg] http://mirror.mariadb.org/repo/${MARIADB_VERSION}/debian ${DISTRO_CODENAME} main" \ + >/etc/apt/sources.list.d/mariadb.list - $STD apt-get update - $STD apt-get install -y mariadb-server mariadb-client + $STD apt-get update + $STD apt-get install -y mariadb-server mariadb-client - msg_ok "Installed MariaDB $MARIADB_VERSION" - fi + msg_ok "Installed MariaDB $MARIADB_VERSION" + fi } function install_mysql() { - local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" - local CURRENT_VERSION="" - local NEED_INSTALL=false + local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" + local CURRENT_VERSION="" + local NEED_INSTALL=false - if command -v mysql >/dev/null; then - CURRENT_VERSION="$(mysql --version | grep -oP 'Distrib\s+\K[0-9]+\.[0-9]+')" - if [[ "$CURRENT_VERSION" != "$MYSQL_VERSION" ]]; then - msg_info "MySQL $CURRENT_VERSION found, replacing with $MYSQL_VERSION" - NEED_INSTALL=true + if command -v mysql >/dev/null; then + CURRENT_VERSION="$(mysql --version | grep -oP 'Distrib\s+\K[0-9]+\.[0-9]+')" + if [[ "$CURRENT_VERSION" != "$MYSQL_VERSION" ]]; then + msg_info "MySQL $CURRENT_VERSION found, replacing with $MYSQL_VERSION" + NEED_INSTALL=true + else + msg_ok "MySQL $MYSQL_VERSION already installed" + fi else - msg_ok "MySQL $MYSQL_VERSION already installed" + msg_info "MySQL not found, installing version $MYSQL_VERSION" + NEED_INSTALL=true fi - else - msg_info "MySQL not found, installing version $MYSQL_VERSION" - NEED_INSTALL=true - fi - if [[ "$NEED_INSTALL" == true ]]; then - msg_info "Removing conflicting MySQL packages" - $STD systemctl stop mysql >/dev/null 2>&1 || true - $STD apt-get purge -y 'mysql*' - rm -f /etc/apt/sources.list.d/mysql.list /etc/apt/trusted.gpg.d/mysql.gpg + if [[ "$NEED_INSTALL" == true ]]; then + msg_info "Removing conflicting MySQL packages" + $STD systemctl stop mysql >/dev/null 2>&1 || true + $STD apt-get purge -y 'mysql*' + rm -f /etc/apt/sources.list.d/mysql.list /etc/apt/trusted.gpg.d/mysql.gpg - msg_info "Setting up MySQL APT Repository" - DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" - curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | gpg --dearmor -o /etc/apt/trusted.gpg.d/mysql.gpg - echo "deb [signed-by=/etc/apt/trusted.gpg.d/mysql.gpg] https://repo.mysql.com/apt/debian/ ${DISTRO_CODENAME} mysql-${MYSQL_VERSION}" \ - > /etc/apt/sources.list.d/mysql.list + msg_info "Setting up MySQL APT Repository" + DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" + curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | gpg --dearmor -o /etc/apt/trusted.gpg.d/mysql.gpg + echo "deb [signed-by=/etc/apt/trusted.gpg.d/mysql.gpg] https://repo.mysql.com/apt/debian/ ${DISTRO_CODENAME} mysql-${MYSQL_VERSION}" \ + >/etc/apt/sources.list.d/mysql.list - $STD apt-get update - $STD apt-get install -y mysql-server + $STD apt-get update + $STD apt-get install -y mysql-server - msg_ok "Installed MySQL $MYSQL_VERSION" - fi + msg_ok "Installed MySQL $MYSQL_VERSION" + fi } fetch_and_deploy_gh_release() { - local repo="$1" - local app=$(echo ${APPLICATION,,} | tr -d ' ') - local api_url="https://api.github.com/repos/$repo/releases/latest" - local header=() - local attempt=0 - local max_attempts=3 - local api_response tag http_code - local current_version="" - local curl_timeout="--connect-timeout 10 --max-time 30" + local repo="$1" + local app=$(echo ${APPLICATION,,} | tr -d ' ') + local api_url="https://api.github.com/repos/$repo/releases/latest" + local header=() + local attempt=0 + local max_attempts=3 + local api_response tag http_code + local current_version="" + local curl_timeout="--connect-timeout 10 --max-time 30" - # Check if the app directory exists and if there's a version file - if [[ -f "/opt/${app}_version.txt" ]]; then - current_version=$(cat "/opt/${app}_version.txt") - $STD msg_info "Current version: $current_version" - fi - - # ensure that jq is installed - if ! command -v jq &>/dev/null; then - $STD msg_info "Installing jq..." - apt-get update -qq &>/dev/null - apt-get install -y jq &>/dev/null || { - msg_error "Failed to install jq" - return 1 - } - fi - - [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") - - until [[ $attempt -ge $max_attempts ]]; do - ((attempt++)) || true - $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" - - api_response=$(curl $curl_timeout -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url") - http_code="${api_response:(-3)}" - - if [[ "$http_code" == "404" ]]; then - msg_error "Repository $repo has no Release candidate (404)" - return 1 + # Check if the app directory exists and if there's a version file + if [[ -f "/opt/${app}_version.txt" ]]; then + current_version=$(cat "/opt/${app}_version.txt") + $STD msg_info "Current version: $current_version" fi - if [[ "$http_code" != "200" ]]; then - $STD msg_info "Request failed with HTTP $http_code, retrying...\n" - sleep $((attempt * 2)) - continue + # ensure that jq is installed + if ! command -v jq &>/dev/null; then + $STD msg_info "Installing jq..." + $STD apt-get update -qq &>/dev/null + $STD apt-get install -y jq &>/dev/null || { + msg_error "Failed to install jq" + return 1 + } fi - api_response=$(/dev/null; then - msg_error "Repository not found: $repo" - return 1 - fi + api_response=$(curl $curl_timeout -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url") + http_code="${api_response:(-3)}" - tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') - [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + if [[ "$http_code" == "404" ]]; then + msg_error "Repository $repo has no Release candidate (404)" + return 1 + fi + + if [[ "$http_code" != "200" ]]; then + $STD msg_info "Request failed with HTTP $http_code, retrying...\n" + sleep $((attempt * 2)) + continue + fi + + api_response=$(/dev/null; then + msg_error "Repository not found: $repo" + return 1 + fi + + tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + + if [[ -z "$tag" ]]; then + $STD msg_info "Empty tag received, retrying...\n" + sleep $((attempt * 2)) + continue + fi + + $STD msg_ok "Found release: $tag for $repo" + break + done if [[ -z "$tag" ]]; then - $STD msg_info "Empty tag received, retrying...\n" - sleep $((attempt * 2)) - continue + msg_error "Failed to fetch release for $repo after $max_attempts attempts." + exit 1 fi - $STD msg_ok "Found release: $tag for $repo" - break - done - - if [[ -z "$tag" ]]; then - msg_error "Failed to fetch release for $repo after $max_attempts attempts." - exit 1 - fi - - # Version comparison (if we already have this version, skip) - if [[ "$current_version" == "$tag" ]]; then - $STD msg_info "Already running the latest version ($tag). Skipping update." - return 0 - fi - - local version="$tag" - local base_url="https://github.com/$repo/releases/download/v$tag" - local tmpdir - tmpdir=$(mktemp -d) || return 1 - - # Extract list of assets from the Release API - local assets urls - assets=$(echo "$api_response" | jq -r '.assets[].browser_download_url') || true - - # Detect current architecture - local arch - if command -v dpkg &>/dev/null; then - arch=$(dpkg --print-architecture) - elif command -v uname &>/dev/null; then - case "$(uname -m)" in - x86_64) arch="amd64" ;; - aarch64) arch="arm64" ;; - armv7l) arch="armv7" ;; - armv6l) arch="armv6" ;; - *) arch="unknown" ;; - esac - else - arch="unknown" - fi - $STD msg_info "Detected system architecture: $arch" - - # Try to find a matching asset for our architecture - local url="" - for u in $assets; do - if [[ "$u" =~ $arch.*\.tar\.gz$ ]]; then - url="$u" - $STD msg_info "Found matching architecture asset: $url" - break + # Version comparison (if we already have this version, skip) + if [[ "$current_version" == "$tag" ]]; then + $STD msg_info "Already running the latest version ($tag). Skipping update." + return 0 fi - done - # Fallback to other architectures if our specific one isn't found - if [[ -z "$url" ]]; then + local version="$tag" + local base_url="https://github.com/$repo/releases/download/v$tag" + local tmpdir + tmpdir=$(mktemp -d) || return 1 + + # Extract list of assets from the Release API + local assets urls + assets=$(echo "$api_response" | jq -r '.assets[].browser_download_url') || true + + # Detect current architecture + local arch + if command -v dpkg &>/dev/null; then + arch=$(dpkg --print-architecture) + elif command -v uname &>/dev/null; then + case "$(uname -m)" in + x86_64) arch="amd64" ;; + aarch64) arch="arm64" ;; + armv7l) arch="armv7" ;; + armv6l) arch="armv6" ;; + *) arch="unknown" ;; + esac + else + arch="unknown" + fi + $STD msg_info "Detected system architecture: $arch" + + # Try to find a matching asset for our architecture + local url="" for u in $assets; do - if [[ "$u" =~ (x86_64|amd64|arm64|armv7|armv6).*\.tar\.gz$ ]]; then - url="$u" - $STD msg_info "Architecture-specific asset not found, using: $url" - break - fi + if [[ "$u" =~ $arch.*\.tar\.gz$ ]]; then + url="$u" + $STD msg_info "Found matching architecture asset: $url" + break + fi done - fi - # Fallback to any tar.gz - if [[ -z "$url" ]]; then - for u in $assets; do - if [[ "$u" =~ \.tar\.gz$ ]]; then - url="$u" - $STD msg_info "Using generic tarball: $url" - break - fi - done - fi + # Fallback to other architectures if our specific one isn't found + if [[ -z "$url" ]]; then + for u in $assets; do + if [[ "$u" =~ (x86_64|amd64|arm64|armv7|armv6).*\.tar\.gz$ ]]; then + url="$u" + $STD msg_info "Architecture-specific asset not found, using: $url" + break + fi + done + fi - # Final fallback to GitHub source tarball - if [[ -z "$url" ]]; then - url="https://github.com/$repo/archive/refs/tags/$version.tar.gz" - $STD msg_info "Trying GitHub source tarball fallback: $url" - fi + # Fallback to any tar.gz + if [[ -z "$url" ]]; then + for u in $assets; do + if [[ "$u" =~ \.tar\.gz$ ]]; then + url="$u" + $STD msg_info "Using generic tarball: $url" + break + fi + done + fi - local filename="${url##*/}" - $STD msg_info "Downloading $url" + # Final fallback to GitHub source tarball + if [[ -z "$url" ]]; then + url="https://github.com/$repo/archive/refs/tags/$version.tar.gz" + $STD msg_info "Trying GitHub source tarball fallback: $url" + fi - if ! curl $curl_timeout -fsSL -o "$tmpdir/$filename" "$url"; then - msg_error "Failed to download release asset from $url" + local filename="${url##*/}" + $STD msg_info "Downloading $url" + + if ! curl $curl_timeout -fsSL -o "$tmpdir/$filename" "$url"; then + msg_error "Failed to download release asset from $url" + rm -rf "$tmpdir" + return 1 + fi + + mkdir -p "/opt/$app" + + tar -xzf "$tmpdir/$filename" -C "$tmpdir" + local content_root + content_root=$(find "$tmpdir" -mindepth 1 -maxdepth 1 -type d) + if [[ $(echo "$content_root" | wc -l) -eq 1 ]]; then + cp -r "$content_root"/* "/opt/$app/" + else + cp -r "$tmpdir"/* "/opt/$app/" + fi + + echo "$version" >"/opt/${app}_version.txt" + $STD msg_ok "Deployed $app v$version to /opt/$app" rm -rf "$tmpdir" - return 1 - fi - - mkdir -p "/opt/$app" - - tar -xzf "$tmpdir/$filename" -C "$tmpdir" - local content_root - content_root=$(find "$tmpdir" -mindepth 1 -maxdepth 1 -type d) - if [[ $(echo "$content_root" | wc -l) -eq 1 ]]; then - cp -r "$content_root"/* "/opt/$app/" - else - cp -r "$tmpdir"/* "/opt/$app/" - fi - - echo "$version" >"/opt/${app}_version.txt" - $STD msg_ok "Deployed $app v$version to /opt/$app" - rm -rf "$tmpdir" } From c824630e40d1d6fdad902d0626a67ef66e6b0ac1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:24:21 +0200 Subject: [PATCH 0504/1614] Update alpine-duplicati.sh --- ct/alpine-duplicati.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-duplicati.sh b/ct/alpine-duplicati.sh index ceacf54..e06aba2 100644 --- a/ct/alpine-duplicati.sh +++ b/ct/alpine-duplicati.sh @@ -1,5 +1,5 @@ #!/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) APP="Alpine-Duplicati" var_tags="${var_tags:-alpine}" From a274ff5a3cc9cbada63da9de74047d0257f313fb Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 14 Apr 2025 08:24:40 +0000 Subject: [PATCH 0505/1614] Update .app files --- ct/headers/alpine-adguard | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/alpine-adguard diff --git a/ct/headers/alpine-adguard b/ct/headers/alpine-adguard deleted file mode 100644 index 64d1d6a..0000000 --- a/ct/headers/alpine-adguard +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ _ ___ ________ __ - / | / /___ (_)___ ___ / | ____/ / ____/_ ______ __________/ / - / /| | / / __ \/ / __ \/ _ \______/ /| |/ __ / / __/ / / / __ `/ ___/ __ / - / ___ |/ / /_/ / / / / / __/_____/ ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / -/_/ |_/_/ .___/_/_/ /_/\___/ /_/ |_\__,_/\____/\__,_/\__,_/_/ \__,_/ - /_/ From 0ba9eb1487662cbe59cceadd2457049420dd592c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:27:55 +0200 Subject: [PATCH 0506/1614] fix rclone and duplicati --- ct/alpine-duplicati.sh | 1 + ct/alpine-rclone.sh | 28 +++++++++--------- install/alpine-rclone-install.sh | 50 +++++--------------------------- 3 files changed, 23 insertions(+), 56 deletions(-) diff --git a/ct/alpine-duplicati.sh b/ct/alpine-duplicati.sh index e06aba2..42dbcf8 100644 --- a/ct/alpine-duplicati.sh +++ b/ct/alpine-duplicati.sh @@ -16,6 +16,7 @@ color catch_errors function update_script() { + header_info msg_info "Updating Alpine Packages" $STD apk update $STD apk upgrade diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index b8ca3ca..6f88ecf 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -20,21 +20,21 @@ color catch_errors function update_script() { - header_info - RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then - msg_info "Updating ${APP} LXC" - temp_file=$(mktemp) - curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" - $STD unzip -j -o "$temp_file" '*/**' -d /opt/rclone - rm -f "$temp_file" - echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt - msg_ok "Updated Successfully" - else - msg_ok "No update required. ${APP} is already at ${RELEASE}" - fi + header_info + msg_info "Updating Alpine Packages" + $STD apk update + $STD apk upgrade + msg_ok "Updated Alpine Packages" - exit 0 + msg_info "Updating Rclone" + $STD apk upgrade rclone + msg_ok "Updated Rclone" + + msg_info "Restarting Rclone" + $STD rc-service rclone restart || true + msg_ok "Restarted Rclone" + + exit 0 } start diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index 7d29fbb..2f824a7 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -13,51 +13,17 @@ setting_up_container network_check update_os -msg_info "Installing dependencies" -$STD apk add --no-cache \ - unzip \ - apache2-utils -msg_ok "Installed dependencies" +msg_info "Installing Rclone" +$STD apk add --no-cache rclone +msg_ok "Installed Rclone" -msg_info "Installing rclone" -temp_file=$(mktemp) -mkdir -p /opt/rclone -RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" -$STD unzip -j "$temp_file" '*/**' -d /opt/rclone -cd /opt/rclone || exit -PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) -$STD htpasswd -cb -B login.pwd admin "$PASSWORD" -{ - echo "rclone-Credentials" - echo "rclone User Name: admin" - echo "rclone Password: $PASSWORD" -} >>~/rclone.creds -echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt -rm -f "$temp_file" -msg_ok "Installed rclone" - -msg_info "Enabling rclone Service" -cat </etc/init.d/rclone -#!/sbin/openrc-run -description="rclone Service" -command="/opt/rclone/rclone" -command_args="rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-htpasswd /opt/rclone/login.pwd" -command_background="true" -command_user="root" -pidfile="/var/run/rclone.pid" - -depend() { - use net -} -EOF -chmod +x /etc/init.d/rclone +msg_info "Enabling Rclone Service" $STD rc-update add rclone default -msg_ok "Enabled rclone Service" +msg_ok "Enabled Rclone Service" -msg_info "Starting rclone" -$STD service rclone start -msg_ok "Started rclone" +msg_info "Starting Rclone" +$STD rc-service rclone start +msg_ok "Started Rclone" motd_ssh customize From 43879b4415c2a73a4bb41c86185515f03870c523 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 14 Apr 2025 08:28:38 +0000 Subject: [PATCH 0507/1614] Update .app files --- ct/headers/alpine-adguard | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/alpine-adguard diff --git a/ct/headers/alpine-adguard b/ct/headers/alpine-adguard deleted file mode 100644 index 64d1d6a..0000000 --- a/ct/headers/alpine-adguard +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ _ ___ ________ __ - / | / /___ (_)___ ___ / | ____/ / ____/_ ______ __________/ / - / /| | / / __ \/ / __ \/ _ \______/ /| |/ __ / / __/ / / / __ `/ ___/ __ / - / ___ |/ / /_/ / / / / / __/_____/ ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / -/_/ |_/_/ .___/_/_/ /_/\___/ /_/ |_\__,_/\____/\__,_/\__,_/_/ \__,_/ - /_/ From b2c883868a35d47070fa81884e41e77a22e9b31a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:37:17 +0200 Subject: [PATCH 0508/1614] test --- ct/alpine-rclone.sh | 4 +-- install/alpine-rclone-install.sh | 50 +++++++++++++++++++++++++++----- 2 files changed, 44 insertions(+), 10 deletions(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index 6f88ecf..4c5eb23 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -9,7 +9,7 @@ APP="Alpine-rclone" var_tags="${var_tags:-alpine;backup}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-256}" -var_disk="${var_disk:-0.2}" +var_disk="${var_disk:-1}" var_os="${var_os:-alpine}" var_version="${var_version:-3.21}" var_unprivileged="${var_unprivileged:-1}" @@ -20,7 +20,7 @@ color catch_errors function update_script() { - header_info + header_info msg_info "Updating Alpine Packages" $STD apk update $STD apk upgrade diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index 2f824a7..8ec630b 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -13,17 +13,51 @@ setting_up_container network_check update_os -msg_info "Installing Rclone" -$STD apk add --no-cache rclone -msg_ok "Installed Rclone" +msg_info "Installing dependencies" +$STD apk add --no-cache \ + unzip \ + apache2-utils +msg_ok "Installed dependencies" -msg_info "Enabling Rclone Service" +msg_info "Installing rclone" +temp_file=$(mktemp) +mkdir -p /opt/rclone +RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file +$STD unzip -j $temp_file '*/**' -d /opt/rclone +cd /opt/rclone +PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) +$STD htpasswd -cb -B login.pwd admin $PASSWORD +{ + echo "rclone-Credentials" + echo "rclone User Name: admin" + echo "rclone Password: $PASSWORD" +} >>~/rclone.creds +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +rm -f $temp_file +msg_ok "Installed rclone" + +msg_info "Enabling rclone Service" +cat </etc/init.d/rclone +#!/sbin/openrc-run +description="rclone Service" +command="/opt/rclone/rclone" +command_args="rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-htpasswd /opt/rclone/login.pwd" +command_background="true" +command_user="root" +pidfile="/var/run/rclone.pid" + +depend() { + use net +} +EOF +chmod +x /etc/init.d/rclone $STD rc-update add rclone default -msg_ok "Enabled Rclone Service" +msg_ok "Enabled rclone Service" -msg_info "Starting Rclone" -$STD rc-service rclone start -msg_ok "Started Rclone" +msg_info "Starting rclone" +$STD service rclone start +msg_ok "Started rclone" motd_ssh customize From f2e731534b2ba8db096da62614d22cc8c687fdb2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:38:58 +0200 Subject: [PATCH 0509/1614] rm --- ct/alpine-duplicati.sh | 42 ----------------------------- install/alpine-duplicati-install.sh | 24 ----------------- 2 files changed, 66 deletions(-) delete mode 100644 ct/alpine-duplicati.sh delete mode 100644 install/alpine-duplicati-install.sh diff --git a/ct/alpine-duplicati.sh b/ct/alpine-duplicati.sh deleted file mode 100644 index 42dbcf8..0000000 --- a/ct/alpine-duplicati.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) - -APP="Alpine-Duplicati" -var_tags="${var_tags:-alpine}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-256}" -var_disk="${var_disk:-1}" -var_os="${var_os:-alpine}" -var_version="${var_version:-3.21}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade - msg_ok "Updated Alpine Packages" - - msg_info "Updating Duplicati" - $STD apk upgrade duplicati - msg_ok "Updated Duplicati" - - msg_info "Restarting Duplicati" - $STD rc-service duplicati restart || true - msg_ok "Restarted Duplicati" - - exit 0 -} - -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 info will vary based on service config. CLI access likely available. ${CL}" diff --git a/install/alpine-duplicati-install.sh b/install/alpine-duplicati-install.sh deleted file mode 100644 index 18cbd45..0000000 --- a/install/alpine-duplicati-install.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies" -$STD apk add --no-cache duplicati -msg_ok "Installed duplicati" - -msg_info "Enabling duplicati Service" -$STD rc-update add duplicati default || true -msg_ok "Enabled duplicati Service" - -msg_info "Starting duplicati" -$STD rc-service duplicati start || true -msg_ok "Started duplicati" - -motd_ssh -customize From f4f9f23a4cbed9eac6b98b802862563f710385d9 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:42:04 +0200 Subject: [PATCH 0510/1614] Update alpine-syncthing.sh --- ct/alpine-syncthing.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/alpine-syncthing.sh b/ct/alpine-syncthing.sh index b48c3bf..1f54852 100644 --- a/ct/alpine-syncthing.sh +++ b/ct/alpine-syncthing.sh @@ -32,8 +32,8 @@ function update_script() { msg_info "Restarting Syncthing" $STD rc-service syncthing restart msg_ok "Restarted Syncthing" - - exit 0 + + exit 1 } start From ee266d56183ae50854fa19dc3c2791f3d323447b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:56:29 +0200 Subject: [PATCH 0511/1614] add php function --- misc/tools.func | 89 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/misc/tools.func b/misc/tools.func index fdde509..0fbde82 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -93,7 +93,7 @@ install_node_and_modules() { } function install_postgresql() { - local PG_VERSION="${PG_VERSION:-15}" + local PG_VERSION="${PG_VERSION:-16}" local CURRENT_PG_VERSION="" local DISTRO local NEED_PG_INSTALL=false @@ -169,6 +169,93 @@ function install_mariadb() { fi } +install_php() { + local PHP_VERSION="${PHP_VERSION:-8.4}" + local PHP_MODULE="${PHP_MODULE:-}" + local PHP_APACHE="${PHP_APACHE:-NO}" + local PHP_FPM="${PHP_FPM:-NO}" + local DEFAULT_MODULES="bcmath,cli,curl,gd,intl,mbstring,opcache,readline,xml,zip" + local COMBINED_MODULES + + local PHP_MEMORY_LIMIT="${PHP_MEMORY_LIMIT:-512M}" + local PHP_UPLOAD_MAX_FILESIZE="${PHP_UPLOAD_MAX_FILESIZE:-128M}" + local PHP_POST_MAX_SIZE="${PHP_POST_MAX_SIZE:-128M}" + local PHP_MAX_EXECUTION_TIME="${PHP_MAX_EXECUTION_TIME:-300}" + + # Merge default + user-defined modules + if [[ -n "$PHP_MODULE" ]]; then + COMBINED_MODULES="${DEFAULT_MODULES},${PHP_MODULE}" + else + COMBINED_MODULES="${DEFAULT_MODULES}" + fi + + # Deduplicate modules + COMBINED_MODULES=$(echo "$COMBINED_MODULES" | tr ',' '\n' | awk '!seen[$0]++' | paste -sd, -) + + local CURRENT_PHP + CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2) + + if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then + $STD echo "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION" + if [[ ! -f /etc/apt/sources.list.d/php.list ]]; then + $STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb + $STD dpkg -i /tmp/debsuryorg-archive-keyring.deb + echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" \ + >/etc/apt/sources.list.d/php.list + $STD apt-get update + fi + + $STD apt-get purge -y "php${CURRENT_PHP//./}"* || true + fi + + local MODULE_LIST="php${PHP_VERSION}" + IFS=',' read -ra MODULES <<<"$COMBINED_MODULES" + for mod in "${MODULES[@]}"; do + MODULE_LIST+=" php${PHP_VERSION}-${mod}" + done + + if [[ "$PHP_APACHE" == "YES" ]]; then + # Optionally disable old Apache PHP module + if [[ -f /etc/apache2/mods-enabled/php${CURRENT_PHP}.load ]]; then + $STD a2dismod php${CURRENT_PHP} || true + fi + fi + + if [[ "$PHP_FPM" == "YES" ]]; then + $STD systemctl stop php${CURRENT_PHP}-fpm || true + $STD systemctl disable php${CURRENT_PHP}-fpm || true + fi + + $STD apt-get install -y $MODULE_LIST + msg_ok "Installed PHP $PHP_VERSION with selected modules" + + if [[ "$PHP_APACHE" == "YES" ]]; then + $STD systemctl restart apache2 || true + fi + + if [[ "$PHP_FPM" == "YES" ]]; then + $STD systemctl enable php${PHP_VERSION}-fpm + $STD systemctl restart php${PHP_VERSION}-fpm + fi + + # Patch all relevant php.ini files + local PHP_INI_PATHS=() + PHP_INI_PATHS+=("/etc/php/${PHP_VERSION}/cli/php.ini") + [[ "$PHP_FPM" == "YES" ]] && PHP_INI_PATHS+=("/etc/php/${PHP_VERSION}/fpm/php.ini") + [[ "$PHP_APACHE" == "YES" ]] && PHP_INI_PATHS+=("/etc/php/${PHP_VERSION}/apache2/php.ini") + + for ini in "${PHP_INI_PATHS[@]}"; do + if [[ -f "$ini" ]]; then + msg_info "Patching $ini" + sed -i "s|^memory_limit = .*|memory_limit = ${PHP_MEMORY_LIMIT}|" "$ini" + sed -i "s|^upload_max_filesize = .*|upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}|" "$ini" + sed -i "s|^post_max_size = .*|post_max_size = ${PHP_POST_MAX_SIZE}|" "$ini" + sed -i "s|^max_execution_time = .*|max_execution_time = ${PHP_MAX_EXECUTION_TIME}|" "$ini" + msg_ok "Patched $ini" + fi + done +} + function install_mysql() { local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" local CURRENT_VERSION="" From 9f6621fca225b911a5aa43f909bbc80927e70fd7 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 11:03:32 +0200 Subject: [PATCH 0512/1614] install_composer --- misc/tools.func | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/misc/tools.func b/misc/tools.func index 0fbde82..5710553 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -256,6 +256,32 @@ install_php() { done } +install_composer() { + local COMPOSER_BIN="/usr/local/bin/composer" + export COMPOSER_ALLOW_SUPERUSER=1 + + # Check if composer is already installed + if [[ -x "$COMPOSER_BIN" ]]; then + local CURRENT_VERSION + CURRENT_VERSION=$("$COMPOSER_BIN" --version | awk '{print $3}') + msg_info "Composer $CURRENT_VERSION found, updating to latest" + else + msg_info "Composer not found, installing latest version" + fi + + # Download and install latest composer + curl -fsSL https://getcomposer.org/installer -o /tmp/composer-setup.php + php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1 + + if [[ $? -ne 0 ]]; then + msg_error "Failed to install Composer" + return 1 + fi + + chmod +x "$COMPOSER_BIN" + msg_ok "Installed Composer $($COMPOSER_BIN --version | awk '{print $3}')" +} + function install_mysql() { local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" local CURRENT_VERSION="" From c604342eec5e8992ab71d6db904adac9698a63d1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 11:05:39 +0200 Subject: [PATCH 0513/1614] go_install --- misc/tools.func | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/misc/tools.func b/misc/tools.func index 5710553..9f927d4 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -282,6 +282,61 @@ install_composer() { msg_ok "Installed Composer $($COMPOSER_BIN --version | awk '{print $3}')" } +install_go() { + local ARCH + case "$(uname -m)" in + x86_64) ARCH="amd64" ;; + aarch64) ARCH="arm64" ;; + *) + msg_error "Unsupported architecture: $(uname -m)" + return 1 + ;; + esac + + # Determine version + if [[ -z "$GO_VERSION" || "$GO_VERSION" == "latest" ]]; then + GO_VERSION=$(curl -fsSL https://go.dev/VERSION?m=text | head -n1 | sed 's/^go//') + if [[ -z "$GO_VERSION" ]]; then + msg_error "Could not determine latest Go version" + return 1 + fi + msg_info "Detected latest Go version: $GO_VERSION" + fi + + local GO_BIN="/usr/local/bin/go" + local GO_INSTALL_DIR="/usr/local/go" + + if [[ -x "$GO_BIN" ]]; then + local CURRENT_VERSION + CURRENT_VERSION=$("$GO_BIN" version | awk '{print $3}' | sed 's/go//') + if [[ "$CURRENT_VERSION" == "$GO_VERSION" ]]; then + msg_ok "Go $GO_VERSION already installed" + return 0 + else + msg_info "Go $CURRENT_VERSION found, upgrading to $GO_VERSION" + rm -rf "$GO_INSTALL_DIR" + fi + else + msg_info "Installing Go $GO_VERSION" + fi + + local TARBALL="go${GO_VERSION}.linux-${ARCH}.tar.gz" + local URL="https://go.dev/dl/${TARBALL}" + local TMP_TAR=$(mktemp) + + curl -fsSL "$URL" -o "$TMP_TAR" || { + msg_error "Failed to download $TARBALL" + return 1 + } + + tar -C /usr/local -xzf "$TMP_TAR" + ln -sf /usr/local/go/bin/go /usr/local/bin/go + ln -sf /usr/local/go/bin/gofmt /usr/local/bin/gofmt + rm -f "$TMP_TAR" + + msg_ok "Installed Go $GO_VERSION" +} + function install_mysql() { local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" local CURRENT_VERSION="" From 061a20e0a2629713419a4c93cacef82dad420f1f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 11:47:50 +0200 Subject: [PATCH 0514/1614] mongodb and java --- misc/tools.func | 156 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 122 insertions(+), 34 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 9f927d4..65b9416 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -92,7 +92,7 @@ install_node_and_modules() { fi } -function install_postgresql() { +install_postgresql() { local PG_VERSION="${PG_VERSION:-16}" local CURRENT_PG_VERSION="" local DISTRO @@ -132,7 +132,7 @@ function install_postgresql() { fi } -function install_mariadb() { +install_mariadb() { local MARIADB_VERSION="${MARIADB_VERSION:-10.11}" local CURRENT_VERSION="" local NEED_INSTALL=false @@ -169,6 +169,43 @@ function install_mariadb() { fi } +install_mysql() { + local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" + local CURRENT_VERSION="" + local NEED_INSTALL=false + + if command -v mysql >/dev/null; then + CURRENT_VERSION="$(mysql --version | grep -oP 'Distrib\s+\K[0-9]+\.[0-9]+')" + if [[ "$CURRENT_VERSION" != "$MYSQL_VERSION" ]]; then + msg_info "MySQL $CURRENT_VERSION found, replacing with $MYSQL_VERSION" + NEED_INSTALL=true + else + msg_ok "MySQL $MYSQL_VERSION already installed" + fi + else + msg_info "MySQL not found, installing version $MYSQL_VERSION" + NEED_INSTALL=true + fi + + if [[ "$NEED_INSTALL" == true ]]; then + msg_info "Removing conflicting MySQL packages" + $STD systemctl stop mysql >/dev/null 2>&1 || true + $STD apt-get purge -y 'mysql*' + rm -f /etc/apt/sources.list.d/mysql.list /etc/apt/trusted.gpg.d/mysql.gpg + + msg_info "Setting up MySQL APT Repository" + DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" + curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | gpg --dearmor -o /etc/apt/trusted.gpg.d/mysql.gpg + echo "deb [signed-by=/etc/apt/trusted.gpg.d/mysql.gpg] https://repo.mysql.com/apt/debian/ ${DISTRO_CODENAME} mysql-${MYSQL_VERSION}" \ + >/etc/apt/sources.list.d/mysql.list + + $STD apt-get update + $STD apt-get install -y mysql-server + + msg_ok "Installed MySQL $MYSQL_VERSION" + fi +} + install_php() { local PHP_VERSION="${PHP_VERSION:-8.4}" local PHP_MODULE="${PHP_MODULE:-}" @@ -337,41 +374,92 @@ install_go() { msg_ok "Installed Go $GO_VERSION" } -function install_mysql() { - local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" - local CURRENT_VERSION="" - local NEED_INSTALL=false - - if command -v mysql >/dev/null; then - CURRENT_VERSION="$(mysql --version | grep -oP 'Distrib\s+\K[0-9]+\.[0-9]+')" - if [[ "$CURRENT_VERSION" != "$MYSQL_VERSION" ]]; then - msg_info "MySQL $CURRENT_VERSION found, replacing with $MYSQL_VERSION" - NEED_INSTALL=true - else - msg_ok "MySQL $MYSQL_VERSION already installed" - fi - else - msg_info "MySQL not found, installing version $MYSQL_VERSION" - NEED_INSTALL=true - fi - - if [[ "$NEED_INSTALL" == true ]]; then - msg_info "Removing conflicting MySQL packages" - $STD systemctl stop mysql >/dev/null 2>&1 || true - $STD apt-get purge -y 'mysql*' - rm -f /etc/apt/sources.list.d/mysql.list /etc/apt/trusted.gpg.d/mysql.gpg - - msg_info "Setting up MySQL APT Repository" - DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" - curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | gpg --dearmor -o /etc/apt/trusted.gpg.d/mysql.gpg - echo "deb [signed-by=/etc/apt/trusted.gpg.d/mysql.gpg] https://repo.mysql.com/apt/debian/ ${DISTRO_CODENAME} mysql-${MYSQL_VERSION}" \ - >/etc/apt/sources.list.d/mysql.list +install_java() { + local JAVA_VERSION="${JAVA_VERSION:-17}" + local DISTRO_CODENAME + DISTRO_CODENAME=$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release) + local DESIRED_PACKAGE="temurin-${JAVA_VERSION}-jdk" + # Add Adoptium repo if missing + if [[ ! -f /etc/apt/sources.list.d/adoptium.list ]]; then + msg_info "Setting up Adoptium Repository" + mkdir -p /etc/apt/keyrings + curl -fsSL "https://packages.adoptium.net/artifactory/api/gpg/key/public" | gpg --dearmor -o /etc/apt/trusted.gpg.d/adoptium.gpg + echo "deb [signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb ${DISTRO_CODENAME} main" \ + >/etc/apt/sources.list.d/adoptium.list $STD apt-get update - $STD apt-get install -y mysql-server - - msg_ok "Installed MySQL $MYSQL_VERSION" + msg_ok "Set up Adoptium Repository" fi + + # Detect currently installed temurin version + local INSTALLED_VERSION="" + if dpkg -l | grep -q "temurin-.*-jdk"; then + INSTALLED_VERSION=$(dpkg -l | awk '/temurin-.*-jdk/{print $2}' | grep -oP 'temurin-\K[0-9]+') + fi + + if [[ "$INSTALLED_VERSION" == "$JAVA_VERSION" ]]; then + msg_info "Temurin JDK $JAVA_VERSION already installed, updating if needed" + $STD apt-get update + $STD apt-get install --only-upgrade -y "$DESIRED_PACKAGE" + msg_ok "Updated Temurin JDK $JAVA_VERSION (if applicable)" + else + if [[ -n "$INSTALLED_VERSION" ]]; then + msg_info "Removing Temurin JDK $INSTALLED_VERSION" + $STD apt-get purge -y "temurin-${INSTALLED_VERSION}-jdk" + fi + + msg_info "Installing Temurin JDK $JAVA_VERSION" + $STD apt-get install -y "$DESIRED_PACKAGE" + msg_ok "Installed Temurin JDK $JAVA_VERSION" + fi +} + +install_mongodb() { + local MONGO_VERSION="${MONGO_VERSION:-8.0}" + local DISTRO_CODENAME + DISTRO_CODENAME=$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release) + local REPO_LIST="/etc/apt/sources.list.d/mongodb-org-${MONGO_VERSION}.list" + + # Aktuell installierte Major-Version ermitteln + local INSTALLED_VERSION="" + if command -v mongod >/dev/null; then + INSTALLED_VERSION=$(mongod --version | awk '/db version/{print $3}' | cut -d. -f1,2) + fi + + if [[ "$INSTALLED_VERSION" == "$MONGO_VERSION" ]]; then + msg_info "MongoDB $MONGO_VERSION already installed, checking for upgrade" + $STD apt-get update + $STD apt-get install --only-upgrade -y mongodb-org + msg_ok "MongoDB $MONGO_VERSION upgraded if needed" + return 0 + fi + + # Ältere Version entfernen (nur Packages, nicht Daten!) + if [[ -n "$INSTALLED_VERSION" ]]; then + msg_info "Replacing MongoDB $INSTALLED_VERSION with $MONGO_VERSION (data will be preserved)" + $STD systemctl stop mongod || true + $STD apt-get purge -y mongodb-org || true + rm -f /etc/apt/sources.list.d/mongodb-org-*.list + rm -f /etc/apt/trusted.gpg.d/mongodb-*.gpg + else + msg_info "Installing MongoDB $MONGO_VERSION" + fi + + # MongoDB Repo hinzufügen + curl -fsSL "https://pgp.mongodb.com/server-${MONGO_VERSION}.asc" | gpg --dearmor -o "/etc/apt/trusted.gpg.d/mongodb-${MONGO_VERSION}.gpg" + echo "deb [signed-by=/etc/apt/trusted.gpg.d/mongodb-${MONGO_VERSION}.gpg] https://repo.mongodb.org/apt/debian ${DISTRO_CODENAME}/mongodb-org/${MONGO_VERSION} main" \ + >"$REPO_LIST" + + $STD apt-get update + $STD apt-get install -y mongodb-org + + # Sicherstellen, dass Datenverzeichnis intakt bleibt + mkdir -p /var/lib/mongodb + chown -R mongodb:mongodb /var/lib/mongodb + + $STD systemctl enable mongod + $STD systemctl start mongod + msg_ok "MongoDB $MONGO_VERSION installed and started" } fetch_and_deploy_gh_release() { From ae6fcf6b76f985cbbe09c8bc9111bba3fa250a0b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 11:54:38 +0200 Subject: [PATCH 0515/1614] Update tools.func --- misc/tools.func | 68 +++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 65b9416..5b35f1d 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -133,40 +133,54 @@ install_postgresql() { } install_mariadb() { - local MARIADB_VERSION="${MARIADB_VERSION:-10.11}" - local CURRENT_VERSION="" - local NEED_INSTALL=false + local MARIADB_VERSION="${MARIADB_VERSION:-latest}" + local DISTRO_CODENAME + DISTRO_CODENAME="$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)" + # grab dynamic latest LTS version + if [[ "$MARIADB_VERSION" == "latest" ]]; then + msg_info "Resolving latest MariaDB version" + MARIADB_VERSION=$(curl -fsSL https://mariadb.org | grep -oP 'MariaDB \K10\.[0-9]+' | head -n1) + if [[ -z "$MARIADB_VERSION" ]]; then + msg_error "Could not determine latest MariaDB version" + return 1 + fi + msg_ok "Latest MariaDB version is $MARIADB_VERSION" + fi + + local CURRENT_VERSION="" if command -v mariadb >/dev/null; then CURRENT_VERSION="$(mariadb --version | grep -oP 'Ver\s+\K[0-9]+\.[0-9]+')" - if [[ "$CURRENT_VERSION" != "$MARIADB_VERSION" ]]; then - msg_info "MariaDB $CURRENT_VERSION found, replacing with $MARIADB_VERSION" - NEED_INSTALL=true - else - msg_ok "MariaDB $MARIADB_VERSION already installed" - fi - else - msg_info "MariaDB not found, installing version $MARIADB_VERSION" - NEED_INSTALL=true fi - if [[ "$NEED_INSTALL" == true ]]; then - msg_info "Removing conflicting MariaDB packages" - $STD systemctl stop mariadb >/dev/null 2>&1 || true - $STD apt-get purge -y 'mariadb*' - rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg - - msg_info "Setting up MariaDB Repository" - curl -fsSL "https://mariadb.org/mariadb_release_signing_key.asc" | gpg --dearmor -o /etc/apt/trusted.gpg.d/mariadb.gpg - DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" - echo "deb [signed-by=/etc/apt/trusted.gpg.d/mariadb.gpg] http://mirror.mariadb.org/repo/${MARIADB_VERSION}/debian ${DISTRO_CODENAME} main" \ - >/etc/apt/sources.list.d/mariadb.list - + if [[ "$CURRENT_VERSION" == "$MARIADB_VERSION" ]]; then + msg_info "MariaDB $MARIADB_VERSION already installed, checking for upgrade" $STD apt-get update - $STD apt-get install -y mariadb-server mariadb-client - - msg_ok "Installed MariaDB $MARIADB_VERSION" + $STD apt-get install --only-upgrade -y mariadb-server mariadb-client + msg_ok "MariaDB $MARIADB_VERSION upgraded if applicable" + return 0 fi + + if [[ -n "$CURRENT_VERSION" ]]; then + msg_info "Replacing MariaDB $CURRENT_VERSION with $MARIADB_VERSION (data will be preserved)" + $STD systemctl stop mariadb >/dev/null 2>&1 || true + $STD apt-get purge -y 'mariadb*' || true + rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg + else + msg_info "Installing MariaDB $MARIADB_VERSION" + fi + + msg_info "Setting up MariaDB Repository" + curl -fsSL "https://mariadb.org/mariadb_release_signing_key.asc" | + gpg --dearmor -o /etc/apt/trusted.gpg.d/mariadb.gpg + + echo "deb [signed-by=/etc/apt/trusted.gpg.d/mariadb.gpg] http://mirror.mariadb.org/repo/${MARIADB_VERSION}/debian ${DISTRO_CODENAME} main" \ + >/etc/apt/sources.list.d/mariadb.list + + $STD apt-get update + $STD apt-get install -y mariadb-server mariadb-client + + msg_ok "Installed MariaDB $MARIADB_VERSION" } install_mysql() { From bb999903a6e4212ebc7f5b548a87e47c60741e99 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:07:37 +0200 Subject: [PATCH 0516/1614] moving --- ct/{Deferred => }/ampache.sh | 0 ct/{Deferred => }/babybuddy.sh | 0 ct/{Deferred => }/documenso.sh | 0 ct/{Deferred => }/ghostfolio.sh | 0 ct/{Deferred => }/hoodik.sh | 0 ct/{Deferred => }/koel.sh | 0 ct/{Deferred => }/mattermost.sh | 0 ct/{Deferred => }/netbootxyz.sh | 0 ct/{Deferred => }/nginxproxymanager.sh | 0 ct/{Deferred => }/pixelfed.sh | 0 ct/{Deferred => }/roundcubemail.sh | 0 ct/{Deferred => }/squirrelserversmanager.sh | 0 ct/{Deferred => }/timescaledb.sh | 0 ct/{Deferred => }/wallabag.sh | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename ct/{Deferred => }/ampache.sh (100%) rename ct/{Deferred => }/babybuddy.sh (100%) rename ct/{Deferred => }/documenso.sh (100%) rename ct/{Deferred => }/ghostfolio.sh (100%) rename ct/{Deferred => }/hoodik.sh (100%) rename ct/{Deferred => }/koel.sh (100%) rename ct/{Deferred => }/mattermost.sh (100%) rename ct/{Deferred => }/netbootxyz.sh (100%) rename ct/{Deferred => }/nginxproxymanager.sh (100%) rename ct/{Deferred => }/pixelfed.sh (100%) rename ct/{Deferred => }/roundcubemail.sh (100%) rename ct/{Deferred => }/squirrelserversmanager.sh (100%) rename ct/{Deferred => }/timescaledb.sh (100%) rename ct/{Deferred => }/wallabag.sh (100%) diff --git a/ct/Deferred/ampache.sh b/ct/ampache.sh similarity index 100% rename from ct/Deferred/ampache.sh rename to ct/ampache.sh diff --git a/ct/Deferred/babybuddy.sh b/ct/babybuddy.sh similarity index 100% rename from ct/Deferred/babybuddy.sh rename to ct/babybuddy.sh diff --git a/ct/Deferred/documenso.sh b/ct/documenso.sh similarity index 100% rename from ct/Deferred/documenso.sh rename to ct/documenso.sh diff --git a/ct/Deferred/ghostfolio.sh b/ct/ghostfolio.sh similarity index 100% rename from ct/Deferred/ghostfolio.sh rename to ct/ghostfolio.sh diff --git a/ct/Deferred/hoodik.sh b/ct/hoodik.sh similarity index 100% rename from ct/Deferred/hoodik.sh rename to ct/hoodik.sh diff --git a/ct/Deferred/koel.sh b/ct/koel.sh similarity index 100% rename from ct/Deferred/koel.sh rename to ct/koel.sh diff --git a/ct/Deferred/mattermost.sh b/ct/mattermost.sh similarity index 100% rename from ct/Deferred/mattermost.sh rename to ct/mattermost.sh diff --git a/ct/Deferred/netbootxyz.sh b/ct/netbootxyz.sh similarity index 100% rename from ct/Deferred/netbootxyz.sh rename to ct/netbootxyz.sh diff --git a/ct/Deferred/nginxproxymanager.sh b/ct/nginxproxymanager.sh similarity index 100% rename from ct/Deferred/nginxproxymanager.sh rename to ct/nginxproxymanager.sh diff --git a/ct/Deferred/pixelfed.sh b/ct/pixelfed.sh similarity index 100% rename from ct/Deferred/pixelfed.sh rename to ct/pixelfed.sh diff --git a/ct/Deferred/roundcubemail.sh b/ct/roundcubemail.sh similarity index 100% rename from ct/Deferred/roundcubemail.sh rename to ct/roundcubemail.sh diff --git a/ct/Deferred/squirrelserversmanager.sh b/ct/squirrelserversmanager.sh similarity index 100% rename from ct/Deferred/squirrelserversmanager.sh rename to ct/squirrelserversmanager.sh diff --git a/ct/Deferred/timescaledb.sh b/ct/timescaledb.sh similarity index 100% rename from ct/Deferred/timescaledb.sh rename to ct/timescaledb.sh diff --git a/ct/Deferred/wallabag.sh b/ct/wallabag.sh similarity index 100% rename from ct/Deferred/wallabag.sh rename to ct/wallabag.sh From 2d32f6dba3a6ee0188527e501cfb82d45af18c3a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 14 Apr 2025 10:07:57 +0000 Subject: [PATCH 0517/1614] Update .app files --- ct/headers/alpine-duplicati | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/alpine-duplicati diff --git a/ct/headers/alpine-duplicati b/ct/headers/alpine-duplicati deleted file mode 100644 index b2fca39..0000000 --- a/ct/headers/alpine-duplicati +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ _ ____ ___ __ _ - / | / /___ (_)___ ___ / __ \__ ______ / (_)________ _/ /_(_) - / /| | / / __ \/ / __ \/ _ \______/ / / / / / / __ \/ / / ___/ __ `/ __/ / - / ___ |/ / /_/ / / / / / __/_____/ /_/ / /_/ / /_/ / / / /__/ /_/ / /_/ / -/_/ |_/_/ .___/_/_/ /_/\___/ /_____/\__,_/ .___/_/_/\___/\__,_/\__/_/ - /_/ /_/ From c95479bb8c4db155c4320e23ceb434fdeafa7008 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:08:37 +0200 Subject: [PATCH 0518/1614] push --- install/ampache-install.sh | 91 +++++++++++ install/babybuddy-install.sh | 152 +++++++++++++++++ install/documenso-install.sh | 117 +++++++++++++ install/funkwhale-install.sh | 161 ++++++++++++++++++ install/ghostfolio-install.sh | 179 ++++++++++++++++++++ install/hoodik-install.sh | 72 ++++++++ install/koel-install.sh | 158 ++++++++++++++++++ install/netbootxyz-install.sh | 57 +++++++ install/nginxproxymanager-install.sh | 187 +++++++++++++++++++++ install/pixelfed-install.sh | 191 ++++++++++++++++++++++ install/roundcubemail-install.sh | 88 ++++++++++ install/squirrelserversmanager-install.sh | 163 ++++++++++++++++++ install/timescaledb-install.sh | 163 ++++++++++++++++++ install/wallabag-install.sh | 133 +++++++++++++++ 14 files changed, 1912 insertions(+) create mode 100644 install/ampache-install.sh create mode 100644 install/babybuddy-install.sh create mode 100644 install/documenso-install.sh create mode 100644 install/funkwhale-install.sh create mode 100644 install/ghostfolio-install.sh create mode 100644 install/hoodik-install.sh create mode 100644 install/koel-install.sh create mode 100644 install/netbootxyz-install.sh create mode 100644 install/nginxproxymanager-install.sh create mode 100644 install/pixelfed-install.sh create mode 100644 install/roundcubemail-install.sh create mode 100644 install/squirrelserversmanager-install.sh create mode 100644 install/timescaledb-install.sh create mode 100644 install/wallabag-install.sh diff --git a/install/ampache-install.sh b/install/ampache-install.sh new file mode 100644 index 0000000..7199b47 --- /dev/null +++ b/install/ampache-install.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies (Patience)" +apt-get install -y \ + mariadb-server \ + apache2 \ + cron \ + flac \ + vorbis-tools \ + lame \ + ffmpeg \ + lsb-release \ + gosu \ + wget \ + curl \ + git \ + zip \ + unzip \ + sudo \ + make \ + mc + msg_ok "Installed Dependencies" + +msg_info "Setting up PHP" +sudo curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg +sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +sudo apt update +sudo apt install -y php8.3 php8.3-{bcmath,bz2,cli,common,curl,fpm,gd,imagick,intl,mbstring,mysql,sqlite3,xml,xmlrpc,zip} +apt-get install -y \ + libapache2-mod-php \ + inotify-tools \ + libavcodec-extra \ + libev-libevent-dev \ + libmp3lame-dev \ + libtheora-dev \ + libvorbis-dev \ + libvpx-dev +msg_ok "PHP successfully setup" + +msg_info "Setting up Database" +DB_NAME=ampache2 +DB_USER=ampache2 +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +sudo mysql -u root -e "CREATE DATABASE $DB_NAME;" +sudo mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" +sudo mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +echo "" >>~/ampache.creds +echo -e "Ampache Database User: \e $DB_USER\e" >>~/ampache.creds +echo -e "Ampache Database Password: \e$DB_PASS\e" >>~/ampache.creds +echo -e "Ampache Database Name: \e$DB_NAME\e" >>~/ampache.creds +msg_ok "Set up database" + +msg_info "Installing Ampache(Patience)" +cd /opt +AMPACHE_VERSION=$(wget -q https://github.com/ampache/ampache/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +wget https://github.com/ampache/ampache/releases/download/${AMPACHE_VERSION}/ampache-${AMPACHE_VERSION}_all_php8.3.zip +unzip -q ampache-${AMPACHE_VERSION}_all_php8.3.zip -d ampache +rm -rf /var/www/html +ln -s /opt/ampache/public /var/www/html +sudo mv /opt/ampache/rest/.htaccess.dist /opt/ampache/rest/.htaccess +sudo mv /opt/ampache/play/.htaccess.dist /opt/ampache/play/.htaccess +sudo mv /opt/ampache/channel/.htaccess.dist /opt/ampache/channel/.htaccess +sudo cp /opt/ampache/config/ampache.cfg.php.dist /opt/ampache/config/ampache.cfg.php +sudo chmod 664 /opt/ampache/rest/.htaccess /opt/ampache/play/.htaccess +sudo sed -i 's/upload_max_filesize = .*/upload_max_filesize = 50M/' /etc/php/8.3/apache2/php.ini \ +&& sudo sed -i 's/post_max_size = .*/post_max_size = 50M/' /etc/php/8.3/apache2/php.ini \ +&& sudo sed -i 's/max_execution_time = .*/max_execution_time = 300/' /etc/php/8.3/apache2/php.ini \ +&& sudo sed -i 's/memory_limit = .*/memory_limit = 256M/' /etc/php/8.3/apache2/php.ini \ +&& sudo systemctl restart apache2 +msg_ok "Installed Ampache" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/babybuddy-install.sh b/install/babybuddy-install.sh new file mode 100644 index 0000000..087cdd0 --- /dev/null +++ b/install/babybuddy-install.sh @@ -0,0 +1,152 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/AnalogJ/scrutiny + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +# Installiere benötigte Pakete +msg_info "Installing Dependencies" +$STD apt-get install -y \ + sudo \ + curl \ + uwsgi \ + uwsgi-plugin-python3 \ + libopenjp2-7-dev \ + libpq-dev \ + git \ + nginx \ + python3 \ + python3-pip \ + python3-venv \ + pipx +msg_ok "Installed Dependencies" + +# Installiere Python3 und PipX +#msg_info "Installing Python3 & PipX" +#$STD apt-get install -y python3 python3-dev python3-dotenv python3-pip + +#source /opt/babybuddy/.venv/bin/activate +#msg_ok "Installed Python3 & PipX" + +# Variablen +INSTALL_DIR="/opt/babybuddy" +APP_DIR="$INSTALL_DIR" +DATA_DIR="$INSTALL_DIR/data" +DOMAIN="babybuddy.example.com" # Ändern, falls benötigt +SECRET_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32) + +# Babybuddy Repository installieren +msg_info "Installing Babybuddy" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/babybuddy/babybuddy/archive/refs/tags/v${RELEASE}.zip" +unzip -q v${RELEASE}.zip +mv babybuddy-${RELEASE} /opt/babybuddy +cd /opt/babybuddy +source /opt/babybuddy/.venv/bin/activate +export PIPENV_VENV_IN_PROJECT=1 +pipenv install +pipenv shell +cp babybuddy/settings/production.example.py babybuddy/settings/production.py + +# Production-Settings konfigurieren +SECRET_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32) +ALLOWED_HOSTS=$(hostname -I | tr ' ' ',' | sed 's/,$//')",127.0.0.1,localhost" +sed -i \ + -e "s/^SECRET_KEY = \"\"/SECRET_KEY = \"$SECRET_KEY\"/" \ + -e "s/^ALLOWED_HOSTS = \[\"\"\]/ALLOWED_HOSTS = \[$(echo \"$ALLOWED_HOSTS\" | sed 's/,/\",\"/g')\]/" \ + babybuddy/settings/production.py + +# Django Migrationen durchführen +export DJANGO_SETTINGS_MODULE=babybuddy.settings.production +python manage.py migrate + +# Berechtigungen setzen +sudo chown -R www-data:www-data /opt/babybuddy/data +sudo chmod 640 /opt/babybuddy/data/db.sqlite3 +sudo chmod 750 /opt/babybuddy/data +msg_ok "Installed BabyBuddy WebApp" + +# Django Admin Setup +DJANGO_ADMIN_USER=admin +DJANGO_ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) +source /opt/babybuddy/bin/activate +$STD python3 /opt/babybuddy/manage.py shell << EOF +from django.contrib.auth import get_user_model +UserModel = get_user_model() +user = UserModel.objects.create_user('$DJANGO_ADMIN_USER', password='$DJANGO_ADMIN_PASS') +user.is_superuser = True +user.is_staff = True +user.save() +EOF + +{ + echo "" + echo "Django-Credentials" + echo "Django Admin User: $DJANGO_ADMIN_USER" + echo "Django Admin Password: $DJANGO_ADMIN_PASS" +} >> ~/babybuddy.creds +msg_ok "Setup Django Admin" + +# uWSGI konfigurieren +msg_info "Configuring uWSGI" +sudo bash -c "cat > /etc/uwsgi/apps-available/babybuddy.ini" < /etc/nginx/sites-available/babybuddy" </etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g turbo@1.9.3 +msg_ok "Installed Node.js" + +msg_info "Setting up PostgreSQL" +DB_NAME="documenso_db" +DB_USER="documenso_user" +DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" +{ + echo "Documenso-Credentials" + echo "Database Name: $DB_NAME" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" +} >> ~/documenso.creds +msg_ok "Set up PostgreSQL" + +msg_info "Installing Documenso (Patience)" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/documenso/documenso/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zip" +unzip -q v${RELEASE}.zip +mv documenso-${RELEASE} /opt/documenso +cd /opt/documenso +mv .env.example .env +sed -i "s|NEXTAUTH_SECRET=.*|NEXTAUTH_SECRET='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" /opt/documenso/.env +sed -i "s|NEXT_PRIVATE_ENCRYPTION_KEY=.*|NEXT_PRIVATE_ENCRYPTION_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" /opt/documenso/.env +sed -i "s|NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=.*|NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" /opt/documenso/.env +sed -i "s|NEXT_PUBLIC_WEBAPP_URL=.*|NEXT_PUBLIC_WEBAPP_URL='http://localhost:9000'|" /opt/documenso/.env +sed -i "s|NEXT_PRIVATE_DATABASE_URL=.*|NEXT_PRIVATE_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" /opt/documenso/.env +sed -i "s|NEXT_PRIVATE_DIRECT_DATABASE_URL=.*|NEXT_PRIVATE_DIRECT_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" /opt/documenso/.env +export TURBO_CACHE=1 +export NEXT_TELEMETRY_DISABLED=1 +export CYPRESS_INSTALL_BINARY=0 +export NODE_OPTIONS="--max-old-space-size=2048" +# $STD npm ci --cache ~/.npm-cache --maxsockets=5 +# $STD npm run build +# $STD npx prisma migrate deploy --schema ./packages/prisma/schema.prisma +$STD npm ci +$STD npm run build:web +$STD npm run prisma:migrate-deploy +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed Documenso" + +msg_info "Create User" +PASSWORD_HASH=$(python3 -c "import bcrypt; print(bcrypt.hashpw(b'helper-scripts', bcrypt.gensalt(rounds=12)).decode())") +sudo -u postgres psql -d documenso_db -c "INSERT INTO \"User\" (name, email, \"emailVerified\", password, \"identityProvider\", roles, \"createdAt\", \"lastSignedIn\", \"updatedAt\", \"customerId\") VALUES ('helper-scripts', 'helper-scripts@local.com', '2025-01-20 17:14:45.058', '$PASSWORD_HASH', 'DOCUMENSO', ARRAY['USER', 'ADMIN']::\"Role\"[], '2025-01-20 16:04:05.543', '2025-01-20 16:14:55.249', '2025-01-20 16:14:55.25', NULL) RETURNING id;" +$STD npm run prisma:migrate-deploy +msg_ok "User created" + +msg_info "Creating Service" +cat </etc/systemd/system/documenso.service +[Unit] +Description=Documenso Service +After=network.target postgresql.service + +[Service] +WorkingDirectory=/opt/documenso/apps/web +ExecStart=/usr/bin/next start -p 3500 +Restart=always +EnvironmentFile=/opt/documenso/.env + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now documenso +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/funkwhale-install.sh b/install/funkwhale-install.sh new file mode 100644 index 0000000..78f12de --- /dev/null +++ b/install/funkwhale-install.sh @@ -0,0 +1,161 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Python3" +$STD apt-get install -y --no-install-recommends \ + python3 \ + python3-dev \ + python3-setuptools \ + python3-venv +msg_ok "Installed Python3" + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y --no-install-recommends \ + redis \ + postgresql \ + postgresql-contrib \ + postgresql-client \ + build-essential \ + gnupg \ + ffmpeg \ + libjpeg-dev \ + libpq-dev \ + libmagic-dev \ + libzbar0 \ + poppler-utils \ + automake \ + libtool \ + pkg-config \ + curl \ + libtiff-dev \ + libpng-dev \ + libleptonica-dev \ + sudo \ + make \ + mc +msg_ok "Installed Dependencies" + +msg_info "Setup Funkwhale Dependencies (Patience)" +export FUNKWHALE_VERSION=1.4.0 +$STD sudo apt install -y --no-install-recommends $(curl https://dev.funkwhale.audio/funkwhale/funkwhale/-/raw/$FUNKWHALE_VERSION/deploy/requirements.apt) +$STD sudo useradd --system --shell /bin/bash --create-home --home-dir /opt/funkwhale funkwhale +cd /opt/funkwhale +$STD sudo mkdir -p config api data/static data/media data/music front +$STD sudo chown -R funkwhale:funkwhale data +msg_ok "Initial Setup complete" + +msg_ok "Download Funkwhale API" +$STD sudo curl -L -o "api-$FUNKWHALE_VERSION.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWHALE_VERSION/download?job=build_api" +$STD sudo unzip -q "api-$FUNKWHALE_VERSION.zip" -d extracted +$STD sudo mv extracted/api/* api/ +$STD sudo rm -rf extracted api-$FUNKWHALE_VERSION.zip +msg_ok "Downloaded and extracted Funkwhale API" + +msg_info "Download Funkwhale Frontend" +$STD sudo curl -L -o "front-$FUNKWHALE_VERSION.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWHALE_VERSION/download?job=build_front" +$STD sudo unzip -q "front-$FUNKWHALE_VERSION.zip" -d extracted +$STD sudo mv extracted/front . +$STD sudo rm -rf extracted front-$FUNKWHALE_VERSION.zip +msg_ok "Downloaded and extracted Funkwhale Frontend" + +msg_info "Install Funkwhale API and DJANGO" +cd /opt/funkwhale +$STD sudo python3 -m venv venv +$STD sudo venv/bin/pip install --upgrade pip wheel +$STD sudo venv/bin/pip install --editable ./api +$STD sudo curl -L -o /opt/funkwhale/config/.env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/env.prod.sample" +secret_key=$(openssl rand -base64 45 | sed 's/\//\\\//g') +sudo sed -i "s/DJANGO_SECRET_KEY=.*/DJANGO_SECRET_KEY=$secret_key/" /opt/funkwhale/config/.env +sudo sed -i 's/# CACHE_URL=redis:\/\/127.0.0.1:6379\/0/CACHE_URL=redis:\/\/127.0.0.1:6379\/0/' /opt/funkwhale/config/.env #Remove #Hashtag From Config for Debian +sudo sed -i 's/# DATABASE_URL=postgresql:\/\/funkwhale@:5432\/funkwhale/DATABASE_URL=postgresql:\/\/funkwhale@:5432\/funkwhale/' /opt/funkwhale/config/.env #Remove #Hashtag From Config for Debian +# set the paths to /opt instead of /srv +sudo sed -i 's/MEDIA_ROOT=\/srv\/funkwhale\/data\/media/MEDIA_ROOT=\/opt\/funkwhale\/data\/media/' /opt/funkwhale/config/.env +sudo sed -i 's/STATIC_ROOT=\/srv\/funkwhale\/data\/static/STATIC_ROOT=\/opt\/funkwhale\/data\/static/' /opt/funkwhale/config/.env +sudo sed -i 's/MUSIC_DIRECTORY_PATH=\/srv\/funkwhale\/data\/music/MUSIC_DIRECTORY_PATH=\/opt\/funkwhale\/data\/music/' /opt/funkwhale/config/.env +sudo sed -i 's/MUSIC_DIRECTORY_SERVE_PATH=\/srv\/funkwhale\/data\/music/MUSIC_DIRECTORY_SERVE_PATH=\/opt\/funkwhale\/data\/music/' /opt/funkwhale/config/.env +sudo sed -i 's/FUNKWHALE_FRONTEND_PATH=\/srv\/funkwhale\/front\/dist/FUNKWHALE_FRONTEND_PATH=\/opt\/funkwhale\/front\/dist/' /opt/funkwhale/config/.env +sudo chown funkwhale:funkwhale /opt/funkwhale/config/.env +sudo chmod 600 /opt/funkwhale/config/.env +msg_ok "Environment successfully set up" + +msg_info "Setting up Database" +DB_NAME=funkwhale +DB_USER=funkwhale +DB_EXTENSION_UNACCENT=unaccent +DB_EXTENSION_CITEXT=citext +DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" +$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;" +echo "" >>~/funkwhale.creds +echo -e "Funkwhale Database User: \e[32m$DB_USER\e[0m" >>~/funkwhale.creds +echo -e "Funkwhale Database Password: \e[32m$DB_PASS\e[0m" >>~/funkwhale.creds +echo -e "Funkwhale Database Name: \e[32m$DB_NAME\e[0m" >>~/funkwhale.creds +$STD sudo -u postgres psql -c "CREATE EXTENSION $DB_EXTENSION_UNACCENT;" +$STD sudo -u postgres psql -c "CREATE EXTENSION $DB_EXTENSION_CITEXT;" +cd /opt/funkwhale +$STD sudo -u funkwhale venv/bin/funkwhale-manage migrate +msg_ok "Set up PostgreSQL database" + +msg_info "Setting up Funkwhale and systemd" +FUNKWHALE_USER=funkwhale_su +FUNKWHALE_MAIL=mail@example.com +FUNKWHALE_PASS="$(openssl rand -base64 18 | cut -c1-13)" +echo -e "Funkwhale Superuser: \e[32m$FUNKWHALE_USER\e[0m" >>~/funkwhale.creds +echo -e "Funkwhale Mail: \e[32m$FUNKWHALE_MAIL\e[0m" >>~/funkwhale.creds +echo -e "Funkwhale Superuser Password: \e[32m$FUNKWHALE_PASS\e[0m" >>~/funkwhale.creds +$STD sudo -u funkwhale venv/bin/funkwhale-manage fw users create --superuser --username $FUNKWHALE_USER --email $FUNKWHALE_MAIL --password $FUNKWHALE_PASS +$STD sudo venv/bin/funkwhale-manage collectstatic +$STD sudo curl -L -o "/etc/systemd/system/funkwhale.target" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale.target" +$STD sudo curl -L -o "/etc/systemd/system/funkwhale-server.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-server.service" +$STD sudo curl -L -o "/etc/systemd/system/funkwhale-worker.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-worker.service" +$STD sudo curl -L -o "/etc/systemd/system/funkwhale-beat.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-beat.service" +$STD sudo systemctl daemon-reload +$STD sudo systemctl start funkwhale.target +$STD sudo systemctl enable --now funkwhale.target +msg_ok "Funkwhale successfully set up" + +read -r -p "Would you like to Setup Reverse Proxy (Nginx)? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing NGINX" + $STD apt install -y nginx + sudo su + $STD curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale_proxy.conf" + $STD curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/nginx.template" + $STD set -a && source /opt/funkwhale/config/.env && set +a envsubst "`env | awk -F = '{printf \" $%s\", $$1}'`" \ + < /etc/nginx/sites-available/funkwhale.template \ + > /etc/nginx/sites-available/funkwhale.conf + $STD grep '${' /etc/nginx/sites-available/funkwhale.conf + $STD ln -s /etc/nginx/sites-available/funkwhale.conf /etc/nginx/sites-enabled/ + $STD systemctl reload nginx + msg_ok "Installed Nginx" +fi + +read -r -p "Would you like to Setup TLS (Certbot)? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Certbot" + $STD apt install -y certbot python3-certbot-nginx + $STD sudo certbot --nginx -d $FUNKWHALE_HOSTNAME + msg_ok "Installed Certbot" +fi + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/ghostfolio-install.sh b/install/ghostfolio-install.sh new file mode 100644 index 0000000..e834d73 --- /dev/null +++ b/install/ghostfolio-install.sh @@ -0,0 +1,179 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: jcantosz +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +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 update +$STD apt-get install -y \ + curl \ + lsb-release \ + gpg \ + g++ \ + git \ + make \ + openssl \ + python3 \ + postgresql-15 \ + redis +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y --no-install-suggests nodejs +msg_info "Installed Node.js" + +msg_info "Installing Postgresql" +POSTGRES_HOST=localhost +POSTGRES_PORT=5432 +POSTGRES_DB=ghostfolio-db +POSTGRES_USER='postgres' +POSTGRES_PASSWORD="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" +ACCESS_TOKEN_SALT="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" +DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?connect_timeout=300&sslmode=prefer" +JWT_SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" + +$STD su postgres <~/ghostfolio.creds +echo "Ghostfolio Database Credentials" >>~/ghostfolio.creds +echo "" >>~/ghostfolio.creds +echo -e "Ghostfolio Database User: \e[32m$POSTGRES_USER\e[0m" >>~/ghostfolio.creds +echo -e "Ghostfolio Database Password: \e[32m$POSTGRES_PASSWORD\e[0m" >>~/ghostfolio.creds +echo -e "Ghostfolio Database Name: \e[32m$POSTGRES_DB\e[0m" >>~/ghostfolio.creds +msg_ok "Installed Postgresql" + +msg_info "Installing Redis" +REDIS_HOST=localhost +REDIS_PORT=6379 +REDIS_PASSWORD="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" + +$STD redis-cli CONFIG SET requirepass "$REDIS_PASSWORD" +$STD redis-cli -a "$REDIS_PASSWORD" CONFIG REWRITE +$STD systemctl restart redis +echo "" >>~/ghostfolio.creds +echo "Ghostfolio Redis Credentials" >>~/ghostfolio.creds +echo "" >>~/ghostfolio.creds +echo -e "Ghostfolio Redis Password: \e[32m$REDIS_PASSWORD\e[0m" >>~/ghostfolio.creds +msg_ok "Installed Redis" + +msg_info "Installing Ghostfolio (Patience)" +RELEASE=$(curl -sL https://api.github.com/repos/ghostfolio/ghostfolio/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt + +cd /opt/ +$STD curl -Ls -o ghostfolio-$RELEASE.tgz https://github.com/ghostfolio/ghostfolio/archive/refs/tags/$RELEASE.tar.gz +$STD tar xzf ghostfolio-$RELEASE.tgz +$STD rm ghostfolio-$RELEASE.tgz + +cp /opt/ghostfolio-$RELEASE/package.json /opt/package.json +cp /opt/ghostfolio-$RELEASE/package-lock.json /opt/package-lock.json + +cd /opt/ghostfolio-$RELEASE +$STD npm install +$STD npm run build:production +mv /opt/package-lock.json /opt/ghostfolio-$RELEASE/package-lock.json + +cd /opt/ghostfolio-$RELEASE/dist/apps/api/ +$STD npm install +cp -r /opt/ghostfolio-$RELEASE/prisma . +mv /opt/package.json /opt/ghostfolio-$RELEASE/dist/apps/api/package.json +$STD npm run database:generate-typings + +cd /opt +mv /opt/ghostfolio-$RELEASE/dist/apps /opt/ghostfolio +mv /opt/ghostfolio-$RELEASE/docker/entrypoint.sh /opt/ghostfolio/ + +rm -rf /opt/ghostfolio-$RELEASE +msg_ok "Installed Ghostfolio" + +msg_info "Creating Service" +cat </opt/ghostfolio/api/.env +# CACHE +REDIS_HOST=$REDIS_HOST +REDIS_PORT=$REDIS_PORT +REDIS_PASSWORD=$REDIS_PASSWORD + +# POSTGRES +POSTGRES_DB=$POSTGRES_DB +POSTGRES_USER=$POSTGRES_USER +POSTGRES_PASSWORD=$POSTGRES_PASSWORD + +# VARIOUS +ACCESS_TOKEN_SALT=$ACCESS_TOKEN_SALT +DATABASE_URL="$DATABASE_URL" +JWT_SECRET_KEY=$JWT_SECRET_KEY +EOF + +cat </opt/ghostfolio/start.sh +#!/bin/bash +# Source the environment vars and export them otherwise it wont get them properly +set -a +. /opt/ghostfolio/api/.env +set +a + +# Run the docker entrypoint +/opt/ghostfolio/entrypoint.sh +EOF + +chmod +x /opt/ghostfolio/start.sh + +msg_info "Setup Service" +cat </etc/systemd/system/ghostfolio.service +[Unit] +Description=ghostfolio + +[Service] +After=postgresql.service redis.service +Require=postgresql.service redis.service + +# Start Service +ExecStart=/opt/ghostfolio/start.sh +WorkingDirectory=/opt/ghostfolio/api/ + +# Restart service after 10 seconds if node service crashes +RestartSec=10 +Restart=always + +# Output to syslog +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=ghostfolio + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable ghostfolio +systemctl start ghostfolio +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/hoodik-install.sh b/install/hoodik-install.sh new file mode 100644 index 0000000..bf40b47 --- /dev/null +++ b/install/hoodik-install.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 community-scripts ORG +# Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/hudikhq/hoodik + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y \ + pkg-config \ + libssl-dev \ + libc6-dev \ + libpq-dev \ + clang \ + llvm \ + nettle-dev \ + build-essential \ + curl \ + sudo \ + make \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing Rust (Patience)" +$STD bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y +source ~/.cargo/env +msg_ok "Installed Rust" + +msg_info "Installing Hoodik (Patience)" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/hudikhq/hoodik/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/hudikhq/hoodik/archive/refs/tags/${RELEASE}.zip" +unzip -q ${RELEASE}.zip +mv "hoodik-${RELEASE:1}" hoodik +cd hoodik +cargo build -q --release +msg_ok "Installed hoodik" + +msg_info "Creating Service" +cat </etc/systemd/system/hoodik.service +[Unit] +Description=Start Hoodik Service +After=network.target + +[Service] +User=root +WorkingDirectory=/opt/hoodik +ExecStart=/root/.cargo/bin/cargo run -q --release + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now hoodik.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/${RELEASE}.zip +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/koel-install.sh b/install/koel-install.sh new file mode 100644 index 0000000..ea17959 --- /dev/null +++ b/install/koel-install.sh @@ -0,0 +1,158 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 communtiy-scripts ORG +# Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y \ + postgresql \ + nginx \ + apt-transport-https \ + gnupg2 \ + lsb-release \ + ffmpeg \ + curl \ + unzip \ + sudo \ + mc \ + cron \ + libapache2-mod-xsendfile \ + libzip-dev \ + locales \ + libpng-dev \ + libjpeg62-turbo-dev \ + libpq-dev \ + libwebp-dev \ + libapache2-mod-php \ + composer + msg_ok "Installed Dependencies" + +msg_info "Setting up PSql Database" +DB_NAME=koel_db +DB_USER=koel +DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" +{ + echo "Koel-Credentials" + echo "Koel Database User: $DB_USER" + echo "Koel Database Password: $DB_PASS" + echo "Koel Database Name: $DB_NAME" +} >> ~/koel.creds +msg_ok "Set up PostgreSQL database" + +msg_info "Setting up Node.js/Yarn" +mkdir -p /etc/apt/keyrings +$STD curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +$STD echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g npm@latest +$STD npm install -g yarn +msg_ok "Installed Node.js/Yarn" + +msg_info "Setting up PHP" +$STD curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg +$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +$STD apt update +$STD apt install -y php8.3 php8.3-{bcmath,exif,bz2,cli,common,curl,fpm,gd,intl,sqlite3,mbstring,xml,zip,pgsql} +msg_ok "PHP successfully setup" + +msg_info "Installing Koel(Patience)" +RELEASE=$(wget -q https://github.com/koel/koel/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +cd /opt +mkdir -p /opt/koel_{media,sync} +wget -q https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip +unzip -q koel-${RELEASE}.zip +chown -R :www-data /opt/* +chmod -R g+r /opt/* +chmod -R g+rw /opt/* +chown -R www-data:www-data /opt/* +chmod -R 755 /opt/* +cd /opt/koel +echo "export COMPOSER_ALLOW_SUPERUSER=1" >> ~/.bashrc +source ~/.bashrc +$STD composer update --no-interaction +$STD composer install --no-interaction +sudo sed -i -e "s/DB_CONNECTION=.*/DB_CONNECTION=pgsql/" \ + -e "s/DB_HOST=.*/DB_HOST=localhost/" \ + -e "s/DB_DATABASE=.*/DB_DATABASE=$DB_NAME/" \ + -e "s/DB_PORT=.*/DB_PORT=5432/" \ + -e "s/DB_USERNAME=.*/DB_USERNAME=$DB_USER/" \ + -e "s|DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" \ + -e "s|MEDIA_PATH=.*|MEDIA_PATH=/opt/koel_media|" \ + -e "s|FFMPEG_PATH=/usr/local/bin/ffmpeg|FFMPEG_PATH=/usr/bin/ffmpeg|" /opt/koel/.env +sed -i -e "s/^upload_max_filesize = .*/upload_max_filesize = 200M/" \ + -e "s/^post_max_size = .*/post_max_size = 200M/" \ + -e "s/^memory_limit = .*/memory_limit = 200M/" /etc/php/8.3/fpm/php.ini +msg_ok "Installed Koel" + +msg_info "Set up web services" +cat </etc/nginx/sites-available/koel +server { + listen 6767; + server_name koel.local; + root /opt/koel/public; + index index.php; + + gzip on; + gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json; + gzip_comp_level 9; + + send_timeout 3600; + client_max_body_size 200M; + + location / { + try_files \$uri \$uri/ /index.php?\$args; + } + + location /media/ { + internal; + alias /opt/koel_media; + } + + location ~ \.php$ { + try_files \$uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/run/php/php8.3-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; + fastcgi_param PATH_INFO \$fastcgi_path_info; + } +} +EOF +ln -s /etc/nginx/sites-available/koel /etc/nginx/sites-enabled/koel +systemctl restart php8.3-fpm +systemctl reload nginx +msg_ok "Created Services" + +msg_info "Adding Cronjob (Daily Midnight)" +cat </opt/koel_sync/koel_sync.cron +0 0 * * * cd /opt/koel/ && /usr/bin/php artisan koel:sync >/opt/koel_sync/koel_sync.log 2>&1 +EOF +crontab /opt/koel_sync/koel_sync.cron + +msg_ok "Cronjob successfully added" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/koel-${RELEASE}.zip +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/netbootxyz-install.sh b/install/netbootxyz-install.sh new file mode 100644 index 0000000..933167c --- /dev/null +++ b/install/netbootxyz-install.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +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 ansible git apache2 +msg_ok "Installed Dependencies" + +RELEASE=$(curl -sX GET "https://api.github.com/repos/netbootxyz/netboot.xyz/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') +msg_info "Installing netboot.xyz ${RELEASE}" +$STD curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/netbootxyz/netboot.xyz/archive/${RELEASE}.tar.gz" +$STD tar xvzf ${RELEASE}.tar.gz +VER=$(curl -s https://api.github.com/repos/netbootxyz/netboot.xyz/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') +rm -rf ${RELEASE}.tar.gz +mv netboot.xyz-${VER} /opt/netboot.xyz +msg_ok "Installed netboot.xyz ${RELEASE}" + +msg_info "Creating Service" +service_path="/etc/systemd/system/netbootxyz.service" +echo "[Unit] +Description=netboot.xyz +After=network.target + +[Service] +Restart=always +RestartSec=5 +Type=simple +User=root +WorkingDirectory=/opt/netboot.xyz +ExecStart="ansible-playbook" -i inventory site.yml +TimeoutStopSec=30 + +[Install] +WantedBy=multi-user.target" >$service_path +$STD sudo systemctl enable --now netbootxyz.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh new file mode 100644 index 0000000..0169c5d --- /dev/null +++ b/install/nginxproxymanager-install.sh @@ -0,0 +1,187 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://nginxproxymanager.com/ + +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 update +$STD apt-get -y install \ + sudo \ + mc \ + curl \ + gnupg \ + make \ + gcc \ + g++ \ + ca-certificates \ + apache2-utils \ + logrotate \ + build-essential \ + git +msg_ok "Installed Dependencies" + +msg_info "Installing Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip \ + python3-venv \ + python3-cffi \ + python3-certbot \ + python3-certbot-dns-cloudflare +$STD pip3 install certbot-dns-multi +$STD python3 -m venv /opt/certbot/ +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Installed Python3" + +msg_info "Installing Openresty" +VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" +wget -qO - https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/openresty.gpg +echo -e "deb http://openresty.org/package/debian $VERSION openresty" >/etc/apt/sources.list.d/openresty.list +$STD apt-get update +$STD apt-get -y install openresty +msg_ok "Installed Openresty" + +msg_info "Installing Node.js" +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh) +source ~/.bashrc +$STD nvm install 16.20.2 +ln -sf /root/.nvm/versions/node/v16.20.2/bin/node /usr/bin/node +msg_ok "Installed Node.js" + +msg_info "Installing pnpm" +$STD npm install -g pnpm@8.15 +msg_ok "Installed pnpm" + +msg_info "Setup Nginx Proxy Manager" +RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz +cd ./nginx-proxy-manager-${RELEASE} +ln -sf /usr/bin/python3 /usr/bin/python +ln -sf /usr/bin/certbot /opt/certbot/bin/certbot +ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx +ln -sf /usr/local/openresty/nginx/ /etc/nginx +sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json +sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json +sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf +NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") +for NGINX_CONF in $NGINX_CONFS; do + sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" +done + +mkdir -p /var/www/html /etc/nginx/logs +cp -r docker/rootfs/var/www/html/* /var/www/html/ +cp -r docker/rootfs/etc/nginx/* /etc/nginx/ +cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini +cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager +ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf +rm -f /etc/nginx/conf.d/dev.conf + +mkdir -p /tmp/nginx/body \ + /run/nginx \ + /data/nginx \ + /data/custom_ssl \ + /data/logs \ + /data/access \ + /data/nginx/default_host \ + /data/nginx/default_www \ + /data/nginx/proxy_host \ + /data/nginx/redirection_host \ + /data/nginx/stream \ + /data/nginx/dead_host \ + /data/nginx/temp \ + /var/lib/nginx/cache/public \ + /var/lib/nginx/cache/private \ + /var/cache/nginx/proxy_temp + +chmod -R 777 /var/cache/nginx +chown root /tmp/nginx + +echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf + +if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then + openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null +fi + +mkdir -p /app/global /app/frontend/images +cp -r backend/* /app +cp -r global/* /app/global +msg_ok "Setup Nginx Proxy Manager" + +msg_info "Building Frontend" +cd ./frontend +$STD pnpm install +$STD pnpm upgrade +$STD pnpm run build +cp -r dist/* /app/frontend +cp -r app-images/* /app/frontend/images +msg_ok "Built Frontend" + +msg_info "Initializing Backend" +rm -rf /app/config/default.json +if [ ! -f /app/config/production.json ]; then + cat <<'EOF' >/app/config/production.json +{ + "database": { + "engine": "knex-native", + "knex": { + "client": "sqlite3", + "connection": { + "filename": "/data/database.sqlite" + } + } + } +} +EOF +fi +cd /app +$STD pnpm install +msg_ok "Initialized Backend" + +msg_info "Creating Service" +cat <<'EOF' >/lib/systemd/system/npm.service +[Unit] +Description=Nginx Proxy Manager +After=network.target +Wants=openresty.service + +[Service] +Type=simple +Environment=NODE_ENV=production +ExecStartPre=-mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge +ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250 +WorkingDirectory=/app +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Starting Services" +sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf +sed -r -i 's/^([[:space:]]*)su npm npm/\1#su npm npm/g;' /etc/logrotate.d/nginx-proxy-manager +sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg +systemctl enable -q --now openresty +systemctl enable -q --now npm +msg_ok "Started Services" + +msg_info "Cleaning up" +rm -rf ../nginx-proxy-manager-* +systemctl restart openresty +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/pixelfed-install.sh b/install/pixelfed-install.sh new file mode 100644 index 0000000..0996ec3 --- /dev/null +++ b/install/pixelfed-install.sh @@ -0,0 +1,191 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y \ + build-essential \ + gpg \ + curl \ + sudo \ + git \ + gnupg2 \ + ca-certificates \ + lsb-release \ + php8.3-{fpm,bcmath,ctype,curl,exif,gd,iconv,intl,mbstring,redis,tokenizer,xml,zip,pgsql,pdo-pgsql,bz2,sqlite3} \ + composer \ + redis \ + ffmpeg \ + jpegoptim \ + optipng \ + pngquant \ + make \ + mc +msg_ok "Installed Dependencies" + +msg_info "Configure Redis Socket" +REDIS_PASS="$(openssl rand -base64 18 | cut -c1-13)" +sed -i 's/^port .*/port 0/' /etc/redis/redis.conf +sed -i "s/^# requirepass foobared/requirepass $REDIS_PASS/" /etc/redis/redis.conf +sed -i 's|^# unixsocket .*|unixsocket /run/redis/redis.sock|' /etc/redis/redis.conf +sed -i 's/^# unixsocketperm .*/unixsocketperm 770/' /etc/redis/redis.conf +systemctl restart redis +msg_ok "Redis Socket configured" + +msg_info "Add pixelfed user" +useradd -rU -s /bin/bash pixelfed +msg_ok "Pixelfed User Added" + +msg_info "Configure PHP-FPM for Pixelfed" +cp /etc/php/8.3/fpm/pool.d/www.conf /etc/php/8.3/fpm/pool.d/pixelfed.conf +sed -i 's/\[www\]/\[pixelfed\]/' /etc/php/8.3/fpm/pool.d/pixelfed.conf +sed -i 's/^user = www-data/user = pixelfed/' /etc/php/8.3/fpm/pool.d/pixelfed.conf +sed -i 's/^group = www-data/group = pixelfed/' /etc/php/8.3/fpm/pool.d/pixelfed.conf +sed -i 's|^listen = .*|listen = /run/php-fpm/pixelfed.sock|' /etc/php/8.3/fpm/pool.d/pixelfed.conf +systemctl restart php8.3-fpm +msg_ok "successfully configured PHP-FPM" + +msg_info "Setup Postgres Database" +DB_NAME=pixelfed_db +DB_USER=pixelfed_user +DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg +echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list +apt-get update +apt-get install -y postgresql-17 +sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" +sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;" +sudo -u postgres psql -c "GRANT CREATE ON SCHEMA public TO $DB_USER;" +echo "" >>~/pixelfed.creds +echo -e "Pixelfed Database Name: $DB_NAME" >>~/pixelfed.creds +echo -e "Pixelfed Database User: $DB_USER" >>~/pixelfed.creds +echo -e "Pixelfed Database Password: $DB_PASS" >>~/pixelfed.creds +#export $(cat /opt/pixelfed/.env |grep "^[^#]" | xargs) +msg_ok "Set up PostgreSQL Database successfully" + +msg_info "Installing Pixelfed (Patience)" +RELEASE=$(curl -s https://api.github.com/repos/pixelfed/pixelfed/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/pixelfed/pixelfed/archive/refs/tags/${RELEASE}.zip" +unzip -q ${RELEASE}.zip +mv pixelfed-${RELEASE:1} /opt/pixelfed +rm -R ${RELEASE}.zip +cd /opt/pixelfed +chown -R www-data:www-data /opt/pixelfed/storage +chmod -R 775 /opt/pixelfed/storage +chown -R pixelfed:pixelfed /opt/pixelfed/storage +chmod -R 775 /opt/pixelfed/storage +chown -R www-data:www-data /opt/pixelfed +chmod -R 755 /opt/pixelfed +COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --no-ansi --no-interaction --optimize-autoloader + +msg_info "Setup envoirement & PHP Database Migration" +cp .env.example .env +sed -i "s/DB_CONNECTION=.*/DB_CONNECTION=pgsql/" .env +sed -i "s/DB_PORT=.*/DB_PORT=5432/" .env +sed -i "s/DB_DATABASE=.*/DB_DATABASE=$DB_NAME/" .env +sed -i "s/DB_USERNAME=.*/DB_USERNAME=$DB_USER/" .env +sed -i "s/DB_PASSWORD=.*/DB_PASSWORD=$DB_PASS/" .env +sed -i "s/REDIS_HOST=.*/REDIS_HOST=127.0.0.1/" .env +sed -i "s/REDIS_PASSWORD=.*/REDIS_PASSWORD=$REDIS_PASS/" .env +sed -i "s/APP_URL=.*/APP_URL=http:\/\/localhost/" .env # localhost URL + +php artisan key:generate +php artisan storage:link +php artisan migrate --force +php artisan import:cities +php artisan instance:actor +php artisan passport:keys +php artisan route:cache +php artisan view:cache +sed -i 's/^post_max_size = .*/post_max_size = 100M/' /etc/php/8.3/fpm/php.ini +sed -i 's/^upload_max_filesize = .*/upload_max_filesize = 100M/' /etc/php/8.3/fpm/php.ini +sed -i 's/^max_execution_time = .*/max_execution_time = 600/' /etc/php/8.3/fpm/php.ini +systemctl restart php8.3-fpm + +msg_ok "Pixelfed successfully set up" + +msg_info "Creating Services" +cat </etc/nginx/sites-available/pixelfed.conf +server { + listen 80; + server_name localhost; # Nutzung von localhost + root /opt/pixelfed/public; + + index index.php; + + location / { + try_files \$uri \$uri/ /index.php?\$query_string; + } + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; + fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; + include fastcgi_params; + } + + location ~ /\.(?!well-known).* { + deny all; + } + + client_max_body_size 20M; +} +EOF + +ln -s /etc/nginx/sites-available/pixelfed.conf /etc/nginx/sites-enabled/ +nginx -t && systemctl reload nginx + +cat </etc/systemd/system/pixelfed-horizon.service +[Unit] +Description=Pixelfed Horizon +After=network.target +Requires=php8.3-fpm +Requires=redis + +[Service] +User=www-data +WorkingDirectory=/opt/pixelfed +ExecStart=/usr/bin/php /opt/pixelfed/artisan horizon +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +cat </etc/systemd/system/pixelfed-scheduler.service +[Unit] +Description=Pixelfed Scheduler +After=network.target + +[Service] +User=www-data +ExecStart=/usr/bin/php /opt/pixelfed/artisan schedule:run +Restart=always + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable --now pixelfed-scheduler +systemctl enable --now pixelfed-horizon +msg_ok "Created Services" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/roundcubemail-install.sh b/install/roundcubemail-install.sh new file mode 100644 index 0000000..16c4ce6 --- /dev/null +++ b/install/roundcubemail-install.sh @@ -0,0 +1,88 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/roundcube/roundcubemail + +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 \ + curl \ + sudo \ + mc \ + postgresql \ + apache2 \ + libapache2-mod-php \ + composer \ + php8.2-{mbstring,gd,imap,mysql,ldap,curl,intl,imagick,bz2,sqlite3,zip,xml} +msg_ok "Installed Dependencies" + +msg_info "Setting up PostgreSQL" +DB_NAME=roundcube_db +DB_USER=roundcube_user +DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH ENCODING 'UTF8';" +$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 "" >>~/roundcubemail.creds +echo -e "Roundcubemail Database User: $DB_USER" >>~/roundcubemail.creds +echo -e "Roundcubemail Database Password: $DB_PASS" >>~/roundcubemail.creds +echo -e "Roundcubemail Database Name: $DB_NAME" >>~/roundcubemail.creds +msg_ok "Set up PostgreSQL" + +msg_info "Installing Roundcubemail (Patience)" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/roundcube/roundcubemail/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/roundcube/roundcubemail/releases/download/${RELEASE}/roundcubemail-${RELEASE}-complete.tar.gz" +tar -xf roundcubemail-${RELEASE}-complete.tar.gz +mv roundcubemail-${RELEASE} /opt/roundcubemail +cd /opt/roundcubemail +COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev +cp /opt/roundcubemail/config/config.inc.php.sample /opt/roundcubemail/config/config.inc.php +sed -i "s|^\\\$config\\['db_dsnw'\\] = 'mysql://.*';|\\\$config\\['db_dsnw'\\] = 'pgsql://$DB_USER:$DB_PASS@localhost/$DB_NAME';|" /opt/roundcubemail/config/config.inc.php +chown -R www-data:www-data temp/ logs/ +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" + +cat </etc/apache2/sites-available/roundcubemail.conf + + ServerAdmin webmaster@localhost + DocumentRoot /opt/roundcubemail/public_html + + + Options -Indexes +FollowSymLinks + AllowOverride All + Require all granted + + + ErrorLog \${APACHE_LOG_DIR}/wallos_error.log + CustomLog \${APACHE_LOG_DIR}/wallos_access.log combined + +EOF +$STD sudo a2enmod deflate +$STD sudo a2enmod expires +$STD sudo a2enmod headers +$STD a2ensite roundcubemail.conf +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +msg_ok "Installed Wallos" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/roundcubemail-${RELEASE}-complete.tar.gz +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/squirrelserversmanager-install.sh b/install/squirrelserversmanager-install.sh new file mode 100644 index 0000000..2bbda26 --- /dev/null +++ b/install/squirrelserversmanager-install.sh @@ -0,0 +1,163 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" + +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +# Generate a random string +generate_random_string() { + local LENGTH=$1 + tr -dc A-Za-z0-9 /dev/null || true +} + +msg_info "Installing Dependencies" +$STD apk add git +$STD apk add nodejs +$STD apk add npm +$STD apk add ansible +$STD apk add nmap +$STD apk add sudo +$STD apk add openssh +$STD apk add sshpass +$STD apk add py3-pip +$STD apk add expect +$STD apk add libcurl +$STD apk add gcompat +$STD apk add curl +$STD apk add newt +$STD git --version +$STD node --version +$STD npm --version +msg_ok "Installed Dependencies" + +msg_info "Installing Redis" +$STD apk add redis +msg_ok "Installed Redis" + +msg_info "Installing Nginx" +$STD apk add nginx +rm -rf /etc/nginx/http.d/default.conf +cat <<'EOF'> /etc/nginx/http.d/default.conf +server { + listen 80; + server_name localhost; + access_log off; + error_log off; + + location /api/socket.io/ { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:3000/socket.io/; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + location /api/ { + proxy_pass http://127.0.0.1:3000/; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + location / { + proxy_pass http://127.0.0.1:8000/; + + # WebSocket support + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + error_page 501 502 503 404 /custom.html; + location = /custom.html { + root /usr/share/nginx/html; + } + } +} + +EOF +msg_ok "Installed Nginx" + +msg_info "Installing MongoDB Database" +DB_NAME=ssm +DB_PORT=27017 +echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/main' >> /etc/apk/repositories +echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/community' >> /etc/apk/repositories +$STD apk update +$STD apk add mongodb mongodb-tools +msg_ok "Installed MongoDB Database" + +msg_info "Starting Services" +$STD rc-service redis start +$STD rc-update add redis default +$STD rc-service mongodb start +$STD rc-update add mongodb default +msg_ok "Started Services" + +msg_info "Setting Up Squirrel Servers Manager" +$STD git clone https://github.com/SquirrelCorporation/SquirrelServersManager.git /opt/squirrelserversmanager +SECRET=$(generate_random_string 32) +SALT=$(generate_random_string 16) +VAULT_PWD=$(generate_random_string 32) +cat < /opt/squirrelserversmanager/.env +# SECRETS +SECRET=$SECRET +SALT=$SALT +VAULT_PWD=$VAULT_PWD +# MONGO +DB_HOST=127.0.0.1 +DB_NAME=ssm +DB_PORT=27017 +# REDIS +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 +EOF +export NODE_ENV=production +export $(grep -v '^#' /opt/squirrelserversmanager/.env | xargs) +$STD npm install -g npm@latest +$STD npm install -g @umijs/max +$STD npm install -g typescript +$STD npm install pm2 -g +msg_ok "Squirrel Servers Manager Has Been Setup" + +msg_info "Building Squirrel Servers Manager Lib" +cd /opt/squirrelserversmanager/shared-lib +$STD npm ci +$STD npm run build +msg_ok "Squirrel Servers Manager Lib built" + +msg_info "Building & Running Squirrel Servers Manager Client" +cd /opt/squirrelserversmanager/client +$STD npm ci +$STD npm run build +$STD pm2 start --name="squirrelserversmanager-frontend" npm -- run serve +msg_ok "Squirrel Servers Manager Client Built & Ran" + +msg_info "Building & Running Squirrel Servers Manager Server" +cd /opt/squirrelserversmanager/server +$STD npm ci +$STD npm run build +$STD pm2 start --name="squirrelserversmanager-backend" node -- ./dist/src/index.js +msg_ok "Squirrel Servers Manager Server Built & Ran" + +msg_info "Starting Squirrel Servers Manager" +$STD pm2 startup +$STD pm2 save +mkdir -p /usr/share/nginx/html/ +cp /opt/squirrelserversmanager/proxy/www/index.html /usr/share/nginx/html/custom.html + +$STD rc-service nginx start +$STD rc-update add nginx default +msg_ok "Squirrel Servers Manager Started" + +motd_ssh +customize diff --git a/install/timescaledb-install.sh b/install/timescaledb-install.sh new file mode 100644 index 0000000..7e01a75 --- /dev/null +++ b/install/timescaledb-install.sh @@ -0,0 +1,163 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +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 \ + curl \ + sudo \ + mc \ + gnupg \ + apt-transport-https \ + lsb-release +msg_ok "Installed Dependencies" + +msg_info "Setting up PostgreSQL Repository" +VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" +echo "deb http://apt.postgresql.org/pub/repos/apt ${VERSION}-pgdg main" >/etc/apt/sources.list.d/pgdg.list +curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor --output /etc/apt/trusted.gpg.d/postgresql.gpg +msg_ok "Setup PostgreSQL Repository" + +msg_info "Installing PostgreSQL" +$STD apt-get update +$STD apt-get install -y postgresql postgresql-common + +cat </etc/postgresql/17/main/pg_hba.conf +# PostgreSQL Client Authentication Configuration File +local all postgres peer +# TYPE DATABASE USER ADDRESS METHOD +# "local" is for Unix domain socket connections only +local all all md5 +# IPv4 local connections: +host all all 127.0.0.1/32 scram-sha-256 +host all all 0.0.0.0/24 md5 +# IPv6 local connections: +host all all ::1/128 scram-sha-256 +host all all 0.0.0.0/0 md5 +# Allow replication connections from localhost, by a user with the +# replication privilege. +local replication all peer +host replication all 127.0.0.1/32 scram-sha-256 +host replication all ::1/128 scram-sha-256 +EOF + +cat </etc/postgresql/17/main/postgresql.conf +# ----------------------------- +# PostgreSQL configuration file +# ----------------------------- + +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ + +data_directory = '/var/lib/postgresql/17/main' +hba_file = '/etc/postgresql/17/main/pg_hba.conf' +ident_file = '/etc/postgresql/17/main/pg_ident.conf' +external_pid_file = '/var/run/postgresql/17-main.pid' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ + +# - Connection Settings - + +listen_addresses = '*' +port = 5432 +max_connections = 100 +unix_socket_directories = '/var/run/postgresql' + +# - SSL - + +ssl = on +ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' +ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ + +shared_buffers = 128MB +dynamic_shared_memory_type = posix + +#------------------------------------------------------------------------------ +# WRITE-AHEAD LOG +#------------------------------------------------------------------------------ + +max_wal_size = 1GB +min_wal_size = 80MB + +#------------------------------------------------------------------------------ +# REPORTING AND LOGGING +#------------------------------------------------------------------------------ + +# - What to Log - + +log_line_prefix = '%m [%p] %q%u@%d ' +log_timezone = 'Etc/UTC' + +#------------------------------------------------------------------------------ +# PROCESS TITLE +#------------------------------------------------------------------------------ + +cluster_name = '17/main' + +#------------------------------------------------------------------------------ +# CLIENT CONNECTION DEFAULTS +#------------------------------------------------------------------------------ + +# - Locale and Formatting - + +datestyle = 'iso, mdy' +timezone = 'Etc/UTC' +lc_messages = 'C' +lc_monetary = 'C' +lc_numeric = 'C' +lc_time = 'C' +default_text_search_config = 'pg_catalog.english' + +#------------------------------------------------------------------------------ +# CONFIG FILE INCLUDES +#------------------------------------------------------------------------------ + +include_dir = 'conf.d' +EOF + +systemctl restart postgresql +msg_ok "Installed PostgreSQL" + + +msg_info "Setup TimescaleDB" +echo "deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list +wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg +$STD apt-get update +$STD apt-get install timescaledb-2-postgresql-17 postgresql-client-17 +$STD timescaledb-tune --quiet --yes +$STD systemctl restart postgresql +msg_ok "Setup TimescaleDB" + +read -r -p "Would you like to add Adminer? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Adminer" + $STD apt install -y adminer + $STD a2enconf adminer + systemctl reload apache2 + msg_ok "Installed Adminer" +fi + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/wallabag-install.sh b/install/wallabag-install.sh new file mode 100644 index 0000000..b9f1c5d --- /dev/null +++ b/install/wallabag-install.sh @@ -0,0 +1,133 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (Canbiz) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y \ + curl \ + git \ + unzip \ + sudo \ + make \ + php8.2 \ + php8.2-{cli,common,bcmath,intl,fpm,tidy,xml,mysql,mbstring,zip,gd,curl} \ + composer \ + apache2 \ + libapache2-mod-php \ + redis \ + mariadb-server +msg_ok "Installed Dependencies" + +msg_info "Setting up Database" +DB_NAME=wallabag_db +DB_USER=wallabag +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)" +$STD mysql -u root -e "CREATE DATABASE $DB_NAME;" +$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" +$STD mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +{ + echo "Wallabag Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" +} >> ~/wallabag.creds +msg_ok "Set up Database" + +msg_info "Installing Wallabag (Patience)" +RELEASE=$(curl -s https://api.github.com/repos/wallabag/wallabag/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/wallabag/wallabag/archive/refs/tags/${RELEASE}.zip" +unzip -q ${RELEASE}.zip +mv wallabag-${RELEASE} /opt/wallabag +cd /opt/wallabag +useradd -d /opt/wallabag -s /bin/bash -M wallabag +chown -R wallabag:wallabag /opt/wallabag +mv /opt/wallabag/app/config/parameters.yml.dist /opt/wallabag/app/config/parameters.yml +sed -i \ + -e 's|database_name: wallabag|database_name: wallabag_db|' \ + -e 's|database_port: ~|database_port: 3306|' \ + -e 's|database_user: root|database_user: wallabag|' \ + -e 's|database_password: ~|database_password: '"$DB_PASS"'|' \ + -e 's|secret: .*|secret: '"$SECRET_KEY"'|' \ + /opt/wallabag/app/config/parameters.yml + +export COMPOSER_ALLOW_SUPERUSER=1 +sudo -u wallabag make install --no-interaction + +export COMPOSER_ALLOW_SUPERUSER=1 +composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction +msg_ok "Installed Wallabag" + +msg_info "Setting up Virtual Host" +cat </etc/nginx/conf.d/wallabag.conf +server { + root /opt/wallabag/web; + server_name $IPADDRESS; + + location / { + # try to serve file directly, fallback to app.php + try_files $uri /app.php$is_args$args; + } + location ~ ^/app\.php(/|$) { + # if, for some reason, you are still using PHP 5, + # then replace /run/php/php7.0 by /var/run/php5 + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_split_path_info ^(.+\.php)(/.*)$; + include fastcgi_params; + # When you are using symlinks to link the document root to the + # current version of your application, you should pass the real + # application path instead of the path to the symlink to PHP + # FPM. + # Otherwise, PHP's OPcache may not properly detect changes to + # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126 + # for more information). + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + fastcgi_param DOCUMENT_ROOT $realpath_root; + # Prevents URIs that include the front controller. This will 404: + # http://domain.tld/app.php/some-path + # Remove the internal directive to allow URIs like this + internal; + } + + # return 404 for all other php files not matching the front controller + # this prevents access to other php files you don't want to be accessible. + location ~ \.php$ { + return 404; + } + + error_log /var/log/nginx/wallabag_error.log; + access_log /var/log/nginx/wallabag_access.log; +} +EOF + +$STD a2enmod rewrite +$STD a2ensite wallabag.conf +$STD a2dissite 000-default.conf +systemctl reload apache2 +msg_ok "Configured Virtual Host" + +msg_info "Setting Permissions" +chown -R www-data:www-data /opt/wallabag/{bin,app/config,vendor,data,var,web} +msg_ok "Set Permissions" + +msg_info "Running Wallabag Installation" +php bin/console wallabag:install --env=prod +msg_ok "Wallabag Installed" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 9ba47d7c0411821e78d1976d5a4d1e94c81f2089 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 14 Apr 2025 10:10:50 +0000 Subject: [PATCH 0519/1614] Update .app files --- ct/headers/alpine-duplicati | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/alpine-duplicati diff --git a/ct/headers/alpine-duplicati b/ct/headers/alpine-duplicati deleted file mode 100644 index b2fca39..0000000 --- a/ct/headers/alpine-duplicati +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ _ ____ ___ __ _ - / | / /___ (_)___ ___ / __ \__ ______ / (_)________ _/ /_(_) - / /| | / / __ \/ / __ \/ _ \______/ / / / / / / __ \/ / / ___/ __ `/ __/ / - / ___ |/ / /_/ / / / / / __/_____/ /_/ / /_/ / /_/ / / / /__/ /_/ / /_/ / -/_/ |_/_/ .___/_/_/ /_/\___/ /_____/\__,_/ .___/_/_/\___/\__,_/\__/_/ - /_/ /_/ From 0e08b4fb50481785a8aa045470eab6d243b05b7f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:20:19 +0200 Subject: [PATCH 0520/1614] Update documenso-install.sh --- install/documenso-install.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/install/documenso-install.sh b/install/documenso-install.sh index 70dba1d..3f5434a 100644 --- a/install/documenso-install.sh +++ b/install/documenso-install.sh @@ -5,7 +5,7 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/documenso/documenso -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -15,17 +15,17 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gpg \ - libc6 \ - curl \ - sudo \ - make \ - cmake \ - mc \ - jq \ - postgresql \ - python3 \ - python3-bcrypt + gpg \ + libc6 \ + curl \ + sudo \ + make \ + cmake \ + mc \ + jq \ + postgresql \ + python3 \ + python3-bcrypt msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -54,7 +54,7 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" echo "Database Name: $DB_NAME" echo "Database User: $DB_USER" echo "Database Password: $DB_PASS" -} >> ~/documenso.creds +} >>~/documenso.creds msg_ok "Set up PostgreSQL" msg_info "Installing Documenso (Patience)" @@ -98,7 +98,7 @@ After=network.target postgresql.service [Service] WorkingDirectory=/opt/documenso/apps/web -ExecStart=/usr/bin/next start -p 3500 +ExecStart=/usr/bin/npm start Restart=always EnvironmentFile=/opt/documenso/.env @@ -114,4 +114,4 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" From 1e930dc88dd1880962880d234e4748d8c155e626 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 13:46:10 +0200 Subject: [PATCH 0521/1614] local ip helper --- misc/tools.func | 89 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/misc/tools.func b/misc/tools.func index 5b35f1d..41f986f 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -647,3 +647,92 @@ fetch_and_deploy_gh_release() { $STD msg_ok "Deployed $app v$version to /opt/$app" rm -rf "$tmpdir" } + +setup_local_ip_helper() { + local BASE_DIR="/usr/local/community-scripts/ip-management" + local SCRIPT_PATH="$BASE_DIR/update_local_ip.sh" + local SERVICE_PATH="/etc/systemd/system/update-local-ip.service" + local TIMER_PATH="/etc/systemd/system/update-local-ip.timer" + + mkdir -p "$BASE_DIR" + + # Create update script + cat <<'EOF' >"$SCRIPT_PATH" +#!/bin/bash +set -e + +IP_FILE="/run/local-ip.env" +mkdir -p "$(dirname "$IP_FILE")" + +get_current_ip() { + ip route get 1 | awk '{print $7; exit}' 2>/dev/null +} + +current_ip="$(get_current_ip)" + +if [[ -z "$current_ip" ]]; then + echo "[ERROR] Could not detect local IP" >&2 + exit 1 +fi + +if [[ -f "$IP_FILE" ]]; then + source "$IP_FILE" + if [[ "$LOCAL_IP" == "$current_ip" ]]; then + exit 0 + fi +fi + +echo "LOCAL_IP=$current_ip" > "$IP_FILE" +echo "[INFO] LOCAL_IP updated to $current_ip" +EOF + + chmod +x "$SCRIPT_PATH" + + # Create systemd service + cat <"$SERVICE_PATH" +[Unit] +Description=Update LOCAL_IP file +After=network-online.target + +[Service] +Type=oneshot +ExecStart=$SCRIPT_PATH +EOF + + # Create systemd timer + cat <"$TIMER_PATH" +[Unit] +Description=Periodic LOCAL_IP update + +[Timer] +OnBootSec=15 +OnUnitActiveSec=60 +Persistent=true + +[Install] +WantedBy=timers.target +EOF + + systemctl daemon-reexec + systemctl daemon-reload + systemctl enable --now update-local-ip.timer + + msg_ok "Setup LOCAL_IP helper in $BASE_DIR with systemd integration" +} + +import_local_ip() { + local IP_FILE="/run/local-ip.env" + if [[ -f "$IP_FILE" ]]; then + source "$IP_FILE" + fi + + if [[ -z "$LOCAL_IP" ]]; then + LOCAL_IP="$(ip route get 1 | awk '{print $7; exit}' 2>/dev/null)" + if [[ -z "$LOCAL_IP" ]]; then + msg_error "Could not determine LOCAL_IP" + return 1 + fi + fi + + export LOCAL_IP +} From 015600af6f57e7eb6492d956234bdf28e73d8db7 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 13:50:03 +0200 Subject: [PATCH 0522/1614] test --- install/documenso-install.sh | 4 ++++ misc/tools.func | 1 + 2 files changed, 5 insertions(+) diff --git a/install/documenso-install.sh b/install/documenso-install.sh index 3f5434a..69959cb 100644 --- a/install/documenso-install.sh +++ b/install/documenso-install.sh @@ -13,6 +13,10 @@ setting_up_container network_check update_os +msg_info "Setup Functions" +import_local_ip +msg_ok "Setup Functions" + msg_info "Installing Dependencies" $STD apt-get install -y \ gpg \ diff --git a/misc/tools.func b/misc/tools.func index 41f986f..262921f 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -721,6 +721,7 @@ EOF } import_local_ip() { + setup_local_ip_helper local IP_FILE="/run/local-ip.env" if [[ -f "$IP_FILE" ]]; then source "$IP_FILE" From 93f7737b6c31d5e78a566b7b6691d539e96a55cf Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 13:53:53 +0200 Subject: [PATCH 0523/1614] testing --- install/documenso-install.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/install/documenso-install.sh b/install/documenso-install.sh index 69959cb..484176e 100644 --- a/install/documenso-install.sh +++ b/install/documenso-install.sh @@ -68,17 +68,22 @@ wget -q "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zi unzip -q v${RELEASE}.zip mv documenso-${RELEASE} /opt/documenso cd /opt/documenso -mv .env.example .env -sed -i "s|NEXTAUTH_SECRET=.*|NEXTAUTH_SECRET='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" /opt/documenso/.env -sed -i "s|NEXT_PRIVATE_ENCRYPTION_KEY=.*|NEXT_PRIVATE_ENCRYPTION_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" /opt/documenso/.env -sed -i "s|NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=.*|NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" /opt/documenso/.env -sed -i "s|NEXT_PUBLIC_WEBAPP_URL=.*|NEXT_PUBLIC_WEBAPP_URL='http://localhost:9000'|" /opt/documenso/.env -sed -i "s|NEXT_PRIVATE_DATABASE_URL=.*|NEXT_PRIVATE_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" /opt/documenso/.env -sed -i "s|NEXT_PRIVATE_DIRECT_DATABASE_URL=.*|NEXT_PRIVATE_DIRECT_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" /opt/documenso/.env +mv .env.example /opt/documenso_data/.env +sed -i \ + -e "s|^NEXTAUTH_SECRET=.*|NEXTAUTH_SECRET='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \ + -e "s|^NEXT_PRIVATE_ENCRYPTION_KEY=.*|NEXT_PRIVATE_ENCRYPTION_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \ + -e "s|^NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=.*|NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \ + -e "s|^NEXTAUTH_URL=.*|NEXTAUTH_URL=\"http://${LOCAL_IP}:3000\"|" \ + -e "s|^NEXT_PUBLIC_WEBAPP_URL=.*|NEXT_PUBLIC_WEBAPP_URL='http://${LOCAL_IP}:9000'|" \ + -e "s|^NEXT_PUBLIC_MARKETING_URL=.*|NEXT_PUBLIC_MARKETING_URL=\"http://${LOCAL_IP}:3001\"|" \ + -e "s|^NEXT_PRIVATE_INTERNAL_WEBAPP_URL=.*|NEXT_PRIVATE_INTERNAL_WEBAPP_URL=\"http://${LOCAL_IP}:3000\"|" \ + -e "s|^NEXT_PRIVATE_DATABASE_URL=.*|NEXT_PRIVATE_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" \ + -e "s|^NEXT_PRIVATE_DIRECT_DATABASE_URL=.*|NEXT_PRIVATE_DIRECT_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" \ + /opt/documenso_data/.env export TURBO_CACHE=1 export NEXT_TELEMETRY_DISABLED=1 export CYPRESS_INSTALL_BINARY=0 -export NODE_OPTIONS="--max-old-space-size=2048" +export NODE_OPTIONS="--max-old-space-size=4096" # $STD npm ci --cache ~/.npm-cache --maxsockets=5 # $STD npm run build # $STD npx prisma migrate deploy --schema ./packages/prisma/schema.prisma @@ -104,7 +109,7 @@ After=network.target postgresql.service WorkingDirectory=/opt/documenso/apps/web ExecStart=/usr/bin/npm start Restart=always -EnvironmentFile=/opt/documenso/.env +EnvironmentFile=/opt/documenso_data/.env [Install] WantedBy=multi-user.target From 7c82a388985d7656e9d53ec0c13885850c371579 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 13:55:34 +0200 Subject: [PATCH 0524/1614] Update documenso-install.sh --- install/documenso-install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install/documenso-install.sh b/install/documenso-install.sh index 484176e..25cb270 100644 --- a/install/documenso-install.sh +++ b/install/documenso-install.sh @@ -21,11 +21,8 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ gpg \ libc6 \ - curl \ - sudo \ make \ cmake \ - mc \ jq \ postgresql \ python3 \ From 509b885dc84067e531c3d52649f5775ceb3522b8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:00:09 +0200 Subject: [PATCH 0525/1614] Update tools.func --- misc/tools.func | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 262921f..603e026 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -715,19 +715,19 @@ EOF systemctl daemon-reexec systemctl daemon-reload - systemctl enable --now update-local-ip.timer + systemctl enable -q --now update-local-ip.timer msg_ok "Setup LOCAL_IP helper in $BASE_DIR with systemd integration" } import_local_ip() { - setup_local_ip_helper local IP_FILE="/run/local-ip.env" if [[ -f "$IP_FILE" ]]; then + # shellcheck disable=SC1090 source "$IP_FILE" fi - if [[ -z "$LOCAL_IP" ]]; then + if [[ -z "${LOCAL_IP:-}" ]]; then LOCAL_IP="$(ip route get 1 | awk '{print $7; exit}' 2>/dev/null)" if [[ -z "$LOCAL_IP" ]]; then msg_error "Could not determine LOCAL_IP" From 83f7fab8aaffc0b0f10335c528203f01d3534810 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:02:18 +0200 Subject: [PATCH 0526/1614] Update documenso-install.sh --- install/documenso-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/documenso-install.sh b/install/documenso-install.sh index 25cb270..5679cec 100644 --- a/install/documenso-install.sh +++ b/install/documenso-install.sh @@ -14,6 +14,7 @@ network_check update_os msg_info "Setup Functions" +setup_local_ip_helper import_local_ip msg_ok "Setup Functions" From e5a044aba3acd66e18fce8974f5b77fecc25d3eb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:10:00 +0200 Subject: [PATCH 0527/1614] Update documenso-install.sh --- install/documenso-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/documenso-install.sh b/install/documenso-install.sh index 5679cec..6aadcbf 100644 --- a/install/documenso-install.sh +++ b/install/documenso-install.sh @@ -61,7 +61,8 @@ msg_ok "Set up PostgreSQL" msg_info "Installing Documenso (Patience)" cd /opt -RELEASE=$(curl -s https://api.github.com/repos/documenso/documenso/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +mkdir -p /opt/documenso_data +RELEASE=$(curl -fsSL https://api.github.com/repos/documenso/documenso/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -q "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip mv documenso-${RELEASE} /opt/documenso From 09ba8c1a92d879aa28cbd13e7cafebf4674e23e7 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:25:29 +0200 Subject: [PATCH 0528/1614] add documenso --- frontend/public/json/documenso.json | 34 +++++++++++++++++++++++++++++ misc/tools.func | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 frontend/public/json/documenso.json diff --git a/frontend/public/json/documenso.json b/frontend/public/json/documenso.json new file mode 100644 index 0000000..4a44fb3 --- /dev/null +++ b/frontend/public/json/documenso.json @@ -0,0 +1,34 @@ +{ + "name": "Documenso", + "slug": "documenso", + "categories": [ + 12 + ], + "date_created": "2025-04-14", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 3000, + "documentation": "https://documenso.com/", + "website": "https://documenso.com/", + "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/documenso.svg", + "description": "Signing documents digitally should be fast and easy and should be the best practice for every document signed worldwide. This is technically quite easy today, but it also introduces a new party to every signature: The signing tool providers. While this is not a problem in itself, it should make us think about how we want these providers of trust to work. Documenso aims to be the world's most trusted document-signing tool. This trust is built by empowering you to self-host Documenso and review how it works under the hood.", + "install_methods": [ + { + "type": "default", + "script": "ct/documenso.sh", + "resources": { + "cpu": 4, + "ram": 6144, + "hdd": 10, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "helper-scripts@local.com", + "password": "helper-scripts" + }, + "notes": [] +} diff --git a/misc/tools.func b/misc/tools.func index 603e026..8b1911c 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -717,7 +717,7 @@ EOF systemctl daemon-reload systemctl enable -q --now update-local-ip.timer - msg_ok "Setup LOCAL_IP helper in $BASE_DIR with systemd integration" + $STD msg_ok "Setup LOCAL_IP helper in $BASE_DIR with systemd integration" } import_local_ip() { From c68ef0020e645d148bdb8bbb4c121b4959cfd0eb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:27:57 +0200 Subject: [PATCH 0529/1614] Update musicassistant.sh --- ct/musicassistant.sh | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/ct/musicassistant.sh b/ct/musicassistant.sh index f6ca699..f359a21 100644 --- a/ct/musicassistant.sh +++ b/ct/musicassistant.sh @@ -20,14 +20,33 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources + header_info + check_container_storage + check_container_resources - if [[ ! -d /opt/musicassistant ]]; then - msg_error "No Installation Found!" - exit - fi + if [[ ! -d /opt/musicassistant ]]; then + msg_error "No existing installation found!" + exit 1 + fi + + msg_info "Stopping Music Assistant service" + systemctl stop musicassistant + msg_ok "Service stopped" + + msg_info "Updating Music Assistant files" + cd /opt/musicassistant || exit 1 + $STD fetch_and_deploy_gh_release music-assistant/server + msg_ok "Music Assistant files updated" + + msg_info "Updating Python virtual environment" + source .venv/bin/activate || exit 1 + pip install --upgrade pip uv + uv pip install . + msg_ok "Python environment updated" + + msg_info "Restarting Music Assistant service" + systemctl restart musicassistant + msg_ok "Service restarted" } start From 6fbd4605ea02559b9e080fe732360f7bf4755b8c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:34:12 +0200 Subject: [PATCH 0530/1614] Update documenso-install.sh --- install/documenso-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/documenso-install.sh b/install/documenso-install.sh index 6aadcbf..2c01497 100644 --- a/install/documenso-install.sh +++ b/install/documenso-install.sh @@ -61,24 +61,25 @@ msg_ok "Set up PostgreSQL" msg_info "Installing Documenso (Patience)" cd /opt -mkdir -p /opt/documenso_data RELEASE=$(curl -fsSL https://api.github.com/repos/documenso/documenso/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -q "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip mv documenso-${RELEASE} /opt/documenso cd /opt/documenso -mv .env.example /opt/documenso_data/.env +mv .env.example /opt/documenso/.env sed -i \ -e "s|^NEXTAUTH_SECRET=.*|NEXTAUTH_SECRET='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \ -e "s|^NEXT_PRIVATE_ENCRYPTION_KEY=.*|NEXT_PRIVATE_ENCRYPTION_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \ -e "s|^NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=.*|NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \ + -e "s|^DOCUMENSO_ENCRYPTION_KEY=.*|DOCUMENSO_ENCRYPTION_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \ + -e "s|^DOCUMENSO_ENCRYPTION_SECONDARY_KEY=.*|DOCUMENSO_ENCRYPTION_SECONDARY_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \ -e "s|^NEXTAUTH_URL=.*|NEXTAUTH_URL=\"http://${LOCAL_IP}:3000\"|" \ -e "s|^NEXT_PUBLIC_WEBAPP_URL=.*|NEXT_PUBLIC_WEBAPP_URL='http://${LOCAL_IP}:9000'|" \ -e "s|^NEXT_PUBLIC_MARKETING_URL=.*|NEXT_PUBLIC_MARKETING_URL=\"http://${LOCAL_IP}:3001\"|" \ -e "s|^NEXT_PRIVATE_INTERNAL_WEBAPP_URL=.*|NEXT_PRIVATE_INTERNAL_WEBAPP_URL=\"http://${LOCAL_IP}:3000\"|" \ -e "s|^NEXT_PRIVATE_DATABASE_URL=.*|NEXT_PRIVATE_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" \ -e "s|^NEXT_PRIVATE_DIRECT_DATABASE_URL=.*|NEXT_PRIVATE_DIRECT_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" \ - /opt/documenso_data/.env + /opt/documenso/.env export TURBO_CACHE=1 export NEXT_TELEMETRY_DISABLED=1 export CYPRESS_INSTALL_BINARY=0 @@ -108,7 +109,7 @@ After=network.target postgresql.service WorkingDirectory=/opt/documenso/apps/web ExecStart=/usr/bin/npm start Restart=always -EnvironmentFile=/opt/documenso_data/.env +EnvironmentFile=/opt/documenso/.env [Install] WantedBy=multi-user.target From cbee0200f3d5ce0ed0af1197525e1e4ac07ebc59 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 15:02:32 +0200 Subject: [PATCH 0531/1614] Update documenso.sh --- ct/documenso.sh | 80 ++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/ct/documenso.sh b/ct/documenso.sh index 15fc527..1e22168 100644 --- a/ct/documenso.sh +++ b/ct/documenso.sh @@ -20,46 +20,46 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/documenso ]]; then - msg_error "No ${APP} Installation Found!" + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/documenso ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/documenso/documenso/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 + msg_info "Stopping ${APP}" + systemctl stop documenso + msg_ok "${APP} Stopped" + + msg_info "Updating ${APP} to ${RELEASE}" + cp /opt/documenso/.env /opt/ + rm -R /opt/documenso + curl -fsSL "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zip" + unzip -q v${RELEASE}.zip + mv documenso-${RELEASE} /opt/documenso + cd /opt/documenso + mv /opt/.env /opt/documenso/.env + npm install &>/dev/null + npm run build:web &>/dev/null + npm run prisma:migrate-deploy &>/dev/null + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP}" + + msg_info "Starting ${APP}" + systemctl start documenso + msg_ok "Started ${APP}" + + msg_info "Cleaning Up" + rm -rf v${RELEASE}.zip + msg_ok "Cleaned" + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi exit - fi - RELEASE=$(curl -s https://api.github.com/repos/documenso/documenso/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 - msg_info "Stopping ${APP}" - systemctl stop documenso - msg_ok "${APP} Stopped" - - msg_info "Updating ${APP} to ${RELEASE}" - cp /opt/documenso/.env /opt/ - rm -R /opt/documenso - curl -fsSL "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zip" - unzip -q v${RELEASE}.zip - mv documenso-${RELEASE} /opt/documenso - cd /opt/documenso - mv /opt/.env /opt/documenso/.env - npm install &>/dev/null - npm run build:web &>/dev/null - npm run prisma:migrate-deploy &>/dev/null - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Updated ${APP}" - - msg_info "Starting ${APP}" - systemctl start documenso - msg_ok "Started ${APP}" - - msg_info "Cleaning Up" - rm -rf v${RELEASE}.zip - msg_ok "Cleaned" - msg_ok "Updated Successfully" - else - msg_ok "No update required. ${APP} is already at ${RELEASE}" - fi - exit } start @@ -69,4 +69,4 @@ 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}:9000${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" From f18e8a644284abf8227a6dfb644cfe70da37264a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 15:02:54 +0200 Subject: [PATCH 0532/1614] Update documenso.sh --- ct/documenso.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/documenso.sh b/ct/documenso.sh index 1e22168..660e3ea 100644 --- a/ct/documenso.sh +++ b/ct/documenso.sh @@ -37,7 +37,7 @@ function update_script() { msg_info "Updating ${APP} to ${RELEASE}" cp /opt/documenso/.env /opt/ rm -R /opt/documenso - curl -fsSL "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zip" + curl -fsSL "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zip" -o v${RELEASE}.zip unzip -q v${RELEASE}.zip mv documenso-${RELEASE} /opt/documenso cd /opt/documenso From deb8b156975a0dca91cfbf73ae38cd8d5e2e6961 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 15:06:09 +0200 Subject: [PATCH 0533/1614] ficxes --- ct/reactive-resume.sh | 145 ++++++++++++++--------------- install/reactive-resume-install.sh | 28 +++--- 2 files changed, 86 insertions(+), 87 deletions(-) diff --git a/ct/reactive-resume.sh b/ct/reactive-resume.sh index 6dc6665..3032b69 100644 --- a/ct/reactive-resume.sh +++ b/ct/reactive-resume.sh @@ -20,81 +20,80 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources + header_info + check_container_storage + check_container_resources - if [[ ! -f /etc/systemd/system/Reactive-Resume.service ]]; then - msg_error "No ${APP} Installation Found!" + if [[ ! -f /etc/systemd/system/Reactive-Resume.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping services" + systemctl stop Reactive-Resume + msg_ok "Stopped services" + + msg_info "Updating $APP to v${RELEASE}" + cp /opt/${APP}/.env /opt/rxresume.env + res_tmp=$(mktemp) + rm -rf /opt/${APP} + curl -fsSL "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -O $res_tmp + unzip -q $res_tmp + mv ${APP}-${RELEASE}/ /opt/${APP} + cd /opt/${APP} + export PUPPETEER_SKIP_DOWNLOAD="true" + export NEXT_TELEMETRY_DISABLED=1 + export CI="true" + export NODE_ENV="production" + $STD pnpm install --frozen-lockfile + $STD pnpm run build + $STD pnpm run prisma:generate + mv /opt/rxresume.env /opt/${APP}/.env + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Updating Minio" + systemctl stop minio + cd /tmp + curl -fsSL https://dl.min.io/server/minio/release/linux-amd64/minio.deb -o minio.deb + $STD dpkg -i minio.deb + msg_ok "Updated Minio" + + msg_info "Updating Browserless (Patience)" + systemctl stop browserless + cp /opt/browserless/.env /opt/browserless.env + rm -rf browserless + brwsr_tmp=$(mktemp) + TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') + curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -O $brwsr_tmp + unzip -q $brwsr_tmp + mv browserless-${TAG}/ /opt/browserless + cd /opt/browserless + $STD npm install + rm -rf src/routes/{chrome,edge,firefox,webkit} + $STD node_modules/playwright-core/cli.js install --with-deps chromium + $STD npm run build + $STD npm run build:function + $STD npm prune production + mv /opt/browserless.env /opt/browserless/.env + msg_ok "Updated Browserless" + + msg_info "Restarting services" + systemctl start minio Reactive-Resume browserless + msg_ok "Restarted services" + + msg_info "Cleaning Up" + rm -f /tmp/minio.deb + rm -f $brwsr_tmp + rm -f $res_tmp + msg_ok "Cleanup Completed" + + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Update Successful" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" + fi exit - fi - - RELEASE=$(curl -s https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - msg_info "Stopping services" - systemctl stop Reactive-Resume - msg_ok "Stopped services" - - msg_info "Updating $APP to v${RELEASE}" - cp /opt/${APP}/.env /opt/rxresume.env - res_tmp=$(mktemp) - rm -rf /opt/${APP} - wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -O $res_tmp - unzip -q $res_tmp - mv ${APP}-${RELEASE}/ /opt/${APP} - cd /opt/${APP} - export PUPPETEER_SKIP_DOWNLOAD="true" - export NEXT_TELEMETRY_DISABLED=1 - export CI="true" - export NODE_ENV="production" - $STD pnpm install --frozen-lockfile - $STD pnpm run build - $STD pnpm run prisma:generate - mv /opt/rxresume.env /opt/${APP}/.env - msg_ok "Updated $APP to v${RELEASE}" - - msg_info "Updating Minio" - systemctl stop minio - cd /tmp - wget -q https://dl.min.io/server/minio/release/linux-amd64/minio.deb - $STD dpkg -i minio.deb - msg_ok "Updated Minio" - - msg_info "Updating Browserless (Patience)" - systemctl stop browserless - cp /opt/browserless/.env /opt/browserless.env - rm -rf browserless - brwsr_tmp=$(mktemp) - TAG=$(curl -s https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') - wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -O $brwsr_tmp - unzip -q $brwsr_tmp - mv browserless-${TAG}/ /opt/browserless - cd /opt/browserless - $STD npm install - rm -rf src/routes/{chrome,edge,firefox,webkit} - $STD node_modules/playwright-core/cli.js install --with-deps chromium - $STD npm run build - $STD npm run build:function - $STD npm prune production - mv /opt/browserless.env /opt/browserless/.env - msg_ok "Updated Browserless" - - msg_info "Restarting services" - systemctl start minio Reactive-Resume browserless - msg_ok "Restarted services" - - msg_info "Cleaning Up" - rm -f /tmp/minio.deb - rm -f $brwsr_tmp - rm -f $res_tmp - msg_ok "Cleanup Completed" - - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Update Successful" - else - msg_ok "No update required. ${APP} is already at v${RELEASE}" - fi - exit } start diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh index a429f72..f94299c 100644 --- a/install/reactive-resume-install.sh +++ b/install/reactive-resume-install.sh @@ -15,9 +15,9 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg \ - unzip \ - postgresql-common + gnupg \ + unzip \ + postgresql-common msg_ok "Installed Dependencies" msg_info "Installing Additional Dependencies" @@ -27,7 +27,7 @@ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.co echo "YES" | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh &>/dev/null $STD apt-get install -y postgresql-16 nodejs cd /tmp -wget -q https://dl.min.io/server/minio/release/linux-amd64/minio.deb +curl -fsSL https://dl.min.io/server/minio/release/linux-amd64/minio.deb -o minio.deb $STD dpkg -i minio.deb msg_info "Setting up Database" @@ -46,9 +46,9 @@ ACCESS_TOKEN=$(openssl rand -base64 48) REFRESH_TOKEN=$(openssl rand -base64 48) CHROME_TOKEN=$(openssl rand -hex 32) LOCAL_IP=$(hostname -I | awk '{print $1}') -TAG=$(curl -s https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') -RELEASE=$(curl -s https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -q "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" +TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -fsSL https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +curl -fsSL "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -o v${RELEASE}.zip unzip -q v${RELEASE}.zip mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION} cd /opt/${APPLICATION} @@ -65,7 +65,7 @@ msg_ok "Installed ${APPLICATION}" msg_info "Installing Browserless (Patience)" cd /tmp -wget -q https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip +curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -o v${TAG}.zip unzip -q v${TAG}.zip mv browserless-${TAG} /opt/browserless cd /opt/browserless @@ -98,7 +98,7 @@ CHROME_TOKEN=${CHROME_TOKEN} CHROME_URL=ws://localhost:8080 CHROME_IGNORE_HTTPS_ERRORS=true MAIL_FROM=noreply@locahost -# SMTP_URL=smtp://username:password@smtp.server.mail:587 # +# SMTP_URL=smtp://username:password@smtp.server.mail:587 # STORAGE_ENDPOINT=localhost STORAGE_PORT=9000 STORAGE_REGION=us-east-1 @@ -126,11 +126,11 @@ TOKEN=${CHROME_TOKEN} EOF echo "${RELEASE}" >/opt/${APPLICATION}_version.txt { - echo "${APPLICATION} Credentials" - echo "Database User: $DB_USER" - echo "Database Password: $DB_PASS" - echo "Database Name: $DB_NAME" - echo "Minio Root Password: ${MINIO_PASS}" + echo "${APPLICATION} Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" + echo "Minio Root Password: ${MINIO_PASS}" } >>~/${APPLICATION}.creds msg_ok "Configured applications" From 6c38762e594d88760a0dfb79823e75df355dc3d8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 15:33:36 +0200 Subject: [PATCH 0534/1614] Update docspell-install.sh --- install/docspell-install.sh | 50 ++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/install/docspell-install.sh b/install/docspell-install.sh index 370477f..0e80c41 100644 --- a/install/docspell-install.sh +++ b/install/docspell-install.sh @@ -15,25 +15,19 @@ update_os msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ - unzip \ - htop \ - gnupg2 \ - ca-certificates \ - default-jdk \ - apt-transport-https \ - ghostscript \ - tesseract-ocr \ - tesseract-ocr-deu \ - tesseract-ocr-eng \ - unpaper \ - unoconv \ - wkhtmltopdf \ - ocrmypdf \ - zip \ - curl \ - sudo \ - make \ - mc + htop \ + gnupg2 \ + ca-certificates \ + default-jdk \ + apt-transport-https \ + ghostscript \ + tesseract-ocr \ + tesseract-ocr-deu \ + tesseract-ocr-eng \ + unpaper \ + unoconv \ + wkhtmltopdf \ + ocrmypdf msg_ok "Installed Dependencies" msg_info "Setting up PostgreSQL Repository" @@ -53,10 +47,10 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8' $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';" { - echo "Docspell-Credentials" - echo "Docspell Database Name: $DB_NAME" - echo "Docspell Database User: $DB_USER" - echo "Docspell Database Password: $DB_PASS" + echo "Docspell-Credentials" + echo "Docspell Database Name: $DB_NAME" + echo "Docspell Database User: $DB_USER" + echo "Docspell Database Password: $DB_PASS" } >>~/docspell.creds msg_ok "Set up PostgreSQL Database" @@ -65,10 +59,10 @@ mkdir -p /opt/docspell Docspell=$(curl -fsSL https://github.com/eikek/docspell/releases/latest -o - | grep "title>Release" | cut -d " " -f 5) DocspellDSC=$(curl -fsSL https://github.com/docspell/dsc/releases/latest -o - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//') cd /opt -curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-joex_${Docspell}_all.deb -curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-restserver_${Docspell}_all.deb +curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-joex_${Docspell}_all.deb -o docspell-joex_${Docspell}_all.deb +curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-restserver_${Docspell}_all.deb -o docspell-restserver_${Docspell}_all.deb $STD dpkg -i docspell-*.deb -curl -fsSL https://github.com/docspell/dsc/releases/download/v${DocspellDSC}/dsc_amd64-musl-${DocspellDSC} +curl -fsSL https://github.com/docspell/dsc/releases/download/v${DocspellDSC}/dsc_amd64-musl-${DocspellDSC} -o dsc_amd64-musl-${DocspellDSC} mv dsc_amd* dsc chmod +x dsc mv dsc /usr/bin @@ -102,9 +96,9 @@ msg_ok "Setup Docspell" msg_info "Setup Apache Solr" cd /opt/docspell SOLR_DOWNLOAD_URL="https://downloads.apache.org/lucene/solr/" -latest_version=$(curl -s "$SOLR_DOWNLOAD_URL" | grep -oP '(?<=[0-9])' | head -n 1) +latest_version=$(curl -fsSL "$SOLR_DOWNLOAD_URL" | grep -oP '(?<=[0-9])' | head -n 1) download_url="${SOLR_DOWNLOAD_URL}${latest_version}/solr-${latest_version}.tgz" -curl -fsSL "$download_url" +curl -fsSL "$download_url" -o "solr-$latest_version.tgz" tar xzf "solr-$latest_version.tgz" $STD bash "/opt/docspell/solr-$latest_version/bin/install_solr_service.sh" "solr-$latest_version.tgz" mv /opt/solr /opt/docspell/solr From f2a3e35978aadc098ee9c57293c770a5ac4c3255 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 15:34:08 +0200 Subject: [PATCH 0535/1614] Update docspell-install.sh --- install/docspell-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/docspell-install.sh b/install/docspell-install.sh index 0e80c41..6fce0d6 100644 --- a/install/docspell-install.sh +++ b/install/docspell-install.sh @@ -1,9 +1,8 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 community-scripts ORG # Author: MickLesk (Canbiz) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# License: MIT | source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color From d9d4917782335649941d0ee418582956fb2d42b5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 14 Apr 2025 13:42:59 +0000 Subject: [PATCH 0536/1614] Deleted files for issue: openziti-controller --- ct/openziti-controller.sh | 44 -------------- frontend/public/json/openziti-controller.json | 39 ------------ install/openziti-controller-install.sh | 60 ------------------- 3 files changed, 143 deletions(-) delete mode 100644 ct/openziti-controller.sh delete mode 100644 frontend/public/json/openziti-controller.json delete mode 100644 install/openziti-controller-install.sh diff --git a/ct/openziti-controller.sh b/ct/openziti-controller.sh deleted file mode 100644 index 1a6aa25..0000000 --- a/ct/openziti-controller.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: emoscardini -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/openziti/ziti - -APP="openziti-controller" -var_tags="network;openziti-controller" -var_cpu="2" -var_ram="1024" -var_disk="8" -var_os="debian" -var_version="12" -var_unprivileged="1" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/openziti ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_info "Updating $APP LXC" - $STD apt-get update - $STD apt-get -y upgrade - msg_ok "Updated $APP LXC" - 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}https://${IP}:/zac${CL}" \ No newline at end of file diff --git a/frontend/public/json/openziti-controller.json b/frontend/public/json/openziti-controller.json deleted file mode 100644 index 2089e67..0000000 --- a/frontend/public/json/openziti-controller.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "openziti-controller", - "slug": "openziti-controller", - "categories": [ - 4 - ], - "date_created": "2025-03-20", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": null, - "documentation": "https://openziti.io/docs/reference/tunnelers/docker/", - "website": "https://www.openziti.io/", - "logo": "https://raw.githubusercontent.com/openziti/ziti-doc/main/docusaurus/static/img/ziti-logo-dark.svg", - "description": "OpenZiti is an open-source, zero trust networking platform that enables secure connectivity between applications, services, and devices. It provides secure, encrypted connections between clients and services, and can be used to create secure, zero trust networks.", - "install_methods": [ - { - "type": "default", - "script": "ct/openziti-controller.sh", - "resources": { - "cpu": 2, - "ram": 1024, - "hdd": 8, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "The Openziti Controller installation will prompt for configuration settings during installation.", - "type": "info" - } - ] -} diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh deleted file mode 100644 index 2df0d31..0000000 --- a/install/openziti-controller-install.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: emoscardini -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/openziti/ziti - -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 gpg -msg_ok "Installed Dependencies" - -msg_info "Installing openziti" -mkdir -p --mode=0755 /usr/share/keyrings -curl -sSLf https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg -echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main" >/etc/apt/sources.list.d/openziti.list -$STD apt-get update -$STD apt-get install -y openziti-controller openziti-console -msg_ok "Installed openziti" - -read -r -p "Would you like to go through the auto configuration now? " prompt -if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - IPADDRESS=$(hostname -I | awk '{print $1}') - GEN_FQDN="controller.${IPADDRESS}.sslip.io" - read -r -p "Please enter the controller FQDN [${GEN_FQDN}]: " ZITI_CTRL_ADVERTISED_ADDRESS - ZITI_CTRL_ADVERTISED_ADDRESS=${ZITI_CTRL_ADVERTISED_ADDRESS:-$GEN_FQDN} - read -r -p "Please enter the controller port [1280]: " ZITI_CTRL_ADVERTISED_PORT - ZITI_CTRL_ADVERTISED_PORT=${ZITI_CTRL_ADVERTISED_PORT:-1280} - read -r -p "Please enter the controller admin user [admin]: " ZITI_USER - ZITI_USER=${ZITI_USER:-admin} - GEN_PWD=$(head -c128 /dev/urandom | LC_ALL=C tr -dc 'A-Za-z0-9!@#$%^*_+~' | cut -c 1-12) - read -r -p "Please enter the controller admin password [${GEN_PWD}]:" ZITI_PWD - ZITI_PWD=${ZITI_PWD:-$GEN_PWD} - CONFIG_FILE="/opt/openziti/etc/controller/bootstrap.env" - sed -i "s|^ZITI_CTRL_ADVERTISED_ADDRESS=.*|ZITI_CTRL_ADVERTISED_ADDRESS='${ZITI_CTRL_ADVERTISED_ADDRESS}'|" "$CONFIG_FILE" - sed -i "s|^ZITI_CTRL_ADVERTISED_PORT=.*|ZITI_CTRL_ADVERTISED_PORT='${ZITI_CTRL_ADVERTISED_PORT}'|" "$CONFIG_FILE" - sed -i "s|^ZITI_USER=.*|ZITI_USER='${ZITI_USER}'|" "$CONFIG_FILE" - sed -i "s|^ZITI_PWD=.*|ZITI_PWD='${ZITI_PWD}'|" "$CONFIG_FILE" - env VERBOSE=0 bash /opt/openziti/etc/controller/bootstrap.bash - msg_ok "Configuration Completed" - systemctl enable -q --now ziti-controller -else - systemctl enable -q ziti-controller - msg_error "Configration not provided; Please run /opt/openziti/etc/controller/bootstrap.bash to configure the controller and restart the container" -fi - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" From 1839fd23f3b61fbed3edc8aab403914a9030cfdc Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 14 Apr 2025 14:04:52 +0000 Subject: [PATCH 0537/1614] Update .app files --- ct/headers/openziti-controller | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/openziti-controller diff --git a/ct/headers/openziti-controller b/ct/headers/openziti-controller deleted file mode 100644 index ec0709a..0000000 --- a/ct/headers/openziti-controller +++ /dev/null @@ -1,6 +0,0 @@ - _ __ _ __ ____ - ____ ____ ___ ____ ____ (_) /_(_) _________ ____ / /__________ / / /__ _____ - / __ \/ __ \/ _ \/ __ \/_ / / / __/ /_____/ ___/ __ \/ __ \/ __/ ___/ __ \/ / / _ \/ ___/ -/ /_/ / /_/ / __/ / / / / /_/ / /_/ /_____/ /__/ /_/ / / / / /_/ / / /_/ / / / __/ / -\____/ .___/\___/_/ /_/ /___/_/\__/_/ \___/\____/_/ /_/\__/_/ \____/_/_/\___/_/ - /_/ From 46d2eaacc609d982b146ff2c082b7315a960370d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 16:08:13 +0200 Subject: [PATCH 0538/1614] Update docspell-install.sh --- install/docspell-install.sh | 69 +++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 22 deletions(-) diff --git a/install/docspell-install.sh b/install/docspell-install.sh index 6fce0d6..4870c07 100644 --- a/install/docspell-install.sh +++ b/install/docspell-install.sh @@ -12,6 +12,11 @@ setting_up_container network_check update_os +msg_info "Setup Functions" +setup_local_ip_helper +import_local_ip +msg_ok "Setup Functions" + msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ htop \ @@ -68,28 +73,48 @@ mv dsc /usr/bin ln -s /etc/docspell-joex /opt/docspell/docspell-joex && ln -s /etc/docspell-restserver /opt/docspell/docspell-restserver && ln -s /usr/bin/dsc /opt/docspell/dsc curl -fsSL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq chmod +x /usr/bin/yq -JOEX_CONF="/usr/share/docspell-joex/conf/docspell-joex.conf" -SERVER_CONF="/usr/share/docspell-restserver/conf/docspell-server.conf" -sed -i 's|address = "localhost"|address = "0.0.0.0"|' "$JOEX_CONF" "$SERVER_CONF" -sed -i -E '/backend\s*\{/,/\}/ { - /jdbc\s*\{/,/\}/ { - s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|; - s|(user\s*=\s*).*|\1"'"$DB_USER"'"|; - s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|; - } -}' "$SERVER_CONF" -sed -i -E '/postgresql\s*\{/,/\}/ { - /jdbc\s*\{/,/\}/ { - s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|; - s|(user\s*=\s*).*|\1"'"$DB_USER"'"|; - s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|; - } -}' "$SERVER_CONF" -sed -i -E '/jdbc\s*\{/,/\}/ { - s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|; - s|(user\s*=\s*).*|\1"'"$DB_USER"'"|; - s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|; -}' "$JOEX_CONF" +#JOEX_CONF="/usr/share/docspell-joex/conf/docspell-joex.conf" +#SERVER_CONF="/usr/share/docspell-restserver/conf/docspell-server.conf" +sed -i \ + -e '11s|localhost|'"$LOCAL_IP"'|' \ + -e '17s|localhost|'"$LOCAL_IP"'|' \ + -e '49s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \ + -e '52s|user = .*|user = "'"$DB_USER"'"|' \ + -e '55s|password = .*|password = "'"$DB_PASS"'"|' \ + -e '827s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \ + -e '828s|user = .*|user = "'"$DB_USER"'"|' \ + -e '829s|password = .*|password = "'"$DB_PASS"'"|' \ + /usr/share/docspell-joex/conf/docspell-joex.conf + +sed -i \ + -e '16s|http://localhost:7880|http://'"$LOCAL_IP"':7880|' \ + -e '22s|http://localhost:7880|http://'"$LOCAL_IP"':7880|' \ + -e '356s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \ + -e '357s|user = .*|user = "'"$DB_USER"'"|' \ + -e '358s|password = .*|password = "'"$DB_PASS"'"|' \ + -e '401s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \ + /opt/docspell/docspell-server.conf + +# sed -i 's|address = "localhost"|address = "0.0.0.0"|' "$JOEX_CONF" "$SERVER_CONF" +# sed -i -E '/backend\s*\{/,/\}/ { +# /jdbc\s*\{/,/\}/ { +# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|; +# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|; +# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|; +# } +# }' "$SERVER_CONF" +# sed -i -E '/postgresql\s*\{/,/\}/ { +# /jdbc\s*\{/,/\}/ { +# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|; +# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|; +# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|; +# } +# }' "$SERVER_CONF" +# sed -i -E '/jdbc\s*\{/,/\}/ { +# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|; +# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|; +# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|; +# }' "$JOEX_CONF" msg_ok "Setup Docspell" msg_info "Setup Apache Solr" From ee8b6e7f7b519a136f1804de39f30d5312e50e15 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 16:46:41 +0200 Subject: [PATCH 0539/1614] Update docspell-install.sh --- install/docspell-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/docspell-install.sh b/install/docspell-install.sh index 4870c07..b9bb74a 100644 --- a/install/docspell-install.sh +++ b/install/docspell-install.sh @@ -93,7 +93,7 @@ sed -i \ -e '357s|user = .*|user = "'"$DB_USER"'"|' \ -e '358s|password = .*|password = "'"$DB_PASS"'"|' \ -e '401s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \ - /opt/docspell/docspell-server.conf + /usr/share/docspell-restserver/conf/docspell-server.conf # sed -i 's|address = "localhost"|address = "0.0.0.0"|' "$JOEX_CONF" "$SERVER_CONF" # sed -i -E '/backend\s*\{/,/\}/ { From f9f540fc37e36a79d06f4e0c49f0c96b5ab5f3f5 Mon Sep 17 00:00:00 2001 From: elvito Date: Mon, 14 Apr 2025 23:31:34 +0200 Subject: [PATCH 0540/1614] Update ct/umlautadaptarr.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/umlautadaptarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/umlautadaptarr.sh b/ct/umlautadaptarr.sh index 960eb92..be8c566 100644 --- a/ct/umlautadaptarr.sh +++ b/ct/umlautadaptarr.sh @@ -30,7 +30,7 @@ function update_script() { exit fi msg_info "Updating $APP..." - $STD cd /opt/UmlautAdaptarr || exit + cd /opt/UmlautAdaptarr || exit $STD git pull origin master $STD dotnet restore $STD dotnet build --configuration Release From b63c48316e2482d65ee0d607360fa12de1419339 Mon Sep 17 00:00:00 2001 From: elvito Date: Mon, 14 Apr 2025 23:32:11 +0200 Subject: [PATCH 0541/1614] Update ct/umlautadaptarr.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/umlautadaptarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/umlautadaptarr.sh b/ct/umlautadaptarr.sh index be8c566..8eb798d 100644 --- a/ct/umlautadaptarr.sh +++ b/ct/umlautadaptarr.sh @@ -46,4 +46,4 @@ 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}:[PORT]${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5005${CL}" From 345624ca5a4291b84797b26209211a0a9b9eb683 Mon Sep 17 00:00:00 2001 From: elvito Date: Mon, 14 Apr 2025 23:32:20 +0200 Subject: [PATCH 0542/1614] Update frontend/public/json/umlautadaptarr.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- frontend/public/json/umlautadaptarr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/umlautadaptarr.json b/frontend/public/json/umlautadaptarr.json index a96d2f0..b0797ca 100644 --- a/frontend/public/json/umlautadaptarr.json +++ b/frontend/public/json/umlautadaptarr.json @@ -11,7 +11,7 @@ "interface_port": 5005, "documentation": null, "website": "https://github.com/PCJones/UmlautAdaptarr", - "logo": "LINK TO LOGO", + "logo": null, "description": "A tool to work around Sonarr, Radarr, Lidarr and Readarrs problems with foreign languages", "install_methods": [ { From 7d6cac3dee4205041aae7e70227d56c21ee895de Mon Sep 17 00:00:00 2001 From: elvito Date: Mon, 14 Apr 2025 23:37:49 +0200 Subject: [PATCH 0543/1614] Update umlautadaptarr.sh comment removed --- ct/umlautadaptarr.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/umlautadaptarr.sh b/ct/umlautadaptarr.sh index 8eb798d..940d63a 100644 --- a/ct/umlautadaptarr.sh +++ b/ct/umlautadaptarr.sh @@ -24,7 +24,6 @@ function update_script() { check_container_storage check_container_resources - # Check if installation is present | -f for file, -d for folder if [[ ! -f /opt/UmlautAdaptarr/appsettings.json ]]; then msg_error "No ${APP} Installation Found!" exit From cdad6b8d731e040d69e6423b5961f9b0c27562b8 Mon Sep 17 00:00:00 2001 From: elvito Date: Mon, 14 Apr 2025 23:38:44 +0200 Subject: [PATCH 0544/1614] Update install/umlautadaptarr-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/umlautadaptarr-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index 6884d97..f689e80 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -16,8 +16,6 @@ update_os # Installing Dependencies msg_info "Installing Dependencies" -$STD apt update -$STD apt upgrade -y $STD wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb $STD dpkg -i packages-microsoft-prod.deb $STD apt-get update From 4c40a325c745001d4614d895720af873454097d6 Mon Sep 17 00:00:00 2001 From: elvito Date: Mon, 14 Apr 2025 23:39:03 +0200 Subject: [PATCH 0545/1614] Update install/umlautadaptarr-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/umlautadaptarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index f689e80..7bcc6ff 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -30,7 +30,7 @@ $STD apt-get install -y \ # Building & Installing UA msg_info "Building & Installing Umlautadaptarr" $STD git clone https://github.com/PCJones/UmlautAdaptarr.git /opt/ -$STD cd /opt/UmlautAdaptarr +cd /opt/UmlautAdaptarr $STD dotnet restore $STD dotnet build --configuration Release msg_ok "Installation completed" From 6c1695f4bc651592f1bc5405cbf9eeb197b23731 Mon Sep 17 00:00:00 2001 From: elvito Date: Mon, 14 Apr 2025 23:41:27 +0200 Subject: [PATCH 0546/1614] Update umlautadaptarr-install.sh --- install/umlautadaptarr-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index 7bcc6ff..47903a5 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -5,7 +5,6 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/PCJones/UmlautAdaptarr -# Import Functions und Setup source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color verb_ip6 @@ -14,7 +13,6 @@ setting_up_container network_check update_os -# Installing Dependencies msg_info "Installing Dependencies" $STD wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb $STD dpkg -i packages-microsoft-prod.deb From 7556d23409e2ee93cdb8bd9d7b58741696ba6765 Mon Sep 17 00:00:00 2001 From: elvito Date: Mon, 14 Apr 2025 23:44:26 +0200 Subject: [PATCH 0547/1614] Update umlautadaptarr-install.sh comment removed --- install/umlautadaptarr-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index 47903a5..f839243 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -25,7 +25,6 @@ $STD apt-get install -y \ aspnetcore-runtime-8.0 msg_ok "Installed Dependencies" -# Building & Installing UA msg_info "Building & Installing Umlautadaptarr" $STD git clone https://github.com/PCJones/UmlautAdaptarr.git /opt/ cd /opt/UmlautAdaptarr From 055b04b48aaa5089c264370b40112add61261bdc Mon Sep 17 00:00:00 2001 From: elvito Date: Mon, 14 Apr 2025 23:45:27 +0200 Subject: [PATCH 0548/1614] Update install/umlautadaptarr-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/umlautadaptarr-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index f839243..98740f1 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -114,8 +114,7 @@ Environment=ASPNETCORE_ENVIRONMENT=Production WantedBy=multi-user.target EOF $STD systemctl daemon-reload -$STD systemctl enable umlautadaptarr.service -$STD systemctl start umlautadaptarr +systemctl -q --now umlautadaptarr msg_ok "Created systemd Service" motd_ssh From f9b5bee8041bd04a67922c794ca4c432fecd566e Mon Sep 17 00:00:00 2001 From: elvito Date: Mon, 14 Apr 2025 23:48:26 +0200 Subject: [PATCH 0549/1614] Update umlautadaptarr-install.sh --- install/umlautadaptarr-install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index 98740f1..b6a51d6 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -31,7 +31,7 @@ cd /opt/UmlautAdaptarr $STD dotnet restore $STD dotnet build --configuration Release msg_ok "Installation completed" -# Configure appsettings.json + msg_info "Creating appsettings.json" cat </opt/UmlautAdaptarr/appsettings.json { @@ -94,7 +94,6 @@ cat </opt/UmlautAdaptarr/appsettings.json EOF msg_ok "appsettings.json created" -# Set up systemd service for UmlautAdaptarr msg_info "Creating systemd Service" cat </etc/systemd/system/umlautadaptarr.service [Unit] @@ -120,7 +119,6 @@ msg_ok "Created systemd Service" motd_ssh customize -# Cleanup msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean From 510b2cb009aa128e72ab41cbf3fbfdd6f11dad21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 00:20:37 +0000 Subject: [PATCH 0550/1614] Bump golang.org/x/crypto Bumps the go_modules group with 1 update in the /core/api directory: [golang.org/x/crypto](https://github.com/golang/crypto). Updates `golang.org/x/crypto` from 0.32.0 to 0.35.0 - [Commits](https://github.com/golang/crypto/compare/v0.32.0...v0.35.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.35.0 dependency-type: indirect dependency-group: go_modules ... Signed-off-by: dependabot[bot] --- core/api/go.mod | 27 +++++++++------------------ core/api/go.sum | 47 ++++++++++------------------------------------- 2 files changed, 19 insertions(+), 55 deletions(-) diff --git a/core/api/go.mod b/core/api/go.mod index 0297b1a..9a800e2 100644 --- a/core/api/go.mod +++ b/core/api/go.mod @@ -2,31 +2,22 @@ module proxmox-api go 1.23.2 -require go.mongodb.org/mongo-driver v1.17.2 +require ( + github.com/gorilla/mux v1.8.1 + github.com/joho/godotenv v1.5.1 + github.com/rs/cors v1.11.1 + go.mongodb.org/mongo-driver v1.17.2 +) require ( - filippo.io/edwards25519 v1.1.0 // indirect - github.com/go-sql-driver/mysql v1.8.1 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/gorilla/mux v1.8.1 // indirect - github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect - github.com/jackc/pgx/v5 v5.7.2 // indirect - github.com/jackc/puddle/v2 v2.2.2 // indirect - github.com/jinzhu/inflection v1.0.0 // indirect - github.com/jinzhu/now v1.1.5 // indirect - github.com/joho/godotenv v1.5.1 // indirect github.com/klauspost/compress v1.16.7 // indirect github.com/montanaflynn/stats v0.7.1 // indirect - github.com/rs/cors v1.11.1 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect - golang.org/x/crypto v0.32.0 // indirect - golang.org/x/sync v0.10.0 // indirect - golang.org/x/text v0.21.0 // indirect - gorm.io/driver/mysql v1.5.7 // indirect - gorm.io/driver/postgres v1.5.11 // indirect - gorm.io/gorm v1.25.12 // indirect + golang.org/x/crypto v0.35.0 // indirect + golang.org/x/sync v0.11.0 // indirect + golang.org/x/text v0.22.0 // indirect ) diff --git a/core/api/go.sum b/core/api/go.sum index ea649ff..f0a92be 100644 --- a/core/api/go.sum +++ b/core/api/go.sum @@ -1,37 +1,19 @@ -filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= -filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= -github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= -github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= -github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= -github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.7.2 h1:mLoDLV6sonKlvjIEsV56SkWNCnuNv531l94GaIzO+XI= -github.com/jackc/pgx/v5 v5.7.2/go.mod h1:ncY89UGWxg82EykZUwSpUKEfccBGGYq1xjrOpsbsfGQ= -github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= -github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= -github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= -github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= -github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -45,16 +27,16 @@ go.mongodb.org/mongo-driver v1.17.2 h1:gvZyk8352qSfzyZ2UMWcpDpMSGEr1eqE4T793Sqyh go.mongodb.org/mongo-driver v1.17.2/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -66,18 +48,9 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/driver/mysql v1.5.7 h1:MndhOPYOfEp2rHKgkZIhJ16eVUIRf2HmzgoPmh7FCWo= -gorm.io/driver/mysql v1.5.7/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM= -gorm.io/driver/postgres v1.5.11 h1:ubBVAfbKEUld/twyKZ0IYn9rSQh448EdelLYk9Mv314= -gorm.io/driver/postgres v1.5.11/go.mod h1:DX3GReXH+3FPWGrrgffdvCk3DQ1dwDPdmbenSkweRGI= -gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= -gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8= -gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= From 5f186364a066ebdc5e62c9c3ab9965d1c6f9040b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 15 Apr 2025 09:09:16 +0200 Subject: [PATCH 0551/1614] Update musicassistant-install.sh --- install/musicassistant-install.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh index b80739e..66bad57 100644 --- a/install/musicassistant-install.sh +++ b/install/musicassistant-install.sh @@ -14,22 +14,22 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - ffmpeg \ - build-essential \ - libffi-dev \ - libssl-dev \ - libjpeg-dev \ - zlib1g-dev \ - pkg-config + ffmpeg \ + build-essential \ + libffi-dev \ + libssl-dev \ + libjpeg-dev \ + zlib1g-dev \ + pkg-config msg_ok "Installed Dependencies" msg_info "Setup Python3" $STD apt-get install -y \ - python3 \ - python3-dev \ - python3-pip \ - python3-setuptools \ - python3-venv + python3 \ + python3-dev \ + python3-pip \ + python3-setuptools \ + python3-venv rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Setup Python3" @@ -38,6 +38,7 @@ $STD fetch_and_deploy_gh_release music-assistant/server cd /opt/musicassistant $STD python3 -m venv .venv $STD source .venv/bin/activate +$STD pip install uv $STD pip install --upgrade pip uv $STD uv pip install . msg_ok "Setup Music Assistant" From 880fb736504235db1aad504f5213a6dc361f8574 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 15 Apr 2025 10:51:23 +0200 Subject: [PATCH 0552/1614] Update musicassistant-install.sh --- install/musicassistant-install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh index 66bad57..184c0fd 100644 --- a/install/musicassistant-install.sh +++ b/install/musicassistant-install.sh @@ -17,9 +17,11 @@ $STD apt-get install -y \ ffmpeg \ build-essential \ libffi-dev \ + git \ libssl-dev \ libjpeg-dev \ zlib1g-dev \ + snapserver \ pkg-config msg_ok "Installed Dependencies" @@ -38,11 +40,20 @@ $STD fetch_and_deploy_gh_release music-assistant/server cd /opt/musicassistant $STD python3 -m venv .venv $STD source .venv/bin/activate -$STD pip install uv +$STD pip3 install uv $STD pip install --upgrade pip uv $STD uv pip install . msg_ok "Setup Music Assistant" +msg_info "Adding AirPlay Support" +cd /usr/local/src +git clone https://github.com/music-assistant/libraop.git +cd libraop +#mkdir build && cd build +#cmake .. +#make -j$(nproc) +msg_ok "Added AirPlay Support" + msg_info "Creating systemd service" cat </etc/systemd/system/musicassistant.service [Unit] From b1b2fc93dc0500cdbec8bf9d29adcb480eb146db Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 15 Apr 2025 10:52:24 +0200 Subject: [PATCH 0553/1614] add airplay support --- install/musicassistant-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh index 184c0fd..5e8d72f 100644 --- a/install/musicassistant-install.sh +++ b/install/musicassistant-install.sh @@ -17,6 +17,7 @@ $STD apt-get install -y \ ffmpeg \ build-essential \ libffi-dev \ + cmake \ git \ libssl-dev \ libjpeg-dev \ @@ -49,9 +50,8 @@ msg_info "Adding AirPlay Support" cd /usr/local/src git clone https://github.com/music-assistant/libraop.git cd libraop -#mkdir build && cd build -#cmake .. -#make -j$(nproc) +git submodule update --init +./build.sh msg_ok "Added AirPlay Support" msg_info "Creating systemd service" From d24b15281feaa933322344114b0d1d16b96b35cc Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 15 Apr 2025 11:17:42 +0200 Subject: [PATCH 0554/1614] Update musicassistant-install.sh --- install/musicassistant-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh index 5e8d72f..1862378 100644 --- a/install/musicassistant-install.sh +++ b/install/musicassistant-install.sh @@ -39,10 +39,10 @@ msg_ok "Setup Python3" msg_info "Setup Music Assistant" $STD fetch_and_deploy_gh_release music-assistant/server cd /opt/musicassistant -$STD python3 -m venv .venv -$STD source .venv/bin/activate $STD pip3 install uv $STD pip install --upgrade pip uv +$STD python3 -m venv .venv +$STD source .venv/bin/activate $STD uv pip install . msg_ok "Setup Music Assistant" From b5d4a47a71866acbc7abe5ae5855e1ab3c632025 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Tue, 15 Apr 2025 12:37:04 +0000 Subject: [PATCH 0555/1614] Update versions.json --- frontend/public/json/versions.json | 402 ++++++++++++++--------------- 1 file changed, 201 insertions(+), 201 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index eff2049..be6c9de 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,19 +1,214 @@ [ - { - "name": "evcc-io/evcc", - "version": "0.203.0", - "date": "2025-04-13T11:49:39Z" - }, { "name": "fhem/fhem-mirror", "version": "6.2", - "date": "2025-04-13T10:32:39Z" + "date": "2025-04-15T10:34:54Z" + }, + { + "name": "n8n-io/n8n", + "version": "n8n@1.86.1", + "date": "2025-04-09T09:20:55Z" + }, + { + "name": "wazuh/wazuh", + "version": "coverity-w16-4.12.0", + "date": "2025-04-15T08:25:08Z" + }, + { + "name": "mattermost/mattermost", + "version": "v10.6.2", + "date": "2025-04-15T08:14:23Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1778", + "date": "2025-04-15T06:26:21Z" + }, + { + "name": "slskd/slskd", + "version": "0.22.5", + "date": "2025-04-15T02:52:26Z" + }, + { + "name": "blakeblackshear/frigate", + "version": "v0.14.1", + "date": "2024-08-29T22:32:51Z" + }, + { + "name": "esphome/esphome", + "version": "2025.3.3", + "date": "2025-03-31T22:07:05Z" + }, + { + "name": "moghtech/komodo", + "version": "v1.17.1", + "date": "2025-04-14T22:35:13Z" + }, + { + "name": "influxdata/influxdb", + "version": "v3.0.0", + "date": "2025-04-14T22:16:28Z" + }, + { + "name": "Kareadita/Kavita", + "version": "v0.8.6", + "date": "2025-04-14T22:09:30Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.2.0", + "date": "2025-04-11T12:48:27Z" + }, + { + "name": "paperless-ngx/paperless-ngx", + "version": "v2.15.2", + "date": "2025-04-14T20:48:52Z" + }, + { + "name": "semaphoreui/semaphore", + "version": "v2.13.13", + "date": "2025-04-11T10:15:13Z" + }, + { + "name": "netbox-community/netbox", + "version": "v4.2.7", + "date": "2025-04-10T20:08:13Z" + }, + { + "name": "duplicati/duplicati", + "version": "v2.1.0.115-2.1.0.115_canary_2025-04-14", + "date": "2025-04-14T18:03:36Z" + }, + { + "name": "OliveTin/OliveTin", + "version": "2025.4.14", + "date": "2025-04-14T16:53:53Z" + }, + { + "name": "msgbyte/tianji", + "version": "v1.20.0", + "date": "2025-04-14T16:19:23Z" + }, + { + "name": "home-assistant/operating-system", + "version": "15.2", + "date": "2025-04-14T15:37:12Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.4.0b5-rc1", + "date": "2025-04-14T15:29:21Z" + }, + { + "name": "stackblitz-labs/bolt.diy", + "version": "v0.0.7-hf1", + "date": "2025-03-10T20:49:39Z" + }, + { + "name": "zabbix/zabbix", + "version": "7.2.6rc1", + "date": "2025-04-14T15:00:15Z" + }, + { + "name": "rabbitmq/rabbitmq-server", + "version": "v4.0.9", + "date": "2025-04-14T14:40:34Z" + }, + { + "name": "AdguardTeam/AdGuardHome", + "version": "v0.107.60", + "date": "2025-04-14T11:46:19Z" + }, + { + "name": "Graylog2/graylog2-server", + "version": "6.2.0-rc.1", + "date": "2025-04-14T11:26:18Z" + }, + { + "name": "bluenviron/mediamtx", + "version": "v1.12.0", + "date": "2025-04-14T10:36:04Z" + }, + { + "name": "Stirling-Tools/Stirling-PDF", + "version": "v0.45.5", + "date": "2025-04-14T09:57:39Z" + }, + { + "name": "open-webui/open-webui", + "version": "v0.6.5", + "date": "2025-04-14T09:13:36Z" + }, + { + "name": "zwave-js/zwave-js-ui", + "version": "v10.2.0", + "date": "2025-04-14T08:53:44Z" + }, + { + "name": "evcc-io/evcc", + "version": "0.203.1", + "date": "2025-04-14T07:23:02Z" + }, + { + "name": "morpheus65535/bazarr", + "version": "v1.5.1", + "date": "2025-01-01T16:15:52Z" + }, + { + "name": "firefly-iii/firefly-iii", + "version": "v6.2.10", + "date": "2025-03-22T13:02:26Z" + }, + { + "name": "glanceapp/glance", + "version": "v0.7.12", + "date": "2025-04-14T00:16:15Z" + }, + { + "name": "ellite/Wallos", + "version": "v2.49.1", + "date": "2025-04-13T22:36:24Z" + }, + { + "name": "rogerfar/rdt-client", + "version": "v2.0.108", + "date": "2025-04-13T22:17:55Z" + }, + { + "name": "autobrr/autobrr", + "version": "v1.61.0", + "date": "2025-04-13T21:14:40Z" + }, + { + "name": "Ombi-app/Ombi", + "version": "v4.47.1", + "date": "2025-01-05T21:14:23Z" + }, + { + "name": "pocket-id/pocket-id", + "version": "v0.46.0", + "date": "2025-04-13T18:31:13Z" + }, + { + "name": "runtipi/runtipi", + "version": "v3.10.0", + "date": "2025-03-15T14:38:16Z" + }, + { + "name": "karakeep-app/karakeep", + "version": "mcp/v0.23.4", + "date": "2025-04-13T14:09:19Z" }, { "name": "syncthing/syncthing", "version": "v2.0.0-beta.9", "date": "2025-04-12T13:58:29Z" }, + { + "name": "qbittorrent/qBittorrent", + "version": "release-5.0.5", + "date": "2025-04-13T07:55:55Z" + }, { "name": "Lidarr/Lidarr", "version": "v2.10.3.4602", @@ -34,26 +229,6 @@ "version": "v5.21.1.9799", "date": "2025-03-24T15:52:12Z" }, - { - "name": "morpheus65535/bazarr", - "version": "v1.5.1", - "date": "2025-01-01T16:15:52Z" - }, - { - "name": "open-webui/open-webui", - "version": "v0.6.4", - "date": "2025-04-13T06:01:32Z" - }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1773", - "date": "2025-04-13T05:56:23Z" - }, - { - "name": "slskd/slskd", - "version": "0.22.4", - "date": "2025-04-13T00:14:13Z" - }, { "name": "Tautulli/Tautulli", "version": "v2.15.2", @@ -64,26 +239,11 @@ "version": "v0.2.11", "date": "2025-04-12T21:13:08Z" }, - { - "name": "semaphoreui/semaphore", - "version": "v2.14.0-beta1", - "date": "2025-04-12T20:14:09Z" - }, - { - "name": "karakeep-app/karakeep", - "version": "sdk/v0.23.2", - "date": "2025-04-12T18:37:40Z" - }, { "name": "MediaBrowser/Emby.Releases", "version": "4.8.11.0", "date": "2025-03-10T06:39:11Z" }, - { - "name": "rogerfar/rdt-client", - "version": "v2.0.104", - "date": "2025-04-12T14:24:39Z" - }, { "name": "home-assistant/core", "version": "2025.4.2", @@ -94,11 +254,6 @@ "version": "0.18.0", "date": "2025-04-12T08:55:32Z" }, - { - "name": "runtipi/runtipi", - "version": "v3.10.0", - "date": "2025-03-15T14:38:16Z" - }, { "name": "Bubka/2FAuth", "version": "v5.5.2", @@ -109,16 +264,6 @@ "version": "v1.16.0", "date": "2025-04-11T19:15:24Z" }, - { - "name": "rabbitmq/rabbitmq-server", - "version": "v4.0.8", - "date": "2025-04-03T05:11:15Z" - }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.10", - "date": "2025-03-22T13:02:26Z" - }, { "name": "tailscale/tailscale", "version": "v1.82.4", @@ -129,16 +274,6 @@ "version": "v4.99.2", "date": "2025-04-11T17:57:47Z" }, - { - "name": "keycloak/keycloak", - "version": "26.2.0", - "date": "2025-04-11T12:48:27Z" - }, - { - "name": "duplicati/duplicati", - "version": "v2.1.0.113-2.1.0.113_canary_2025-04-11", - "date": "2025-04-11T16:57:07Z" - }, { "name": "TriliumNext/Notes", "version": "v0.0.0", @@ -169,16 +304,6 @@ "version": "4.5.1", "date": "2025-04-11T09:57:47Z" }, - { - "name": "Stirling-Tools/Stirling-PDF", - "version": "v0.45.4", - "date": "2025-04-11T08:45:04Z" - }, - { - "name": "home-assistant/operating-system", - "version": "15.1", - "date": "2025-03-31T13:42:20Z" - }, { "name": "outline/outline", "version": "v0.83.0", @@ -194,11 +319,6 @@ "version": "2.2.8", "date": "2025-04-10T20:30:49Z" }, - { - "name": "netbox-community/netbox", - "version": "v4.2.7", - "date": "2025-04-10T20:08:13Z" - }, { "name": "gristlabs/grist-core", "version": "v1.5.1", @@ -229,26 +349,11 @@ "version": "v2.35.0", "date": "2025-04-10T13:45:22Z" }, - { - "name": "n8n-io/n8n", - "version": "n8n@1.86.1", - "date": "2025-04-09T09:20:55Z" - }, - { - "name": "glanceapp/glance", - "version": "v0.7.10", - "date": "2025-04-09T23:51:06Z" - }, { "name": "mongodb/mongo", "version": "r8.0.5-rc2", "date": "2025-04-09T22:37:52Z" }, - { - "name": "paperless-ngx/paperless-ngx", - "version": "v2.15.1", - "date": "2025-04-09T22:26:39Z" - }, { "name": "jupyter/notebook", "version": "v7.4.0", @@ -279,16 +384,6 @@ "version": "debian/12.0.14", "date": "2025-04-09T10:09:00Z" }, - { - "name": "esphome/esphome", - "version": "2025.3.3", - "date": "2025-03-31T22:07:05Z" - }, - { - "name": "OliveTin/OliveTin", - "version": "2025.4.8", - "date": "2025-04-08T22:02:50Z" - }, { "name": "minio/minio", "version": "RELEASE.2025-04-08T15-41-24Z", @@ -299,21 +394,11 @@ "version": "version/2025.2.4", "date": "2025-04-08T18:39:57Z" }, - { - "name": "influxdata/influxdb", - "version": "v1.12.0rc1", - "date": "2025-04-08T17:35:21Z" - }, { "name": "jenkinsci/jenkins", "version": "jenkins-2.505", "date": "2025-04-08T15:46:42Z" }, - { - "name": "AdguardTeam/AdGuardHome", - "version": "v0.107.59", - "date": "2025-03-21T11:11:39Z" - }, { "name": "element-hq/synapse", "version": "v1.128.0", @@ -349,56 +434,26 @@ "version": "v1.23.7", "date": "2025-04-07T19:27:52Z" }, - { - "name": "Checkmk/checkmk", - "version": "v2.4.0b4", - "date": "2025-04-07T19:14:53Z" - }, - { - "name": "wazuh/wazuh", - "version": "coverity-w15-4.12.0", - "date": "2025-04-07T17:50:14Z" - }, { "name": "thomiceli/opengist", "version": "v1.10.0", "date": "2025-04-07T14:32:15Z" }, - { - "name": "Graylog2/graylog2-server", - "version": "6.2.0-beta.4", - "date": "2025-04-07T11:28:13Z" - }, { "name": "fallenbagel/jellyseerr", "version": "preview-back-to-axios", "date": "2025-04-07T09:23:08Z" }, - { - "name": "zwave-js/zwave-js-ui", - "version": "v10.1.5", - "date": "2025-04-07T09:19:35Z" - }, { "name": "redis/redis", "version": "8.0-rc1-int2", "date": "2025-04-02T19:05:08Z" }, - { - "name": "zabbix/zabbix", - "version": "7.4.0beta1", - "date": "2025-04-07T08:14:13Z" - }, { "name": "nzbgetcom/nzbget", "version": "v24.8", "date": "2025-03-18T07:33:51Z" }, - { - "name": "mattermost/mattermost", - "version": "server/public/v0.1.11", - "date": "2025-03-28T14:04:31Z" - }, { "name": "Dolibarr/dolibarr", "version": "21.0.1", @@ -419,64 +474,9 @@ "version": "1.5.34", "date": "2025-03-27T16:17:38Z" }, - { - "name": "stackblitz-labs/bolt.diy", - "version": "v0.0.7-hf1", - "date": "2025-03-10T20:49:39Z" - }, - { - "name": "msgbyte/tianji", - "version": "v1.19.7", - "date": "2025-04-06T14:22:44Z" - }, - { - "name": "TechnitiumSoftware/DnsServer", - "version": "v13.5.0", - "date": "2025-04-06T11:24:50Z" - }, - { - "name": "kimai/kimai", - "version": "2.32.0", - "date": "2025-04-06T09:43:51Z" - }, - { - "name": "inventree/InvenTree", - "version": "0.17.10", - "date": "2025-04-06T05:31:49Z" - }, { "name": "ollama/ollama", "version": "v0.6.5", "date": "2025-04-06T00:15:39Z" - }, - { - "name": "jellyfin/jellyfin", - "version": "v10.10.7", - "date": "2025-04-05T19:14:59Z" - }, - { - "name": "azukaar/Cosmos-Server", - "version": "v0.18.4", - "date": "2025-04-05T19:12:57Z" - }, - { - "name": "wger-project/wger", - "version": "2.3", - "date": "2025-04-05T18:05:36Z" - }, - { - "name": "bastienwirtz/homer", - "version": "v25.04.1", - "date": "2025-04-05T12:39:18Z" - }, - { - "name": "navidrome/navidrome", - "version": "v0.55.2", - "date": "2025-04-05T12:07:32Z" - }, - { - "name": "MagicMirrorOrg/MagicMirror", - "version": "v2.31.0", - "date": "2025-04-01T18:12:45Z" } ] From 150522061f9d91b460abf18d00aa799fcc273538 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 15 Apr 2025 16:14:05 +0200 Subject: [PATCH 0556/1614] Update tools.func --- misc/tools.func | 91 ++++++++++++++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 36 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 8b1911c..5669daa 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -651,21 +651,42 @@ fetch_and_deploy_gh_release() { setup_local_ip_helper() { local BASE_DIR="/usr/local/community-scripts/ip-management" local SCRIPT_PATH="$BASE_DIR/update_local_ip.sh" - local SERVICE_PATH="/etc/systemd/system/update-local-ip.service" - local TIMER_PATH="/etc/systemd/system/update-local-ip.timer" + local IP_FILE="/run/local-ip.env" + local DISPATCHER_SCRIPT="/etc/networkd-dispatcher/routable.d/10-update-local-ip.sh" mkdir -p "$BASE_DIR" - # Create update script + # Install networkd-dispatcher if not present + if ! dpkg -s networkd-dispatcher >/dev/null 2>&1; then + apt-get update -qq + apt-get install -yq networkd-dispatcher + fi + + # Write update_local_ip.sh cat <<'EOF' >"$SCRIPT_PATH" #!/bin/bash -set -e +set -euo pipefail IP_FILE="/run/local-ip.env" mkdir -p "$(dirname "$IP_FILE")" get_current_ip() { - ip route get 1 | awk '{print $7; exit}' 2>/dev/null + local targets=("8.8.8.8" "1.1.1.1" "192.168.1.1" "10.0.0.1" "172.16.0.1" "default") + local ip + + for target in "${targets[@]}"; do + if [[ "$target" == "default" ]]; then + ip=$(ip route get 1 2>/dev/null | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}') + else + ip=$(ip route get "$target" 2>/dev/null | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}') + fi + if [[ -n "$ip" ]]; then + echo "$ip" + return 0 + fi + done + + return 1 } current_ip="$(get_current_ip)" @@ -677,9 +698,7 @@ fi if [[ -f "$IP_FILE" ]]; then source "$IP_FILE" - if [[ "$LOCAL_IP" == "$current_ip" ]]; then - exit 0 - fi + [[ "$LOCAL_IP" == "$current_ip" ]] && exit 0 fi echo "LOCAL_IP=$current_ip" > "$IP_FILE" @@ -688,36 +707,17 @@ EOF chmod +x "$SCRIPT_PATH" - # Create systemd service - cat <"$SERVICE_PATH" -[Unit] -Description=Update LOCAL_IP file -After=network-online.target - -[Service] -Type=oneshot -ExecStart=$SCRIPT_PATH + # Install dispatcher hook + mkdir -p "$(dirname "$DISPATCHER_SCRIPT")" + cat <"$DISPATCHER_SCRIPT" +#!/bin/bash +$SCRIPT_PATH EOF - # Create systemd timer - cat <"$TIMER_PATH" -[Unit] -Description=Periodic LOCAL_IP update + chmod +x "$DISPATCHER_SCRIPT" + systemctl enable --now networkd-dispatcher.service -[Timer] -OnBootSec=15 -OnUnitActiveSec=60 -Persistent=true - -[Install] -WantedBy=timers.target -EOF - - systemctl daemon-reexec - systemctl daemon-reload - systemctl enable -q --now update-local-ip.timer - - $STD msg_ok "Setup LOCAL_IP helper in $BASE_DIR with systemd integration" + $STD msg_ok "LOCAL_IP helper installed using networkd-dispatcher" } import_local_ip() { @@ -728,7 +728,26 @@ import_local_ip() { fi if [[ -z "${LOCAL_IP:-}" ]]; then - LOCAL_IP="$(ip route get 1 | awk '{print $7; exit}' 2>/dev/null)" + get_current_ip() { + local targets=("8.8.8.8" "1.1.1.1" "192.168.1.1" "10.0.0.1" "172.16.0.1" "default") + local ip + + for target in "${targets[@]}"; do + if [[ "$target" == "default" ]]; then + ip=$(ip route get 1 2>/dev/null | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}') + else + ip=$(ip route get "$target" 2>/dev/null | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}') + fi + if [[ -n "$ip" ]]; then + echo "$ip" + return 0 + fi + done + + return 1 + } + + LOCAL_IP="$(get_current_ip || true)" if [[ -z "$LOCAL_IP" ]]; then msg_error "Could not determine LOCAL_IP" return 1 From 64c4834702f349044be1da6b09ecd7bf0d729caf Mon Sep 17 00:00:00 2001 From: elvito Date: Tue, 15 Apr 2025 18:10:14 +0200 Subject: [PATCH 0557/1614] Update install/umlautadaptarr-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/umlautadaptarr-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index b6a51d6..876277a 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -20,7 +20,6 @@ $STD apt-get update $STD apt-get install -y \ curl \ unzip \ - git \ dotnet-sdk-8.0 \ aspnetcore-runtime-8.0 msg_ok "Installed Dependencies" From 240331d118a04d82b0149c4d07f7fb9490b34550 Mon Sep 17 00:00:00 2001 From: elvito Date: Tue, 15 Apr 2025 18:15:08 +0200 Subject: [PATCH 0558/1614] Update umlautadaptarr-install.sh curl must be available before MS packages are added --- install/umlautadaptarr-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index 876277a..82c2a15 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -14,11 +14,12 @@ network_check update_os msg_info "Installing Dependencies" -$STD wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +$STD apt-get update +$STD apt-get install -y curl +$STD curl -fsSL https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -o packages-microsoft-prod.deb $STD dpkg -i packages-microsoft-prod.deb $STD apt-get update $STD apt-get install -y \ - curl \ unzip \ dotnet-sdk-8.0 \ aspnetcore-runtime-8.0 From 34a2f0e951214f2acbf3dd2a2a37b681ac5996e5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 15 Apr 2025 22:07:41 +0200 Subject: [PATCH 0559/1614] Delete ct/musicassistant.sh --- ct/musicassistant.sh | 59 -------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 ct/musicassistant.sh diff --git a/ct/musicassistant.sh b/ct/musicassistant.sh deleted file mode 100644 index f359a21..0000000 --- a/ct/musicassistant.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/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/music-assistant/server - -APP="MusicAssistant" -var_tags="${var_tags:-music}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-1024}" -var_disk="${var_disk:-4}" -var_os="${var_os:-ubuntu}" -var_version="${var_version:-24.10}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - - if [[ ! -d /opt/musicassistant ]]; then - msg_error "No existing installation found!" - exit 1 - fi - - msg_info "Stopping Music Assistant service" - systemctl stop musicassistant - msg_ok "Service stopped" - - msg_info "Updating Music Assistant files" - cd /opt/musicassistant || exit 1 - $STD fetch_and_deploy_gh_release music-assistant/server - msg_ok "Music Assistant files updated" - - msg_info "Updating Python virtual environment" - source .venv/bin/activate || exit 1 - pip install --upgrade pip uv - uv pip install . - msg_ok "Python environment updated" - - msg_info "Restarting Music Assistant service" - systemctl restart musicassistant - msg_ok "Service restarted" -} - -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}:8095${CL}" From a6474da509aa3137012fc098b21d55f170f0a62a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 15 Apr 2025 22:07:50 +0200 Subject: [PATCH 0560/1614] Delete install/musicassistant-install.sh --- install/musicassistant-install.sh | 83 ------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 install/musicassistant-install.sh diff --git a/install/musicassistant-install.sh b/install/musicassistant-install.sh deleted file mode 100644 index 1862378..0000000 --- a/install/musicassistant-install.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# License: MIT -# Source: https://github.com/music-assistant/server - -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 \ - ffmpeg \ - build-essential \ - libffi-dev \ - cmake \ - git \ - libssl-dev \ - libjpeg-dev \ - zlib1g-dev \ - snapserver \ - pkg-config -msg_ok "Installed Dependencies" - -msg_info "Setup Python3" -$STD apt-get install -y \ - python3 \ - python3-dev \ - python3-pip \ - python3-setuptools \ - python3-venv -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -msg_ok "Setup Python3" - -msg_info "Setup Music Assistant" -$STD fetch_and_deploy_gh_release music-assistant/server -cd /opt/musicassistant -$STD pip3 install uv -$STD pip install --upgrade pip uv -$STD python3 -m venv .venv -$STD source .venv/bin/activate -$STD uv pip install . -msg_ok "Setup Music Assistant" - -msg_info "Adding AirPlay Support" -cd /usr/local/src -git clone https://github.com/music-assistant/libraop.git -cd libraop -git submodule update --init -./build.sh -msg_ok "Added AirPlay Support" - -msg_info "Creating systemd service" -cat </etc/systemd/system/musicassistant.service -[Unit] -Description=Music Assistant -After=network-online.target - -[Service] -Type=simple -User=root -WorkingDirectory=/opt/musicassistant -ExecStart=/opt/musicassistant/.venv/bin/mass -Restart=always -RestartForceExitStatus=100 - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now musicassistant -msg_ok "Started Music Assistant" - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" From 2f606c7ae4109c145b86fa543dc8347d7f509500 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 15 Apr 2025 22:07:57 +0200 Subject: [PATCH 0561/1614] Delete frontend/public/json/musicassistant.json --- frontend/public/json/musicassistant.json | 34 ------------------------ 1 file changed, 34 deletions(-) delete mode 100644 frontend/public/json/musicassistant.json diff --git a/frontend/public/json/musicassistant.json b/frontend/public/json/musicassistant.json deleted file mode 100644 index f19f448..0000000 --- a/frontend/public/json/musicassistant.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "MusicAssistant", - "slug": "musicassistant", - "categories": [ - 13 - ], - "date_created": "2025-04-07", - "type": "ct", - "updateable": false, - "privileged": false, - "interface_port": 8095, - "documentation": "https://www.music-assistant.io/", - "website": "https://github.com/music-assistant/server", - "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/music-assistant.svg", - "description": "Music Assistant is a free, opensource Media library manager that connects to your streaming services and a wide range of connected speakers. The server is the beating heart, the core of Music Assistant and must run on an always-on device like a Raspberry Pi, a NAS or an Intel NUC or alike.", - "install_methods": [ - { - "type": "default", - "script": "ct/musicassistant.sh", - "resources": { - "cpu": 1, - "ram": 1024, - "hdd": 4, - "os": "Ubuntu", - "version": "24.10" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [] -} From ddcdd21ef00d847b45605bb5721760336908f760 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 15 Apr 2025 20:08:03 +0000 Subject: [PATCH 0562/1614] Update .app files --- ct/headers/musicassistant | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/musicassistant diff --git a/ct/headers/musicassistant b/ct/headers/musicassistant deleted file mode 100644 index afdf3a5..0000000 --- a/ct/headers/musicassistant +++ /dev/null @@ -1,6 +0,0 @@ - __ ___ _ ___ _ __ __ - / |/ /_ _______(_)____/ | __________(_)____/ /_____ _____ / /_ - / /|_/ / / / / ___/ / ___/ /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ - / / / / /_/ (__ ) / /__/ ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ -/_/ /_/\__,_/____/_/\___/_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ - From 4d0316f00fb09495e29d69922dc8a027c477cb36 Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 15:49:35 +0200 Subject: [PATCH 0563/1614] Update umlautadaptarr-install.sh --- install/umlautadaptarr-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index 82c2a15..c2684fe 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -101,7 +101,6 @@ Description=UmlautAdaptarr Service After=network.target [Service] -Type=Core WorkingDirectory=/opt/UmlautAdaptarr ExecStart=/usr/bin/dotnet /opt/UmlautAdaptarr/bin/Release/net8.0/UmlautAdaptarr.dll --urls=http://0.0.0.0:5005 Restart=always From 482fec9e95bdf213b2419935145c2a60b43d4b8f Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 16:36:43 +0200 Subject: [PATCH 0564/1614] Update umlautadaptarr-install.sh changed installing process --- install/umlautadaptarr-install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index c2684fe..3f766c1 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -25,11 +25,12 @@ $STD apt-get install -y \ aspnetcore-runtime-8.0 msg_ok "Installed Dependencies" -msg_info "Building & Installing Umlautadaptarr" -$STD git clone https://github.com/PCJones/UmlautAdaptarr.git /opt/ -cd /opt/UmlautAdaptarr -$STD dotnet restore -$STD dotnet build --configuration Release +msg_info "Installing Umlautadaptarr" +temp_file=$(mktemp) +trap 'rm -f "$temp_file"' EXIT +RELEASE=$(curl -s https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') +curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file +$STD unzip -j $temp_file '*/**' -d /opt/UmlautAdaptarr msg_ok "Installation completed" msg_info "Creating appsettings.json" @@ -112,7 +113,7 @@ Environment=ASPNETCORE_ENVIRONMENT=Production WantedBy=multi-user.target EOF $STD systemctl daemon-reload -systemctl -q --now umlautadaptarr +systemctl -q --now enable umlautadaptarr msg_ok "Created systemd Service" motd_ssh From bbdc62bbd4a37d9ac2ea700147956f17d67b0cbd Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 16:39:14 +0200 Subject: [PATCH 0565/1614] Update umlautadaptarr.sh --- ct/umlautadaptarr.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ct/umlautadaptarr.sh b/ct/umlautadaptarr.sh index 940d63a..b9c5cbf 100644 --- a/ct/umlautadaptarr.sh +++ b/ct/umlautadaptarr.sh @@ -29,11 +29,13 @@ function update_script() { exit fi msg_info "Updating $APP..." - cd /opt/UmlautAdaptarr || exit - $STD git pull origin master - $STD dotnet restore - $STD dotnet build --configuration Release - $STD systemctl restart umlautadaptarr + $STD systemctl stop umlautadaptarr + temp_file=$(mktemp) + trap 'rm -f "$temp_file"' EXIT + RELEASE=$(curl -s https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') + curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file + $STD unzip -u $temp_file '*/**' -d /opt/UmlautAdaptarr + $STD systemctl start umlautadaptarr msg_ok "$APP has been updated." exit } From 71bfbde6e1a71e613bc8cf4cbff44e01b9bd7902 Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 19:59:29 +0200 Subject: [PATCH 0566/1614] Delete ct/headers/umlautadaptarr --- ct/headers/umlautadaptarr | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 ct/headers/umlautadaptarr diff --git a/ct/headers/umlautadaptarr b/ct/headers/umlautadaptarr deleted file mode 100644 index e382cef..0000000 --- a/ct/headers/umlautadaptarr +++ /dev/null @@ -1,5 +0,0 @@ - _ _ _ _ _ _ _ - | | | |_ __ | |__ _ _ _| |_ /_\ __| |__ _ _ __| |_ __ _ _ _ _ _ - | |_| | ' \| / _` | || | _|/ _ \/ _` / _` | '_ \ _/ _` | '_| '_| - \___/|_|_|_|_\__,_|\_,_|\__/_/ \_\__,_\__,_| .__/\__\__,_|_| |_| - |_| From 1d5bba3a24ccb480187fc53c1b7bc3a94e9a5964 Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 20:04:33 +0200 Subject: [PATCH 0567/1614] Update umlautadaptarr-install.sh --- install/umlautadaptarr-install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index 3f766c1..3e93b96 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -14,13 +14,10 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get update -$STD apt-get install -y curl $STD curl -fsSL https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -o packages-microsoft-prod.deb $STD dpkg -i packages-microsoft-prod.deb $STD apt-get update $STD apt-get install -y \ - unzip \ dotnet-sdk-8.0 \ aspnetcore-runtime-8.0 msg_ok "Installed Dependencies" @@ -30,7 +27,7 @@ temp_file=$(mktemp) trap 'rm -f "$temp_file"' EXIT RELEASE=$(curl -s https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file -$STD unzip -j $temp_file '*/**' -d /opt/UmlautAdaptarr +unzip -qj $temp_file '*/**' -d /opt/UmlautAdaptarr msg_ok "Installation completed" msg_info "Creating appsettings.json" @@ -112,7 +109,6 @@ Environment=ASPNETCORE_ENVIRONMENT=Production [Install] WantedBy=multi-user.target EOF -$STD systemctl daemon-reload systemctl -q --now enable umlautadaptarr msg_ok "Created systemd Service" From ef93c7aaaade6f8a32715f3b4500fae4d82c62b4 Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 20:14:52 +0200 Subject: [PATCH 0568/1614] Update umlautadaptarr.sh --- ct/umlautadaptarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/umlautadaptarr.sh b/ct/umlautadaptarr.sh index b9c5cbf..dada776 100644 --- a/ct/umlautadaptarr.sh +++ b/ct/umlautadaptarr.sh @@ -35,7 +35,7 @@ function update_script() { RELEASE=$(curl -s https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file $STD unzip -u $temp_file '*/**' -d /opt/UmlautAdaptarr - $STD systemctl start umlautadaptarr + systemctl start umlautadaptarr msg_ok "$APP has been updated." exit } From d42258b57eb2796969ec90c8464a960ea4496a1a Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 20:15:18 +0200 Subject: [PATCH 0569/1614] Update umlautadaptarr.sh --- ct/umlautadaptarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/umlautadaptarr.sh b/ct/umlautadaptarr.sh index dada776..e23bba9 100644 --- a/ct/umlautadaptarr.sh +++ b/ct/umlautadaptarr.sh @@ -29,7 +29,7 @@ function update_script() { exit fi msg_info "Updating $APP..." - $STD systemctl stop umlautadaptarr + systemctl stop umlautadaptarr temp_file=$(mktemp) trap 'rm -f "$temp_file"' EXIT RELEASE=$(curl -s https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') From 49502595d344a036dc4d08162e554fbc9742ffe3 Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 20:17:08 +0200 Subject: [PATCH 0570/1614] Update umlautadaptarr.sh --- ct/umlautadaptarr.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/umlautadaptarr.sh b/ct/umlautadaptarr.sh index e23bba9..4fc9548 100644 --- a/ct/umlautadaptarr.sh +++ b/ct/umlautadaptarr.sh @@ -31,8 +31,7 @@ function update_script() { msg_info "Updating $APP..." systemctl stop umlautadaptarr temp_file=$(mktemp) - trap 'rm -f "$temp_file"' EXIT - RELEASE=$(curl -s https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') + RELEASE=$(curl -fsSL https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file $STD unzip -u $temp_file '*/**' -d /opt/UmlautAdaptarr systemctl start umlautadaptarr From 9d059cd0ecca13c344c7b9fdf510f2a1526f9cf4 Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 20:21:17 +0200 Subject: [PATCH 0571/1614] Update umlautadaptarr-install.sh --- install/umlautadaptarr-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index 3e93b96..8b3f3dc 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -24,7 +24,6 @@ $STD apt-get install -y \ msg_info "Installing Umlautadaptarr" temp_file=$(mktemp) -trap 'rm -f "$temp_file"' EXIT RELEASE=$(curl -s https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file unzip -qj $temp_file '*/**' -d /opt/UmlautAdaptarr From 0e833a718bf82d7d67e0f0a97299334936282466 Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 20:50:50 +0200 Subject: [PATCH 0572/1614] Update umlautadaptarr-install.sh --- install/umlautadaptarr-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index 8b3f3dc..bd8c2a3 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -115,6 +115,7 @@ motd_ssh customize msg_info "Cleaning up" +rm -f $temp_file $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From f7a468ef6baad800ff9efede8843ac6350a5d8ae Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 21:04:43 +0200 Subject: [PATCH 0573/1614] Update umlautadaptarr.sh --- ct/umlautadaptarr.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ct/umlautadaptarr.sh b/ct/umlautadaptarr.sh index 4fc9548..7f2f07b 100644 --- a/ct/umlautadaptarr.sh +++ b/ct/umlautadaptarr.sh @@ -5,7 +5,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/PCJones/UmlautAdaptarr -APP="Umlautadaptarr" +APP="UmlautAdaptarr" var_tags="arr" var_cpu="1" var_ram="512" @@ -28,17 +28,20 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + RELEASE=$(curl -fsSL https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating $APP..." systemctl stop umlautadaptarr temp_file=$(mktemp) - RELEASE=$(curl -fsSL https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file $STD unzip -u $temp_file '*/**' -d /opt/UmlautAdaptarr systemctl start umlautadaptarr msg_ok "$APP has been updated." - exit + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + exit } - start build_container description From 5428fce76889d1f7ffd9e444012c0a421c2400ec Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 21:12:27 +0200 Subject: [PATCH 0574/1614] Update umlautadaptarr-install.sh --- install/umlautadaptarr-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index bd8c2a3..c43acbf 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -27,6 +27,7 @@ temp_file=$(mktemp) RELEASE=$(curl -s https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file unzip -qj $temp_file '*/**' -d /opt/UmlautAdaptarr +echo "${RELEASE}" >"/opt/UmlautAdaptarr_version.txt" msg_ok "Installation completed" msg_info "Creating appsettings.json" From ffaecb56e4fe34fdadc9144644e297f02ab5a139 Mon Sep 17 00:00:00 2001 From: elvito Date: Wed, 16 Apr 2025 22:06:28 +0200 Subject: [PATCH 0575/1614] Update umlautadaptarr.json --- frontend/public/json/umlautadaptarr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/umlautadaptarr.json b/frontend/public/json/umlautadaptarr.json index b0797ca..0b8c927 100644 --- a/frontend/public/json/umlautadaptarr.json +++ b/frontend/public/json/umlautadaptarr.json @@ -2,7 +2,7 @@ "name": "UmlautAdaptarr", "slug": "umlautadaptarr", "categories": [ - 0 + 14 ], "date_created": "2025-04-08", "type": "ct", From 4b16f10ff764e1eb7f7709c2c15790830b31462b Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Thu, 17 Apr 2025 12:37:05 +0000 Subject: [PATCH 0576/1614] Update versions.json --- frontend/public/json/versions.json | 324 ++++++++++++++--------------- 1 file changed, 162 insertions(+), 162 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index be6c9de..45f72c2 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,28 +1,183 @@ [ + { + "name": "runtipi/runtipi", + "version": "v3.10.0-beta.9", + "date": "2025-04-17T11:46:08Z" + }, + { + "name": "prometheus-pve/prometheus-pve-exporter", + "version": "v3.5.3", + "date": "2025-04-17T10:40:47Z" + }, { "name": "fhem/fhem-mirror", "version": "6.2", - "date": "2025-04-15T10:34:54Z" + "date": "2025-04-17T10:34:25Z" + }, + { + "name": "karakeep-app/karakeep", + "version": "mcp/v0.23.6", + "date": "2025-04-17T10:33:10Z" + }, + { + "name": "traefik/traefik", + "version": "v2.11.23", + "date": "2025-04-17T10:14:21Z" + }, + { + "name": "IceWhaleTech/CasaOS", + "version": "v0.4.15", + "date": "2024-12-19T03:19:49Z" + }, + { + "name": "morpheus65535/bazarr", + "version": "v1.5.1", + "date": "2025-01-01T16:15:52Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1788", + "date": "2025-04-17T05:53:12Z" + }, + { + "name": "ollama/ollama", + "version": "v0.6.6-rc1", + "date": "2025-04-17T01:56:29Z" + }, + { + "name": "esphome/esphome", + "version": "2025.4.0", + "date": "2025-04-17T00:55:34Z" + }, + { + "name": "dgtlmoon/changedetection.io", + "version": "0.49.14", + "date": "2025-04-16T21:32:22Z" + }, + { + "name": "influxdata/influxdb", + "version": "v3.0.0", + "date": "2025-04-16T21:21:04Z" + }, + { + "name": "moghtech/komodo", + "version": "v1.17.1", + "date": "2025-04-14T22:35:13Z" + }, + { + "name": "docmost/docmost", + "version": "v0.10.2", + "date": "2025-04-16T20:43:40Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.2.0", + "date": "2025-04-11T12:48:27Z" + }, + { + "name": "ellite/Wallos", + "version": "v2.50.1", + "date": "2025-04-16T19:31:56Z" + }, + { + "name": "forgejo/forgejo", + "version": "v11.0.0", + "date": "2025-04-16T19:25:53Z" + }, + { + "name": "openobserve/openobserve", + "version": "v0.14.6-rc4", + "date": "2025-04-16T18:28:51Z" + }, + { + "name": "element-hq/synapse", + "version": "v1.129.0rc1", + "date": "2025-04-16T15:18:13Z" + }, + { + "name": "nzbgetcom/nzbget", + "version": "v24.8", + "date": "2025-03-18T07:33:51Z" + }, + { + "name": "pocket-id/pocket-id", + "version": "v0.47.0", + "date": "2025-04-16T14:32:31Z" }, { "name": "n8n-io/n8n", "version": "n8n@1.86.1", "date": "2025-04-09T09:20:55Z" }, + { + "name": "jenkinsci/jenkins", + "version": "jenkins-2.506", + "date": "2025-04-15T15:40:50Z" + }, { "name": "wazuh/wazuh", "version": "coverity-w16-4.12.0", "date": "2025-04-15T08:25:08Z" }, + { + "name": "pocketbase/pocketbase", + "version": "v0.27.0", + "date": "2025-04-16T04:54:37Z" + }, + { + "name": "icereed/paperless-gpt", + "version": "v0.15.0", + "date": "2025-04-16T03:58:02Z" + }, + { + "name": "HabitRPG/habitica", + "version": "v5.35.3", + "date": "2025-04-15T19:32:17Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.4.0b5", + "date": "2025-04-15T17:59:06Z" + }, + { + "name": "MediaBrowser/Emby.Releases", + "version": "4.8.11.0", + "date": "2025-03-10T06:39:11Z" + }, + { + "name": "rabbitmq/rabbitmq-server", + "version": "v4.1.0", + "date": "2025-04-15T16:18:29Z" + }, + { + "name": "Brandawg93/PeaNUT", + "version": "v5.7.2", + "date": "2025-04-15T15:44:49Z" + }, + { + "name": "WordPress/WordPress", + "version": "6.8", + "date": "2025-04-15T15:41:16Z" + }, + { + "name": "Stirling-Tools/Stirling-PDF", + "version": "v0.45.6", + "date": "2025-04-15T14:16:52Z" + }, + { + "name": "prometheus/prometheus", + "version": "v0.303.0", + "date": "2025-04-15T13:30:05Z" + }, { "name": "mattermost/mattermost", "version": "v10.6.2", "date": "2025-04-15T08:14:23Z" }, { - "name": "Jackett/Jackett", - "version": "v0.22.1778", - "date": "2025-04-15T06:26:21Z" + "name": "zabbix/zabbix", + "version": "7.0.12rc1", + "date": "2025-04-15T08:00:11Z" }, { "name": "slskd/slskd", @@ -34,31 +189,11 @@ "version": "v0.14.1", "date": "2024-08-29T22:32:51Z" }, - { - "name": "esphome/esphome", - "version": "2025.3.3", - "date": "2025-03-31T22:07:05Z" - }, - { - "name": "moghtech/komodo", - "version": "v1.17.1", - "date": "2025-04-14T22:35:13Z" - }, - { - "name": "influxdata/influxdb", - "version": "v3.0.0", - "date": "2025-04-14T22:16:28Z" - }, { "name": "Kareadita/Kavita", "version": "v0.8.6", "date": "2025-04-14T22:09:30Z" }, - { - "name": "keycloak/keycloak", - "version": "26.2.0", - "date": "2025-04-11T12:48:27Z" - }, { "name": "paperless-ngx/paperless-ngx", "version": "v2.15.2", @@ -94,26 +229,11 @@ "version": "15.2", "date": "2025-04-14T15:37:12Z" }, - { - "name": "Checkmk/checkmk", - "version": "v2.4.0b5-rc1", - "date": "2025-04-14T15:29:21Z" - }, { "name": "stackblitz-labs/bolt.diy", "version": "v0.0.7-hf1", "date": "2025-03-10T20:49:39Z" }, - { - "name": "zabbix/zabbix", - "version": "7.2.6rc1", - "date": "2025-04-14T15:00:15Z" - }, - { - "name": "rabbitmq/rabbitmq-server", - "version": "v4.0.9", - "date": "2025-04-14T14:40:34Z" - }, { "name": "AdguardTeam/AdGuardHome", "version": "v0.107.60", @@ -129,11 +249,6 @@ "version": "v1.12.0", "date": "2025-04-14T10:36:04Z" }, - { - "name": "Stirling-Tools/Stirling-PDF", - "version": "v0.45.5", - "date": "2025-04-14T09:57:39Z" - }, { "name": "open-webui/open-webui", "version": "v0.6.5", @@ -149,11 +264,6 @@ "version": "0.203.1", "date": "2025-04-14T07:23:02Z" }, - { - "name": "morpheus65535/bazarr", - "version": "v1.5.1", - "date": "2025-01-01T16:15:52Z" - }, { "name": "firefly-iii/firefly-iii", "version": "v6.2.10", @@ -164,11 +274,6 @@ "version": "v0.7.12", "date": "2025-04-14T00:16:15Z" }, - { - "name": "ellite/Wallos", - "version": "v2.49.1", - "date": "2025-04-13T22:36:24Z" - }, { "name": "rogerfar/rdt-client", "version": "v2.0.108", @@ -184,21 +289,6 @@ "version": "v4.47.1", "date": "2025-01-05T21:14:23Z" }, - { - "name": "pocket-id/pocket-id", - "version": "v0.46.0", - "date": "2025-04-13T18:31:13Z" - }, - { - "name": "runtipi/runtipi", - "version": "v3.10.0", - "date": "2025-03-15T14:38:16Z" - }, - { - "name": "karakeep-app/karakeep", - "version": "mcp/v0.23.4", - "date": "2025-04-13T14:09:19Z" - }, { "name": "syncthing/syncthing", "version": "v2.0.0-beta.9", @@ -239,11 +329,6 @@ "version": "v0.2.11", "date": "2025-04-12T21:13:08Z" }, - { - "name": "MediaBrowser/Emby.Releases", - "version": "4.8.11.0", - "date": "2025-03-10T06:39:11Z" - }, { "name": "home-assistant/core", "version": "2025.4.2", @@ -289,16 +374,6 @@ "version": "release-1.23.0rc2", "date": "2025-04-11T13:24:25Z" }, - { - "name": "docmost/docmost", - "version": "v0.10.1", - "date": "2025-04-11T12:42:08Z" - }, - { - "name": "dgtlmoon/changedetection.io", - "version": "0.49.13", - "date": "2025-04-11T11:48:06Z" - }, { "name": "sabnzbd/sabnzbd", "version": "4.5.1", @@ -309,11 +384,6 @@ "version": "v0.83.0", "date": "2025-04-11T03:53:10Z" }, - { - "name": "openobserve/openobserve", - "version": "v0.14.6-rc3", - "date": "2025-04-11T03:08:28Z" - }, { "name": "Luligu/matterbridge", "version": "2.2.8", @@ -359,21 +429,11 @@ "version": "v7.4.0", "date": "2025-04-09T17:36:14Z" }, - { - "name": "Brandawg93/PeaNUT", - "version": "v5.7.1", - "date": "2025-04-09T15:06:49Z" - }, { "name": "glpi-project/glpi", "version": "10.0.18", "date": "2025-02-12T11:07:02Z" }, - { - "name": "HabitRPG/habitica", - "version": "v5.35.2", - "date": "2025-04-09T13:46:58Z" - }, { "name": "zitadel/zitadel", "version": "v2.69.10", @@ -394,26 +454,11 @@ "version": "version/2025.2.4", "date": "2025-04-08T18:39:57Z" }, - { - "name": "jenkinsci/jenkins", - "version": "jenkins-2.505", - "date": "2025-04-08T15:46:42Z" - }, - { - "name": "element-hq/synapse", - "version": "v1.128.0", - "date": "2025-04-08T14:27:55Z" - }, { "name": "linkwarden/linkwarden", "version": "v2.10.0", "date": "2025-04-08T12:33:57Z" }, - { - "name": "prometheus/prometheus", - "version": "v0.303.0-rc.1", - "date": "2025-04-07T04:39:38Z" - }, { "name": "pelican-dev/panel", "version": "v1.0.0-beta19", @@ -430,53 +475,8 @@ "date": "2025-04-07T20:01:09Z" }, { - "name": "go-gitea/gitea", - "version": "v1.23.7", - "date": "2025-04-07T19:27:52Z" - }, - { - "name": "thomiceli/opengist", - "version": "v1.10.0", - "date": "2025-04-07T14:32:15Z" - }, - { - "name": "fallenbagel/jellyseerr", - "version": "preview-back-to-axios", - "date": "2025-04-07T09:23:08Z" - }, - { - "name": "redis/redis", - "version": "8.0-rc1-int2", - "date": "2025-04-02T19:05:08Z" - }, - { - "name": "nzbgetcom/nzbget", - "version": "v24.8", - "date": "2025-03-18T07:33:51Z" - }, - { - "name": "Dolibarr/dolibarr", - "version": "21.0.1", - "date": "2025-04-06T19:22:59Z" - }, - { - "name": "stonith404/pingvin-share", - "version": "v1.11.1", - "date": "2025-04-06T18:39:42Z" - }, - { - "name": "wavelog/wavelog", - "version": "2.0.3", - "date": "2025-04-06T17:35:41Z" - }, - { - "name": "TandoorRecipes/recipes", - "version": "1.5.34", - "date": "2025-03-27T16:17:38Z" - }, - { - "name": "ollama/ollama", - "version": "v0.6.5", - "date": "2025-04-06T00:15:39Z" + "name": "jellyfin/jellyfin", + "version": "v10.10.7", + "date": "2025-04-05T19:14:59Z" } ] From de529fed35a4d82a1da34550aad1b0a2cc22b932 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 19 Apr 2025 08:55:46 +0000 Subject: [PATCH 0577/1614] Update .app files --- ct/headers/umlautadaptarr | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/umlautadaptarr diff --git a/ct/headers/umlautadaptarr b/ct/headers/umlautadaptarr new file mode 100644 index 0000000..d983804 --- /dev/null +++ b/ct/headers/umlautadaptarr @@ -0,0 +1,6 @@ + __ __ __ __ ___ __ __ + / / / /___ ___ / /___ ___ __/ /_/ | ____/ /___ _____ / /_____ ___________ + / / / / __ `__ \/ / __ `/ / / / __/ /| |/ __ / __ `/ __ \/ __/ __ `/ ___/ ___/ +/ /_/ / / / / / / / /_/ / /_/ / /_/ ___ / /_/ / /_/ / /_/ / /_/ /_/ / / / / +\____/_/ /_/ /_/_/\__,_/\__,_/\__/_/ |_\__,_/\__,_/ .___/\__/\__,_/_/ /_/ + /_/ From a1f6cdd3f10a75b87c1fcf47531b5dbcae8c6943 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Sat, 19 Apr 2025 12:32:07 +0000 Subject: [PATCH 0578/1614] Update versions.json --- frontend/public/json/versions.json | 337 ++++++++++++++--------------- 1 file changed, 161 insertions(+), 176 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 45f72c2..6edc243 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,28 +1,178 @@ [ + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-19T10:31:03Z" + }, + { + "name": "home-assistant/core", + "version": "2025.4.3", + "date": "2025-04-19T10:23:38Z" + }, { "name": "runtipi/runtipi", "version": "v3.10.0-beta.9", "date": "2025-04-17T11:46:08Z" }, { - "name": "prometheus-pve/prometheus-pve-exporter", - "version": "v3.5.3", - "date": "2025-04-17T10:40:47Z" + "name": "moghtech/komodo", + "version": "v1.17.2", + "date": "2025-04-19T06:56:25Z" }, { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-17T10:34:25Z" + "name": "Jackett/Jackett", + "version": "v0.22.1795", + "date": "2025-04-19T05:57:57Z" }, { - "name": "karakeep-app/karakeep", - "version": "mcp/v0.23.6", - "date": "2025-04-17T10:33:10Z" + "name": "firefly-iii/firefly-iii", + "version": "v6.2.10", + "date": "2025-03-22T13:02:26Z" + }, + { + "name": "ollama/ollama", + "version": "v0.6.6-rc1", + "date": "2025-04-17T01:56:29Z" + }, + { + "name": "msgbyte/tianji", + "version": "v1.20.6", + "date": "2025-04-18T23:48:11Z" + }, + { + "name": "semaphoreui/semaphore", + "version": "v2.14.0-beta2", + "date": "2025-04-17T17:56:55Z" + }, + { + "name": "caddyserver/caddy", + "version": "v2.10.0", + "date": "2025-04-18T20:46:28Z" + }, + { + "name": "cross-seed/cross-seed", + "version": "v6.11.2", + "date": "2025-02-26T14:54:49Z" + }, + { + "name": "homarr-labs/homarr", + "version": "v1.17.0", + "date": "2025-04-18T19:14:57Z" + }, + { + "name": "pocket-id/pocket-id", + "version": "v0.48.0", + "date": "2025-04-18T16:34:56Z" + }, + { + "name": "Paymenter/Paymenter", + "version": "v1.0.4", + "date": "2025-04-18T16:08:02Z" + }, + { + "name": "ellite/Wallos", + "version": "v2.51.0", + "date": "2025-04-18T13:51:47Z" + }, + { + "name": "prometheus/prometheus", + "version": "v3.3.0", + "date": "2025-04-18T13:46:38Z" + }, + { + "name": "dgtlmoon/changedetection.io", + "version": "0.49.15", + "date": "2025-04-18T12:58:26Z" }, { "name": "traefik/traefik", - "version": "v2.11.23", - "date": "2025-04-17T10:14:21Z" + "version": "v3.3.6", + "date": "2025-04-18T09:28:22Z" + }, + { + "name": "Kareadita/Kavita", + "version": "v0.8.6.1", + "date": "2025-04-18T12:30:53Z" + }, + { + "name": "TandoorRecipes/recipes", + "version": "1.5.34", + "date": "2025-03-27T16:17:38Z" + }, + { + "name": "Luligu/matterbridge", + "version": "2.2.9", + "date": "2025-04-18T10:05:52Z" + }, + { + "name": "karakeep-app/karakeep", + "version": "mcp/v0.23.7", + "date": "2025-04-17T23:10:10Z" + }, + { + "name": "HabitRPG/habitica", + "version": "v5.35.4", + "date": "2025-04-17T21:18:55Z" + }, + { + "name": "tailscale/tailscale", + "version": "v1.82.5", + "date": "2025-04-17T20:59:15Z" + }, + { + "name": "TriliumNext/Notes", + "version": "v0.93.0", + "date": "2025-04-17T20:05:25Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.2.0", + "date": "2025-04-11T12:48:27Z" + }, + { + "name": "AdguardTeam/AdGuardHome", + "version": "v0.107.60", + "date": "2025-04-14T11:46:19Z" + }, + { + "name": "coder/code-server", + "version": "v4.99.3", + "date": "2025-04-17T18:33:11Z" + }, + { + "name": "VictoriaMetrics/VictoriaMetrics", + "version": "v1.19.0-victorialogs", + "date": "2025-04-17T18:26:31Z" + }, + { + "name": "duplicati/duplicati", + "version": "v2.1.0.116-2.1.0.116_canary_2025-04-17", + "date": "2025-04-17T17:52:31Z" + }, + { + "name": "benzino77/tasmocompiler", + "version": "v12.6.1", + "date": "2025-04-17T17:35:02Z" + }, + { + "name": "docker/compose", + "version": "v2.35.1", + "date": "2025-04-17T14:29:11Z" + }, + { + "name": "influxdata/influxdb", + "version": "v3.0.1", + "date": "2025-04-17T14:06:09Z" + }, + { + "name": "documenso/documenso", + "version": "v1.10.0-rc.5", + "date": "2025-04-17T13:01:43Z" + }, + { + "name": "prometheus-pve/prometheus-pve-exporter", + "version": "v3.5.3", + "date": "2025-04-17T10:40:47Z" }, { "name": "IceWhaleTech/CasaOS", @@ -34,51 +184,16 @@ "version": "v1.5.1", "date": "2025-01-01T16:15:52Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1788", - "date": "2025-04-17T05:53:12Z" - }, - { - "name": "ollama/ollama", - "version": "v0.6.6-rc1", - "date": "2025-04-17T01:56:29Z" - }, { "name": "esphome/esphome", "version": "2025.4.0", "date": "2025-04-17T00:55:34Z" }, - { - "name": "dgtlmoon/changedetection.io", - "version": "0.49.14", - "date": "2025-04-16T21:32:22Z" - }, - { - "name": "influxdata/influxdb", - "version": "v3.0.0", - "date": "2025-04-16T21:21:04Z" - }, - { - "name": "moghtech/komodo", - "version": "v1.17.1", - "date": "2025-04-14T22:35:13Z" - }, { "name": "docmost/docmost", "version": "v0.10.2", "date": "2025-04-16T20:43:40Z" }, - { - "name": "keycloak/keycloak", - "version": "26.2.0", - "date": "2025-04-11T12:48:27Z" - }, - { - "name": "ellite/Wallos", - "version": "v2.50.1", - "date": "2025-04-16T19:31:56Z" - }, { "name": "forgejo/forgejo", "version": "v11.0.0", @@ -99,11 +214,6 @@ "version": "v24.8", "date": "2025-03-18T07:33:51Z" }, - { - "name": "pocket-id/pocket-id", - "version": "v0.47.0", - "date": "2025-04-16T14:32:31Z" - }, { "name": "n8n-io/n8n", "version": "n8n@1.86.1", @@ -129,11 +239,6 @@ "version": "v0.15.0", "date": "2025-04-16T03:58:02Z" }, - { - "name": "HabitRPG/habitica", - "version": "v5.35.3", - "date": "2025-04-15T19:32:17Z" - }, { "name": "Checkmk/checkmk", "version": "v2.4.0b5", @@ -164,11 +269,6 @@ "version": "v0.45.6", "date": "2025-04-15T14:16:52Z" }, - { - "name": "prometheus/prometheus", - "version": "v0.303.0", - "date": "2025-04-15T13:30:05Z" - }, { "name": "mattermost/mattermost", "version": "v10.6.2", @@ -189,41 +289,21 @@ "version": "v0.14.1", "date": "2024-08-29T22:32:51Z" }, - { - "name": "Kareadita/Kavita", - "version": "v0.8.6", - "date": "2025-04-14T22:09:30Z" - }, { "name": "paperless-ngx/paperless-ngx", "version": "v2.15.2", "date": "2025-04-14T20:48:52Z" }, - { - "name": "semaphoreui/semaphore", - "version": "v2.13.13", - "date": "2025-04-11T10:15:13Z" - }, { "name": "netbox-community/netbox", "version": "v4.2.7", "date": "2025-04-10T20:08:13Z" }, - { - "name": "duplicati/duplicati", - "version": "v2.1.0.115-2.1.0.115_canary_2025-04-14", - "date": "2025-04-14T18:03:36Z" - }, { "name": "OliveTin/OliveTin", "version": "2025.4.14", "date": "2025-04-14T16:53:53Z" }, - { - "name": "msgbyte/tianji", - "version": "v1.20.0", - "date": "2025-04-14T16:19:23Z" - }, { "name": "home-assistant/operating-system", "version": "15.2", @@ -234,11 +314,6 @@ "version": "v0.0.7-hf1", "date": "2025-03-10T20:49:39Z" }, - { - "name": "AdguardTeam/AdGuardHome", - "version": "v0.107.60", - "date": "2025-04-14T11:46:19Z" - }, { "name": "Graylog2/graylog2-server", "version": "6.2.0-rc.1", @@ -264,11 +339,6 @@ "version": "0.203.1", "date": "2025-04-14T07:23:02Z" }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.10", - "date": "2025-03-22T13:02:26Z" - }, { "name": "glanceapp/glance", "version": "v0.7.12", @@ -329,11 +399,6 @@ "version": "v0.2.11", "date": "2025-04-12T21:13:08Z" }, - { - "name": "home-assistant/core", - "version": "2025.4.2", - "date": "2025-04-12T09:46:22Z" - }, { "name": "readeck/readeck", "version": "0.18.0", @@ -344,26 +409,6 @@ "version": "v5.5.2", "date": "2025-04-11T22:00:06Z" }, - { - "name": "homarr-labs/homarr", - "version": "v1.16.0", - "date": "2025-04-11T19:15:24Z" - }, - { - "name": "tailscale/tailscale", - "version": "v1.82.4", - "date": "2025-04-11T17:58:09Z" - }, - { - "name": "coder/code-server", - "version": "v4.99.2", - "date": "2025-04-11T17:57:47Z" - }, - { - "name": "TriliumNext/Notes", - "version": "v0.0.0", - "date": "2025-04-11T14:18:00Z" - }, { "name": "emqx/emqx", "version": "e5.9.0-beta.3", @@ -384,11 +429,6 @@ "version": "v0.83.0", "date": "2025-04-11T03:53:10Z" }, - { - "name": "Luligu/matterbridge", - "version": "2.2.8", - "date": "2025-04-10T20:30:49Z" - }, { "name": "gristlabs/grist-core", "version": "v1.5.1", @@ -399,26 +439,11 @@ "version": "cassandra-5.0.4", "date": "2025-04-10T16:32:00Z" }, - { - "name": "VictoriaMetrics/VictoriaMetrics", - "version": "v1.18.0-victorialogs", - "date": "2025-04-10T15:05:20Z" - }, { "name": "NodeBB/NodeBB", "version": "v4.2.1", "date": "2025-04-10T14:03:47Z" }, - { - "name": "Paymenter/Paymenter", - "version": "v1.0.3", - "date": "2025-04-10T13:57:39Z" - }, - { - "name": "docker/compose", - "version": "v2.35.0", - "date": "2025-04-10T13:45:22Z" - }, { "name": "mongodb/mongo", "version": "r8.0.5-rc2", @@ -438,45 +463,5 @@ "name": "zitadel/zitadel", "version": "v2.69.10", "date": "2025-04-09T12:16:51Z" - }, - { - "name": "YunoHost/yunohost", - "version": "debian/12.0.14", - "date": "2025-04-09T10:09:00Z" - }, - { - "name": "minio/minio", - "version": "RELEASE.2025-04-08T15-41-24Z", - "date": "2025-04-08T19:51:06Z" - }, - { - "name": "goauthentik/authentik", - "version": "version/2025.2.4", - "date": "2025-04-08T18:39:57Z" - }, - { - "name": "linkwarden/linkwarden", - "version": "v2.10.0", - "date": "2025-04-08T12:33:57Z" - }, - { - "name": "pelican-dev/panel", - "version": "v1.0.0-beta19", - "date": "2025-04-07T23:06:29Z" - }, - { - "name": "pelican-dev/wings", - "version": "v1.0.0-beta11", - "date": "2025-04-07T23:02:00Z" - }, - { - "name": "Threadfin/Threadfin", - "version": "1.2.32", - "date": "2025-04-07T20:01:09Z" - }, - { - "name": "jellyfin/jellyfin", - "version": "v10.10.7", - "date": "2025-04-05T19:14:59Z" } ] From 6202f72a800cad43ac816cf755ea9a5b8e3512d7 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Sat, 19 Apr 2025 11:22:40 -0400 Subject: [PATCH 0579/1614] Reactive Resume: appease the GitHub bot --- .../public/json/{reactive-resume.json => reactiveresume.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename frontend/public/json/{reactive-resume.json => reactiveresume.json} (100%) diff --git a/frontend/public/json/reactive-resume.json b/frontend/public/json/reactiveresume.json similarity index 100% rename from frontend/public/json/reactive-resume.json rename to frontend/public/json/reactiveresume.json From a24c440db990810e5d5b72e85caa3be89fed3c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Sun, 20 Apr 2025 18:42:27 -0300 Subject: [PATCH 0580/1614] Update ct/jumpserver.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/jumpserver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jumpserver.sh b/ct/jumpserver.sh index f439cb5..3874bfb 100644 --- a/ct/jumpserver.sh +++ b/ct/jumpserver.sh @@ -64,4 +64,4 @@ 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}:80${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" From 86e004a3a7cbd5b237db8a05f861fcec4db5da78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Sun, 20 Apr 2025 22:53:27 -0300 Subject: [PATCH 0581/1614] Update jumpserver.sh --- ct/jumpserver.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/jumpserver.sh b/ct/jumpserver.sh index 3874bfb..3ff61a2 100644 --- a/ct/jumpserver.sh +++ b/ct/jumpserver.sh @@ -32,7 +32,6 @@ function update_script() { if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating ${APP} to ${RELEASE}" if [[ -d /opt/jumpserver/config ]]; then - msg_info "Backing up /opt/jumpserver/config" cp -r /opt/jumpserver/config /opt/jumpserver_config_backup fi echo "${RELEASE}" >/opt/${APP}_version.txt @@ -42,7 +41,6 @@ function update_script() { mkdir -p /opt/jumpserver $STD tar -xzvf jumpserver-installer-${RELEASE}.tar.gz -C /opt/jumpserver --strip-components=1 if [[ -d /opt/jumpserver_config_backup ]]; then - msg_info "Restoring config backup" cp -r /opt/jumpserver_config_backup /opt/jumpserver/config rm -rf /opt/jumpserver_config_backup fi From 526787b215c18f00124b1d6663c341f442e5a2a3 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 22 Apr 2025 15:28:36 +0200 Subject: [PATCH 0582/1614] Add Workflow --- .github/workflows/close-ttek-issue.yaml | 52 +++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/close-ttek-issue.yaml diff --git a/.github/workflows/close-ttek-issue.yaml b/.github/workflows/close-ttek-issue.yaml new file mode 100644 index 0000000..a71622e --- /dev/null +++ b/.github/workflows/close-ttek-issue.yaml @@ -0,0 +1,52 @@ +name: Auto-Close tteck Issues + +on: + issues: + types: [opened] + +jobs: + close_tteck_issues: + runs-on: ubuntu-latest + steps: + - name: Auto-close if tteck script detected + uses: actions/github-script@v7 + with: + script: | + const issue = context.payload.issue; + const content = `${issue.title}\n${issue.body}`; + const issueNumber = issue.number; + + // Check for tteck script mention + if (content.includes("tteck") || content.includes("tteck/Proxmox")) { + const message = `Hello, it looks like you are referencing the **old tteck repo**. + + This repository is no longer used for active scripts. + **Please update your bookmarks** and use: [https://helper-scripts.com](https://helper-scripts.com) + + Also make sure your Bash command starts with: + \`\`\`bash + bash <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/...) + \`\`\` + + This issue is being closed automatically.`; + + await github.rest.issues.createComment({ + ...context.repo, + issue_number: issueNumber, + body: message + }); + + // Optionally apply a label like "not planned" + await github.rest.issues.addLabels({ + ...context.repo, + issue_number: issueNumber, + labels: ["not planned"] + }); + + // Close the issue + await github.rest.issues.update({ + ...context.repo, + issue_number: issueNumber, + state: "closed" + }); + } From f7e6755a8901d629d44ac38f07debf0c2809b2c7 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 22 Apr 2025 15:31:33 +0200 Subject: [PATCH 0583/1614] Rename reactiveresume.json to reactive-resume.json --- .../public/json/{reactiveresume.json => reactive-resume.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename frontend/public/json/{reactiveresume.json => reactive-resume.json} (100%) diff --git a/frontend/public/json/reactiveresume.json b/frontend/public/json/reactive-resume.json similarity index 100% rename from frontend/public/json/reactiveresume.json rename to frontend/public/json/reactive-resume.json From ac8cd0135356f29114f64c319684bfc6da3bcd2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Tue, 22 Apr 2025 10:33:26 -0300 Subject: [PATCH 0584/1614] Update jumpserver-install.sh --- install/jumpserver-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/jumpserver-install.sh b/install/jumpserver-install.sh index 4cc2539..adf969d 100644 --- a/install/jumpserver-install.sh +++ b/install/jumpserver-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - curl \ tar \ iptables msg_ok "Installed Dependencies" From 20d8942700d0282bfb4cb678045de3fc1ebdf208 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 22 Apr 2025 15:42:10 +0200 Subject: [PATCH 0585/1614] Changes to workflow --- .github/workflows/move-to-main-repo.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/move-to-main-repo.yaml b/.github/workflows/move-to-main-repo.yaml index 763c529..0f49556 100644 --- a/.github/workflows/move-to-main-repo.yaml +++ b/.github/workflows/move-to-main-repo.yaml @@ -133,7 +133,8 @@ jobs: cp ../frontend/public/json/$script_name.json frontend/public/json/. sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|' ct/$script_name.sh - + sed -i 's|# License: MIT \| https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE|# License: MIT \| https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE|' ct/$script_name.sh + sed -i 's|# License: MIT \| https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE|# License: MIT \| https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE|' ct/$script_name-install.sh git add . if git diff --cached --exit-code; then echo "No changes detected, skipping commit." From 65017a0d686820ce86e49bc3148ad48883a0267f Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Wed, 23 Apr 2025 01:25:35 +0000 Subject: [PATCH 0586/1614] Update versions.json --- frontend/public/json/versions.json | 480 +++++++++++++++-------------- 1 file changed, 255 insertions(+), 225 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 6edc243..2b484c5 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,79 +1,274 @@ [ { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-19T10:31:03Z" - }, - { - "name": "home-assistant/core", - "version": "2025.4.3", - "date": "2025-04-19T10:23:38Z" - }, - { - "name": "runtipi/runtipi", - "version": "v3.10.0-beta.9", - "date": "2025-04-17T11:46:08Z" - }, - { - "name": "moghtech/komodo", - "version": "v1.17.2", - "date": "2025-04-19T06:56:25Z" - }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1795", - "date": "2025-04-19T05:57:57Z" - }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.10", - "date": "2025-03-22T13:02:26Z" - }, - { - "name": "ollama/ollama", - "version": "v0.6.6-rc1", - "date": "2025-04-17T01:56:29Z" - }, - { - "name": "msgbyte/tianji", - "version": "v1.20.6", - "date": "2025-04-18T23:48:11Z" - }, - { - "name": "semaphoreui/semaphore", - "version": "v2.14.0-beta2", - "date": "2025-04-17T17:56:55Z" - }, - { - "name": "caddyserver/caddy", - "version": "v2.10.0", - "date": "2025-04-18T20:46:28Z" + "name": "grafana/grafana", + "version": "v11.3.6", + "date": "2025-04-23T00:18:05Z" }, { "name": "cross-seed/cross-seed", "version": "v6.11.2", "date": "2025-02-26T14:54:49Z" }, + { + "name": "minio/minio", + "version": "RELEASE.2025-04-22T22-12-26Z", + "date": "2025-04-22T22:44:34Z" + }, + { + "name": "docmost/docmost", + "version": "v0.20.0", + "date": "2025-04-22T22:30:25Z" + }, + { + "name": "glanceapp/glance", + "version": "v0.7.13", + "date": "2025-04-22T22:19:16Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-22T20:30:58Z" + }, + { + "name": "netbox-community/netbox", + "version": "v4.2.8", + "date": "2025-04-22T19:44:49Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.2.0", + "date": "2025-04-11T12:48:27Z" + }, + { + "name": "donaldzou/WGDashboard", + "version": "v4.2.0", + "date": "2025-04-22T18:18:28Z" + }, + { + "name": "n8n-io/n8n", + "version": "n8n@1.90.0", + "date": "2025-04-22T08:58:15Z" + }, + { + "name": "NodeBB/NodeBB", + "version": "v4.2.2", + "date": "2025-04-22T16:33:53Z" + }, + { + "name": "jenkinsci/jenkins", + "version": "jenkins-2.507", + "date": "2025-04-22T15:22:53Z" + }, + { + "name": "evcc-io/evcc", + "version": "0.203.2", + "date": "2025-04-22T15:07:28Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.4.0b6", + "date": "2025-04-22T15:00:31Z" + }, + { + "name": "zwave-js/zwave-js-ui", + "version": "v10.3.0", + "date": "2025-04-22T14:57:47Z" + }, + { + "name": "OliveTin/OliveTin", + "version": "2025.4.22", + "date": "2025-04-22T14:18:11Z" + }, + { + "name": "mongodb/mongo", + "version": "r8.2.0-alpha", + "date": "2025-04-22T13:19:07Z" + }, + { + "name": "AdguardTeam/AdGuardHome", + "version": "v0.107.61", + "date": "2025-04-22T12:42:26Z" + }, + { + "name": "VictoriaMetrics/VictoriaMetrics", + "version": "v1.20.0-victorialogs", + "date": "2025-04-22T12:00:23Z" + }, + { + "name": "zabbix/zabbix", + "version": "7.0.12", + "date": "2025-04-22T11:40:31Z" + }, + { + "name": "Graylog2/graylog2-server", + "version": "6.2.0-rc.2", + "date": "2025-04-22T11:35:32Z" + }, + { + "name": "OctoPrint/OctoPrint", + "version": "1.11.0", + "date": "2025-04-22T09:33:46Z" + }, + { + "name": "nzbgetcom/nzbget", + "version": "v24.8", + "date": "2025-03-18T07:33:51Z" + }, + { + "name": "openobserve/openobserve", + "version": "v0.14.6-rc5", + "date": "2025-04-22T06:50:13Z" + }, + { + "name": "mattermost/mattermost", + "version": "v10.6.2", + "date": "2025-04-15T08:14:23Z" + }, + { + "name": "morpheus65535/bazarr", + "version": "v1.5.1", + "date": "2025-01-01T16:15:52Z" + }, + { + "name": "firefly-iii/firefly-iii", + "version": "v6.2.12", + "date": "2025-04-20T19:22:17Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1809", + "date": "2025-04-22T05:55:35Z" + }, + { + "name": "monicahq/monica", + "version": "v4.1.2", + "date": "2024-05-04T08:06:50Z" + }, + { + "name": "Suwayomi/Suwayomi-Server", + "version": "v2.0.1727", + "date": "2025-04-21T17:53:05Z" + }, + { + "name": "TasmoAdmin/TasmoAdmin", + "version": "v4.3.0", + "date": "2025-04-21T17:44:40Z" + }, + { + "name": "emqx/emqx", + "version": "e5.9.0-beta.4", + "date": "2025-04-21T17:08:59Z" + }, + { + "name": "runtipi/runtipi", + "version": "nightly", + "date": "2025-04-21T16:55:50Z" + }, + { + "name": "Prowlarr/Prowlarr", + "version": "v1.34.1.5021", + "date": "2025-04-20T19:29:50Z" + }, + { + "name": "semaphoreui/semaphore", + "version": "v2.13.14", + "date": "2025-04-19T20:39:23Z" + }, + { + "name": "pocket-id/pocket-id", + "version": "v0.49.0", + "date": "2025-04-20T18:03:03Z" + }, + { + "name": "YunoHost/yunohost", + "version": "debian/12.0.14", + "date": "2025-04-09T10:09:00Z" + }, + { + "name": "Kareadita/Kavita", + "version": "v0.8.6.2", + "date": "2025-04-20T16:55:38Z" + }, + { + "name": "openhab/openhab-core", + "version": "5.0.0.M2", + "date": "2025-04-20T13:16:29Z" + }, + { + "name": "pocketbase/pocketbase", + "version": "v0.27.1", + "date": "2025-04-20T11:26:50Z" + }, + { + "name": "karakeep-app/karakeep", + "version": "extension/v1.2.5", + "date": "2025-04-20T10:19:06Z" + }, + { + "name": "MediaBrowser/Emby.Releases", + "version": "4.8.11.0", + "date": "2025-03-10T06:39:11Z" + }, + { + "name": "Readarr/Readarr", + "version": "v2.0.0.4645", + "date": "2017-03-07T18:56:06Z" + }, + { + "name": "Radarr/Radarr", + "version": "v5.21.1.9799", + "date": "2025-03-24T15:52:12Z" + }, + { + "name": "paperless-ngx/paperless-ngx", + "version": "v2.15.3", + "date": "2025-04-19T23:02:17Z" + }, + { + "name": "ellite/Wallos", + "version": "v2.52.0", + "date": "2025-04-19T20:36:50Z" + }, + { + "name": "msgbyte/tianji", + "version": "v1.20.7", + "date": "2025-04-19T20:35:09Z" + }, + { + "name": "theonedev/onedev", + "version": "v11.8.7", + "date": "2025-04-19T11:19:29Z" + }, + { + "name": "home-assistant/core", + "version": "2025.4.3", + "date": "2025-04-19T10:23:38Z" + }, + { + "name": "moghtech/komodo", + "version": "v1.17.2", + "date": "2025-04-19T06:56:25Z" + }, + { + "name": "ollama/ollama", + "version": "v0.6.6-rc1", + "date": "2025-04-17T01:56:29Z" + }, + { + "name": "caddyserver/caddy", + "version": "v2.10.0", + "date": "2025-04-18T20:46:28Z" + }, { "name": "homarr-labs/homarr", "version": "v1.17.0", "date": "2025-04-18T19:14:57Z" }, - { - "name": "pocket-id/pocket-id", - "version": "v0.48.0", - "date": "2025-04-18T16:34:56Z" - }, { "name": "Paymenter/Paymenter", "version": "v1.0.4", "date": "2025-04-18T16:08:02Z" }, - { - "name": "ellite/Wallos", - "version": "v2.51.0", - "date": "2025-04-18T13:51:47Z" - }, { "name": "prometheus/prometheus", "version": "v3.3.0", @@ -89,11 +284,6 @@ "version": "v3.3.6", "date": "2025-04-18T09:28:22Z" }, - { - "name": "Kareadita/Kavita", - "version": "v0.8.6.1", - "date": "2025-04-18T12:30:53Z" - }, { "name": "TandoorRecipes/recipes", "version": "1.5.34", @@ -104,11 +294,6 @@ "version": "2.2.9", "date": "2025-04-18T10:05:52Z" }, - { - "name": "karakeep-app/karakeep", - "version": "mcp/v0.23.7", - "date": "2025-04-17T23:10:10Z" - }, { "name": "HabitRPG/habitica", "version": "v5.35.4", @@ -124,26 +309,11 @@ "version": "v0.93.0", "date": "2025-04-17T20:05:25Z" }, - { - "name": "keycloak/keycloak", - "version": "26.2.0", - "date": "2025-04-11T12:48:27Z" - }, - { - "name": "AdguardTeam/AdGuardHome", - "version": "v0.107.60", - "date": "2025-04-14T11:46:19Z" - }, { "name": "coder/code-server", "version": "v4.99.3", "date": "2025-04-17T18:33:11Z" }, - { - "name": "VictoriaMetrics/VictoriaMetrics", - "version": "v1.19.0-victorialogs", - "date": "2025-04-17T18:26:31Z" - }, { "name": "duplicati/duplicati", "version": "v2.1.0.116-2.1.0.116_canary_2025-04-17", @@ -179,76 +349,31 @@ "version": "v0.4.15", "date": "2024-12-19T03:19:49Z" }, - { - "name": "morpheus65535/bazarr", - "version": "v1.5.1", - "date": "2025-01-01T16:15:52Z" - }, { "name": "esphome/esphome", "version": "2025.4.0", "date": "2025-04-17T00:55:34Z" }, - { - "name": "docmost/docmost", - "version": "v0.10.2", - "date": "2025-04-16T20:43:40Z" - }, { "name": "forgejo/forgejo", "version": "v11.0.0", "date": "2025-04-16T19:25:53Z" }, - { - "name": "openobserve/openobserve", - "version": "v0.14.6-rc4", - "date": "2025-04-16T18:28:51Z" - }, { "name": "element-hq/synapse", "version": "v1.129.0rc1", "date": "2025-04-16T15:18:13Z" }, - { - "name": "nzbgetcom/nzbget", - "version": "v24.8", - "date": "2025-03-18T07:33:51Z" - }, - { - "name": "n8n-io/n8n", - "version": "n8n@1.86.1", - "date": "2025-04-09T09:20:55Z" - }, - { - "name": "jenkinsci/jenkins", - "version": "jenkins-2.506", - "date": "2025-04-15T15:40:50Z" - }, { "name": "wazuh/wazuh", - "version": "coverity-w16-4.12.0", - "date": "2025-04-15T08:25:08Z" - }, - { - "name": "pocketbase/pocketbase", - "version": "v0.27.0", - "date": "2025-04-16T04:54:37Z" + "version": "coverity-w17-4.12.0", + "date": "2025-04-16T11:20:57Z" }, { "name": "icereed/paperless-gpt", "version": "v0.15.0", "date": "2025-04-16T03:58:02Z" }, - { - "name": "Checkmk/checkmk", - "version": "v2.4.0b5", - "date": "2025-04-15T17:59:06Z" - }, - { - "name": "MediaBrowser/Emby.Releases", - "version": "4.8.11.0", - "date": "2025-03-10T06:39:11Z" - }, { "name": "rabbitmq/rabbitmq-server", "version": "v4.1.0", @@ -269,16 +394,6 @@ "version": "v0.45.6", "date": "2025-04-15T14:16:52Z" }, - { - "name": "mattermost/mattermost", - "version": "v10.6.2", - "date": "2025-04-15T08:14:23Z" - }, - { - "name": "zabbix/zabbix", - "version": "7.0.12rc1", - "date": "2025-04-15T08:00:11Z" - }, { "name": "slskd/slskd", "version": "0.22.5", @@ -289,21 +404,6 @@ "version": "v0.14.1", "date": "2024-08-29T22:32:51Z" }, - { - "name": "paperless-ngx/paperless-ngx", - "version": "v2.15.2", - "date": "2025-04-14T20:48:52Z" - }, - { - "name": "netbox-community/netbox", - "version": "v4.2.7", - "date": "2025-04-10T20:08:13Z" - }, - { - "name": "OliveTin/OliveTin", - "version": "2025.4.14", - "date": "2025-04-14T16:53:53Z" - }, { "name": "home-assistant/operating-system", "version": "15.2", @@ -314,11 +414,6 @@ "version": "v0.0.7-hf1", "date": "2025-03-10T20:49:39Z" }, - { - "name": "Graylog2/graylog2-server", - "version": "6.2.0-rc.1", - "date": "2025-04-14T11:26:18Z" - }, { "name": "bluenviron/mediamtx", "version": "v1.12.0", @@ -329,21 +424,6 @@ "version": "v0.6.5", "date": "2025-04-14T09:13:36Z" }, - { - "name": "zwave-js/zwave-js-ui", - "version": "v10.2.0", - "date": "2025-04-14T08:53:44Z" - }, - { - "name": "evcc-io/evcc", - "version": "0.203.1", - "date": "2025-04-14T07:23:02Z" - }, - { - "name": "glanceapp/glance", - "version": "v0.7.12", - "date": "2025-04-14T00:16:15Z" - }, { "name": "rogerfar/rdt-client", "version": "v2.0.108", @@ -374,21 +454,6 @@ "version": "v2.10.3.4602", "date": "2025-03-23T11:00:37Z" }, - { - "name": "Readarr/Readarr", - "version": "v2.0.0.4645", - "date": "2017-03-07T18:56:06Z" - }, - { - "name": "Prowlarr/Prowlarr", - "version": "v1.33.3.5008", - "date": "2025-04-09T17:58:37Z" - }, - { - "name": "Radarr/Radarr", - "version": "v5.21.1.9799", - "date": "2025-03-24T15:52:12Z" - }, { "name": "Tautulli/Tautulli", "version": "v2.15.2", @@ -409,11 +474,6 @@ "version": "v5.5.2", "date": "2025-04-11T22:00:06Z" }, - { - "name": "emqx/emqx", - "version": "e5.9.0-beta.3", - "date": "2025-04-11T14:17:53Z" - }, { "name": "NLnetLabs/unbound", "version": "release-1.23.0rc2", @@ -433,35 +493,5 @@ "name": "gristlabs/grist-core", "version": "v1.5.1", "date": "2025-04-10T19:48:43Z" - }, - { - "name": "apache/cassandra", - "version": "cassandra-5.0.4", - "date": "2025-04-10T16:32:00Z" - }, - { - "name": "NodeBB/NodeBB", - "version": "v4.2.1", - "date": "2025-04-10T14:03:47Z" - }, - { - "name": "mongodb/mongo", - "version": "r8.0.5-rc2", - "date": "2025-04-09T22:37:52Z" - }, - { - "name": "jupyter/notebook", - "version": "v7.4.0", - "date": "2025-04-09T17:36:14Z" - }, - { - "name": "glpi-project/glpi", - "version": "10.0.18", - "date": "2025-02-12T11:07:02Z" - }, - { - "name": "zitadel/zitadel", - "version": "v2.69.10", - "date": "2025-04-09T12:16:51Z" } ] From baba828bdb9c1f93f0ea4d165a041ee0fa6cc95f Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 08:16:48 +0200 Subject: [PATCH 0587/1614] Add Zipline for testing --- ct/zipline.sh | 75 ++++++++++++++++++++++++++++++ install/zipline-install.sh | 93 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 168 insertions(+) create mode 100644 ct/zipline.sh create mode 100644 install/zipline-install.sh diff --git a/ct/zipline.sh b/ct/zipline.sh new file mode 100644 index 0000000..cdf634f --- /dev/null +++ b/ct/zipline.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 tteck +# Author: MickLesk (Canbiz) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://zipline.diced.sh/ + +APP="Zipline" +var_tags="${var_tags:-file;sharing}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-5}" +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 [[ ! -d /opt/zipline ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + if ! command -v pnpm &>/dev/null; then + msg_info "Installing pnpm" + #export NODE_OPTIONS=--openssl-legacy-provider + $STD npm install -g pnpm@latest + msg_ok "Installed pnpm" + fi + RELEASE=$(curl -fsSL https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping ${APP}" + systemctl stop zipline + msg_ok "${APP} Stopped" + + msg_info "Updating ${APP} to ${RELEASE}" + cp /opt/zipline/.env /opt/ + rm -R /opt/zipline + curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip") + unzip -q v${RELEASE}.zip + mv zipline-${RELEASE} /opt/zipline + cd /opt/zipline + mv /opt/.env /opt/zipline/.env + $STD pnpm install + $STD pnpm build + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP}" + + msg_info "Starting ${APP}" + systemctl start zipline + msg_ok "Started ${APP}" + + msg_info "Cleaning Up" + rm -rf v${RELEASE}.zip + msg_ok "Cleaned" + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + 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}:3000${CL}" diff --git a/install/zipline-install.sh b/install/zipline-install.sh new file mode 100644 index 0000000..c88958b --- /dev/null +++ b/install/zipline-install.sh @@ -0,0 +1,93 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/diced/zipline + +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 \ + postgresql \ + gpg +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g pnpm +msg_ok "Installed Node.js" + +msg_info "Setting up PostgreSQL" +DB_NAME=ziplinedb +DB_USER=zipline +DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" +SECRET_KEY="$(openssl rand -base64 42 | tr -dc 'a-zA-Z0-9')" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" +echo "" >>~/zipline.creds +echo -e "Zipline Database User: $DB_USER" >>~/zipline.creds +echo -e "Zipline Database Password: $DB_PASS" >>~/zipline.creds +echo -e "Zipline Database Name: $DB_NAME" >>~/zipline.creds +echo -e "Zipline Secret: $SECRET_KEY" >>~/zipline.creds +msg_ok "Set up PostgreSQL" + +msg_info "Installing Zipline (Patience)" +cd /opt +RELEASE=$(curl -fsSL https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip") +unzip -q v${RELEASE}.zip +mv zipline-${RELEASE} /opt/zipline +cd /opt/zipline +cat </opt/zipline/.env +DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME +CORE_SECRET=$SECRET_KEY +CORE_HOSTNAME=0.0.0.0 +CORE_PORT=3000 +CORE_RETURN_HTTPS=false +EOF +$STD pnpm install +$STD pnpm build +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed Zipline" + +msg_info "Creating Service" +cat </etc/systemd/system/zipline.service +[Unit] +Description=Zipline Service +After=network.target + +[Service] +WorkingDirectory=/opt/zipline +ExecStart=/usr/bin/pnpm start +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now zipline +msg_ok "Created Service" + +motd_ssh +customize +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 800c37de3acb8641d772b7f38372e594a72ddfc4 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 08:21:06 +0200 Subject: [PATCH 0588/1614] Rework Zipline --- ct/zipline.sh | 4 +++- install/zipline-install.sh | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ct/zipline.sh b/ct/zipline.sh index cdf634f..6adaed9 100644 --- a/ct/zipline.sh +++ b/ct/zipline.sh @@ -40,9 +40,11 @@ function update_script() { msg_info "Updating ${APP} to ${RELEASE}" cp /opt/zipline/.env /opt/ - rm -R /opt/zipline + mkdir -p /opt/zipline-updload + cp -R /opt/zipline/updload/* /opt/zipline-upload/ || true curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip") unzip -q v${RELEASE}.zip + rm -R /opt/zipline mv zipline-${RELEASE} /opt/zipline cd /opt/zipline mv /opt/.env /opt/zipline/.env diff --git a/install/zipline-install.sh b/install/zipline-install.sh index c88958b..58a6ab8 100644 --- a/install/zipline-install.sh +++ b/install/zipline-install.sh @@ -51,7 +51,8 @@ msg_ok "Set up PostgreSQL" msg_info "Installing Zipline (Patience)" cd /opt -RELEASE=$(curl -fsSL https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +#RELEASE=$(curl -fsSL https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE="3.7.13" curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip") unzip -q v${RELEASE}.zip mv zipline-${RELEASE} /opt/zipline @@ -62,6 +63,8 @@ CORE_SECRET=$SECRET_KEY CORE_HOSTNAME=0.0.0.0 CORE_PORT=3000 CORE_RETURN_HTTPS=false +DATASOURCE_TYPE=local +DATASOURCE_LOCAL_DIRECTORY=/opt/zipline-uploads EOF $STD pnpm install $STD pnpm build From 9de98548fef930617631fa3f4a2ff40750cb4ab0 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 23 Apr 2025 06:21:29 +0000 Subject: [PATCH 0589/1614] Update .app files --- ct/headers/zipline | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/zipline diff --git a/ct/headers/zipline b/ct/headers/zipline new file mode 100644 index 0000000..ce2b4b9 --- /dev/null +++ b/ct/headers/zipline @@ -0,0 +1,6 @@ + _____ _ ___ +/__ / (_)___ / (_)___ ___ + / / / / __ \/ / / __ \/ _ \ + / /__/ / /_/ / / / / / / __/ +/____/_/ .___/_/_/_/ /_/\___/ + /_/ From bc53e29f2772b9d37a373d5c35a34239d6b8dd70 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 23 Apr 2025 06:30:43 +0000 Subject: [PATCH 0590/1614] Deleted files for issue: Reactive-Resume --- ct/reactive-resume.sh | 106 ------------ frontend/public/json/reactive-resume.json | 34 ---- install/reactive-resume-install.sh | 190 ---------------------- 3 files changed, 330 deletions(-) delete mode 100644 ct/reactive-resume.sh delete mode 100644 frontend/public/json/reactive-resume.json delete mode 100644 install/reactive-resume-install.sh diff --git a/ct/reactive-resume.sh b/ct/reactive-resume.sh deleted file mode 100644 index 3032b69..0000000 --- a/ct/reactive-resume.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: vhsdream -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://rxresu.me - -APP="Reactive-Resume" -var_tags="${var_tags:-documents}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-3072}" -var_disk="${var_disk:-8}" -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/systemd/system/Reactive-Resume.service ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - RELEASE=$(curl -s https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - msg_info "Stopping services" - systemctl stop Reactive-Resume - msg_ok "Stopped services" - - msg_info "Updating $APP to v${RELEASE}" - cp /opt/${APP}/.env /opt/rxresume.env - res_tmp=$(mktemp) - rm -rf /opt/${APP} - curl -fsSL "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -O $res_tmp - unzip -q $res_tmp - mv ${APP}-${RELEASE}/ /opt/${APP} - cd /opt/${APP} - export PUPPETEER_SKIP_DOWNLOAD="true" - export NEXT_TELEMETRY_DISABLED=1 - export CI="true" - export NODE_ENV="production" - $STD pnpm install --frozen-lockfile - $STD pnpm run build - $STD pnpm run prisma:generate - mv /opt/rxresume.env /opt/${APP}/.env - msg_ok "Updated $APP to v${RELEASE}" - - msg_info "Updating Minio" - systemctl stop minio - cd /tmp - curl -fsSL https://dl.min.io/server/minio/release/linux-amd64/minio.deb -o minio.deb - $STD dpkg -i minio.deb - msg_ok "Updated Minio" - - msg_info "Updating Browserless (Patience)" - systemctl stop browserless - cp /opt/browserless/.env /opt/browserless.env - rm -rf browserless - brwsr_tmp=$(mktemp) - TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') - curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -O $brwsr_tmp - unzip -q $brwsr_tmp - mv browserless-${TAG}/ /opt/browserless - cd /opt/browserless - $STD npm install - rm -rf src/routes/{chrome,edge,firefox,webkit} - $STD node_modules/playwright-core/cli.js install --with-deps chromium - $STD npm run build - $STD npm run build:function - $STD npm prune production - mv /opt/browserless.env /opt/browserless/.env - msg_ok "Updated Browserless" - - msg_info "Restarting services" - systemctl start minio Reactive-Resume browserless - msg_ok "Restarted services" - - msg_info "Cleaning Up" - rm -f /tmp/minio.deb - rm -f $brwsr_tmp - rm -f $res_tmp - msg_ok "Cleanup Completed" - - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Update Successful" - else - msg_ok "No update required. ${APP} is already at v${RELEASE}" - 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}:3000${CL}" diff --git a/frontend/public/json/reactive-resume.json b/frontend/public/json/reactive-resume.json deleted file mode 100644 index 6bd3f8d..0000000 --- a/frontend/public/json/reactive-resume.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "Reactive Resume", - "slug": "reactive-resume", - "categories": [ - 12 - ], - "date_created": "2025-03-26", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 3000, - "documentation": "https://docs.rxresu.me/", - "website": "https://rxresu.me", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/reactive-resume-light.png", - "description": "A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever.", - "install_methods": [ - { - "type": "default", - "script": "ct/reactive-resume.sh", - "resources": { - "cpu": 2, - "ram": 3072, - "hdd": 8, - "os": "Debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [] -} diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh deleted file mode 100644 index f94299c..0000000 --- a/install/reactive-resume-install.sh +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: vhsdream -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://rxresu.me - -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 \ - gnupg \ - unzip \ - postgresql-common -msg_ok "Installed Dependencies" - -msg_info "Installing Additional Dependencies" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -echo "YES" | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh &>/dev/null -$STD apt-get install -y postgresql-16 nodejs -cd /tmp -curl -fsSL https://dl.min.io/server/minio/release/linux-amd64/minio.deb -o minio.deb -$STD dpkg -i minio.deb - -msg_info "Setting up Database" -DB_USER="rxresume" -DB_NAME="rxresume" -DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) -$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH ENCRYPTED PASSWORD '$DB_PASS';" -$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" -$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;" -$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" -msg_ok "Set up Database" - -msg_info "Installing ${APPLICATION}" -MINIO_PASS=$(openssl rand -base64 48) -ACCESS_TOKEN=$(openssl rand -base64 48) -REFRESH_TOKEN=$(openssl rand -base64 48) -CHROME_TOKEN=$(openssl rand -hex 32) -LOCAL_IP=$(hostname -I | awk '{print $1}') -TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') -RELEASE=$(curl -fsSL https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -o v${RELEASE}.zip -unzip -q v${RELEASE}.zip -mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION} -cd /opt/${APPLICATION} -corepack enable -export CI="true" -export PUPPETEER_SKIP_DOWNLOAD="true" -export NODE_ENV="production" -export NEXT_TELEMETRY_DISABLED=1 -$STD pnpm install --frozen-lockfile -$STD pnpm run build -$STD pnpm install --prod --frozen-lockfile -$STD pnpm run prisma:generate -msg_ok "Installed ${APPLICATION}" - -msg_info "Installing Browserless (Patience)" -cd /tmp -curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -o v${TAG}.zip -unzip -q v${TAG}.zip -mv browserless-${TAG} /opt/browserless -cd /opt/browserless -$STD npm install -rm -rf src/routes/{chrome,edge,firefox,webkit} -$STD node_modules/playwright-core/cli.js install --with-deps chromium -$STD npm run build -$STD npm run build:function -$STD npm prune production -msg_ok "Installed Browserless" - -msg_info "Configuring applications" -mkdir -p /opt/minio -cat </opt/minio/.env -MINIO_ROOT_USER="storageadmin" -MINIO_ROOT_PASSWORD="${MINIO_PASS}" -MINIO_VOLUMES=/opt/minio -MINIO_OPTS="--address :9000 --console-address 127.0.0.1:9001" -EOF -cat </opt/${APPLICATION}/.env -NODE_ENV=production -PORT=3000 -PUBLIC_URL=http://${LOCAL_IP}:3000 -STORAGE_URL=http://${LOCAL_IP}:9000/rxresume -DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}?schema=public -ACCESS_TOKEN_SECRET=${ACCESS_TOKEN} -REFRESH_TOKEN_SECRET=${REFRESH_TOKEN} -CHROME_PORT=8080 -CHROME_TOKEN=${CHROME_TOKEN} -CHROME_URL=ws://localhost:8080 -CHROME_IGNORE_HTTPS_ERRORS=true -MAIL_FROM=noreply@locahost -# SMTP_URL=smtp://username:password@smtp.server.mail:587 # -STORAGE_ENDPOINT=localhost -STORAGE_PORT=9000 -STORAGE_REGION=us-east-1 -STORAGE_BUCKET=rxresume -STORAGE_ACCESS_KEY=storageadmin -STORAGE_SECRET_KEY=${MINIO_PASS} -STORAGE_USE_SSL=false -STORAGE_SKIP_BUCKET_CHECK=false - -# GitHub (OAuth, Optional) -# GITHUB_CLIENT_ID= -# GITHUB_CLIENT_SECRET= -# GITHUB_CALLBACK_URL=http://localhost:5173/api/auth/github/callback - -# Google (OAuth, Optional) -# GOOGLE_CLIENT_ID= -# GOOGLE_CLIENT_SECRET= -# GOOGLE_CALLBACK_URL=http://localhost:5173/api/auth/google/callback -EOF -cat </opt/browserless/.env -DEBUG=browserless*,-**:verbose -HOST=localhost -PORT=8080 -TOKEN=${CHROME_TOKEN} -EOF -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -{ - echo "${APPLICATION} Credentials" - echo "Database User: $DB_USER" - echo "Database Password: $DB_PASS" - echo "Database Name: $DB_NAME" - echo "Minio Root Password: ${MINIO_PASS}" -} >>~/${APPLICATION}.creds -msg_ok "Configured applications" - -msg_info "Creating Services" -mkdir -p /etc/systemd/system/minio.service.d/ -cat </etc/systemd/system/minio.service.d/override.conf -[Service] -User=root -Group=root -WorkingDirectory=/usr/local/bin -EnvironmentFile=/opt/minio/.env -EOF - -cat </etc/systemd/system/${APPLICATION}.service -[Unit] -Description=${APPLICATION} Service -After=network.target postgresql.service minio.service -Wants=postgresql.service minio.service - -[Service] -WorkingDirectory=/opt/${APPLICATION} -EnvironmentFile=/opt/${APPLICATION}/.env -ExecStart=/usr/bin/pnpm run start -Restart=always - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/browserless.service -[Unit] -Description=Browserless service -After=network.target ${APPLICATION}.service - -[Service] -WorkingDirectory=/opt/browserless -EnvironmentFile=/opt/browserless/.env -ExecStart=/usr/bin/npm run start -Restart=unless-stopped - -[Install] -WantedBy=multi-user.target -EOF -systemctl daemon-reload -systemctl enable -q --now minio.service ${APPLICATION}.service browserless.service -msg_ok "Created Services" - -motd_ssh -customize - -msg_info "Cleaning up" -rm -f /tmp/v${RELEASE}.zip -rm -f /tmp/v${TAG}.zip -rm -f /tmp/minio.deb -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" From b9d8e0eb0df0ab5929f077c96707d5d199e3271b Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 08:42:25 +0200 Subject: [PATCH 0591/1614] Rework Zipline --- install/zipline-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/zipline-install.sh b/install/zipline-install.sh index 58a6ab8..cbd1d79 100644 --- a/install/zipline-install.sh +++ b/install/zipline-install.sh @@ -51,8 +51,7 @@ msg_ok "Set up PostgreSQL" msg_info "Installing Zipline (Patience)" cd /opt -#RELEASE=$(curl -fsSL https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -RELEASE="3.7.13" +RELEASE=$(curl -fsSL https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip") unzip -q v${RELEASE}.zip mv zipline-${RELEASE} /opt/zipline From b7c1a4987dc2ee66fc88abf03c87dcf6d3666cf3 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 08:47:29 +0200 Subject: [PATCH 0592/1614] Corosync in post-pve --- tools/pve/post-pve-install.sh | 257 ++++++++++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 tools/pve/post-pve-install.sh diff --git a/tools/pve/post-pve-install.sh b/tools/pve/post-pve-install.sh new file mode 100644 index 0000000..5afc3bd --- /dev/null +++ b/tools/pve/post-pve-install.sh @@ -0,0 +1,257 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +header_info() { + clear + cat <<"EOF" + ____ _ ________ ____ __ ____ __ ____ + / __ \ | / / ____/ / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / + / /_/ / | / / __/ / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ `/ / / + / ____/| |/ / /___ / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / +/_/ |___/_____/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ + +EOF +} + +RD=$(echo "\033[01;31m") +YW=$(echo "\033[33m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" + +set -euo pipefail +shopt -s inherit_errexit nullglob + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +start_routines() { + header_info + + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE server.\n \nCorrect Proxmox VE sources?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Correcting Proxmox VE Sources" + cat </etc/apt/sources.list +deb http://deb.debian.org/debian bookworm main contrib +deb http://deb.debian.org/debian bookworm-updates main contrib +deb http://security.debian.org/debian-security bookworm-security main contrib +EOF + echo 'APT::Get::Update::SourceListWarnings::NonFreeFirmware "false";' >/etc/apt/apt.conf.d/no-bookworm-firmware.conf + msg_ok "Corrected Proxmox VE Sources" + ;; + no) + msg_error "Selected no to Correcting Proxmox VE Sources" + ;; + esac + + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling 'pve-enterprise' repository" + cat </etc/apt/sources.list.d/pve-enterprise.list +# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise +EOF + msg_ok "Disabled 'pve-enterprise' repository" + ;; + no) + msg_error "Selected no to Disabling 'pve-enterprise' repository" + ;; + esac + + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVE-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Enabling 'pve-no-subscription' repository" + cat </etc/apt/sources.list.d/pve-install-repo.list +deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription +EOF + msg_ok "Enabled 'pve-no-subscription' repository" + ;; + no) + msg_error "Selected no to Enabling 'pve-no-subscription' repository" + ;; + esac + + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories (initially disabled).\n \nCorrect 'ceph package sources?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Correcting 'ceph package repositories'" + cat </etc/apt/sources.list.d/ceph.list +# deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise +# deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription +# deb https://enterprise.proxmox.com/debian/ceph-reef bookworm enterprise +# deb http://download.proxmox.com/debian/ceph-reef bookworm no-subscription +EOF + msg_ok "Corrected 'ceph package repositories'" + ;; + no) + msg_error "Selected no to Correcting 'ceph package repositories'" + ;; + esac + + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Adding 'pvetest' repository and set disabled" + cat </etc/apt/sources.list.d/pvetest-for-beta.list +# deb http://download.proxmox.com/debian/pve bookworm pvetest +EOF + msg_ok "Added 'pvetest' repository" + ;; + no) + msg_error "Selected no to Adding 'pvetest' repository" + ;; + esac + + if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 + msg_info "Disabling subscription nag" + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.*data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + apt --reinstall install proxmox-widget-toolkit &>/dev/null + msg_ok "Disabled subscription nag (Delete browser cache)" + ;; + no) + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 + msg_error "Selected no to Disabling subscription nag" + ;; + esac + fi + + if ! systemctl is-active --quiet pve-ha-lrm; then + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HIGH AVAILABILITY" --menu "Enable high availability?" 10 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Enabling high availability" + systemctl enable -q --now pve-ha-lrm + systemctl enable -q --now pve-ha-crm + systemctl enable -q --now corosync + msg_ok "Enabled high availability" + ;; + no) + msg_error "Selected no to Enabling high availability" + ;; + esac + fi + + if systemctl is-active --quiet pve-ha-lrm; then + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HIGH AVAILABILITY" --menu "If you plan to utilize a single node instead of a clustered environment, you can disable unnecessary high availability (HA) services, thus reclaiming system resources.\n\nIf HA becomes necessary at a later stage, the services can be re-enabled.\n\nDisable high availability?" 18 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling high availability" + systemctl disable -q --now pve-ha-lrm + systemctl disable -q --now pve-ha-crm + msg_ok "Disabled high availability" + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "COROSYNC" --menu "Disable Corosync for a Proxmox VE Cluster?" 10 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling Corosync" + systemctl disable -q --now corosync + msg_ok "Disabled Corosync" + ;; + no) + msg_error "Selected no to Disabling Corosync" + ;; + esac + ;; + no) + msg_error "Selected no to Disabling high availability" + ;; + esac + fi + + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --menu "\nUpdate Proxmox VE now?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Updating Proxmox VE (Patience)" + apt-get update &>/dev/null + apt-get -y dist-upgrade &>/dev/null + msg_ok "Updated Proxmox VE" + ;; + no) + msg_error "Selected no to Updating Proxmox VE" + ;; + esac + + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "REBOOT" --menu "\nReboot Proxmox VE now? (recommended)" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Rebooting Proxmox VE" + sleep 2 + msg_ok "Completed Post Install Routines" + reboot + ;; + no) + msg_error "Selected no to Rebooting Proxmox VE (Reboot recommended)" + msg_ok "Completed Post Install Routines" + ;; + esac +} + +header_info +echo -e "\nThis script will Perform Post Install Routines.\n" +while true; do + read -p "Start the Proxmox VE Post Install Script (y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) + clear + exit + ;; + *) echo "Please answer yes or no." ;; + esac +done + +if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires Proxmox Virtual Environment Version 8.0 or later." + echo -e "Exiting..." + sleep 2 + exit +fi + +start_routines From d5fd2f1fbf437d4679a4b1a99808d84e68549cf1 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 09:13:23 +0200 Subject: [PATCH 0593/1614] Test workflow --- .github/workflows/close-discussion.yaml | 157 ++++++++++++++++++++++++ ct/zipline.sh | 2 +- 2 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/close-discussion.yaml diff --git a/.github/workflows/close-discussion.yaml b/.github/workflows/close-discussion.yaml new file mode 100644 index 0000000..5511f6a --- /dev/null +++ b/.github/workflows/close-discussion.yaml @@ -0,0 +1,157 @@ +name: Close Discussion on PR Merge + +on: + push: + branches: + - main + +permissions: + contents: read + discussions: write + +jobs: + close-discussion: + runs-on: runner-cluster-htl-set + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set Up Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install Dependencies + run: npm install zx @octokit/graphql + + - name: Close Discussion + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_SHA: ${{ github.sha }} + GITHUB_REPOSITORY: ${{ github.repository }} + run: | + npx zx << 'EOF' + import { graphql } from "@octokit/graphql"; + + (async function () { + try { + const token = process.env.GITHUB_TOKEN; + const commitSha = process.env.GITHUB_SHA; + const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/"); + + if (!token || !commitSha || !owner || !repo) { + console.log("Missing required environment variables."); + process.exit(1); + } + + const graphqlWithAuth = graphql.defaults({ + headers: { authorization: `Bearer ${token}` }, + }); + + // Find PR from commit SHA + const searchQuery = ` + query($owner: String!, $repo: String!, $sha: GitObjectID!) { + repository(owner: $owner, name: $repo) { + object(oid: $sha) { + ... on Commit { + associatedPullRequests(first: 1) { + nodes { + number + body + } + } + } + } + } + } + `; + + const prResult = await graphqlWithAuth(searchQuery, { + owner, + repo, + sha: commitSha, + }); + + const pr = prResult.repository.object.associatedPullRequests.nodes[0]; + if (!pr) { + console.log("No PR found for this commit."); + return; + } + + const prNumber = pr.number; + const prBody = pr.body; + + const match = prBody.match(/#(\d+)/); + if (!match) { + console.log("No discussion ID found in PR body."); + return; + } + + const discussionNumber = match[1]; + console.log(`Extracted Discussion Number: ${discussionNumber}`); + + // Fetch GraphQL discussion ID + const discussionQuery = ` + query($owner: String!, $repo: String!, $number: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $number) { + id + } + } + } + `; + + const discussionResponse = await graphqlWithAuth(discussionQuery, { + owner, + repo, + number: parseInt(discussionNumber, 10), + }); + + const discussionQLId = discussionResponse.repository.discussion.id; + if (!discussionQLId) { + console.log("Failed to fetch discussion GraphQL ID."); + return; + } + + // Post comment + const commentMutation = ` + mutation($discussionId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $discussionId, body: $body }) { + comment { id body } + } + } + `; + + const commentResponse = await graphqlWithAuth(commentMutation, { + discussionId: discussionQLId, + body: `Merged with PR #${prNumber}`, + }); + + const commentId = commentResponse.addDiscussionComment.comment.id; + if (!commentId) { + console.log("Failed to post the comment."); + return; + } + + console.log(`Comment Posted Successfully! Comment ID: ${commentId}`); + + // Mark comment as answer + const markAnswerMutation = ` + mutation($id: ID!) { + markDiscussionCommentAsAnswer(input: { id: $id }) { + discussion { id title } + } + } + `; + + await graphqlWithAuth(markAnswerMutation, { id: commentId }); + + console.log("Comment marked as answer successfully!"); + + } catch (error) { + console.error("Error:", error); + process.exit(1); + } + })(); + EOF diff --git a/ct/zipline.sh b/ct/zipline.sh index 6adaed9..dbc3b3c 100644 --- a/ct/zipline.sh +++ b/ct/zipline.sh @@ -41,7 +41,7 @@ function update_script() { msg_info "Updating ${APP} to ${RELEASE}" cp /opt/zipline/.env /opt/ mkdir -p /opt/zipline-updload - cp -R /opt/zipline/updload/* /opt/zipline-upload/ || true + $STD cp -R /opt/zipline/updload/* /opt/zipline-upload/ || true curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip") unzip -q v${RELEASE}.zip rm -R /opt/zipline From b651438f06c6dea1127c648d493b3bd0dadcb260 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Wed, 23 Apr 2025 09:14:22 +0200 Subject: [PATCH 0594/1614] Create test_wf.sh --- ct/test_wf.sh | 1 + 1 file changed, 1 insertion(+) create mode 100644 ct/test_wf.sh diff --git a/ct/test_wf.sh b/ct/test_wf.sh new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ct/test_wf.sh @@ -0,0 +1 @@ + From 79ec35677a1ef0d40db28bca220f5548e07e88d7 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 09:18:03 +0200 Subject: [PATCH 0595/1614] Change runner --- .github/workflows/close-discussion.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/close-discussion.yaml b/.github/workflows/close-discussion.yaml index 5511f6a..5d17e9e 100644 --- a/.github/workflows/close-discussion.yaml +++ b/.github/workflows/close-discussion.yaml @@ -11,7 +11,7 @@ permissions: jobs: close-discussion: - runs-on: runner-cluster-htl-set + runs-on: ubuntu-latest steps: - name: Checkout Repository From 71830e02622ccb65ddee0445fd61f5ff2bb1d888 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 23 Apr 2025 07:21:25 +0000 Subject: [PATCH 0596/1614] Update .app files --- ct/headers/reactive-resume | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/reactive-resume diff --git a/ct/headers/reactive-resume b/ct/headers/reactive-resume deleted file mode 100644 index e897791..0000000 --- a/ct/headers/reactive-resume +++ /dev/null @@ -1,6 +0,0 @@ - ____ __ _ ____ - / __ \___ ____ ______/ /_(_) _____ / __ \___ _______ ______ ___ ___ - / /_/ / _ \/ __ `/ ___/ __/ / | / / _ \______/ /_/ / _ \/ ___/ / / / __ `__ \/ _ \ - / _, _/ __/ /_/ / /__/ /_/ /| |/ / __/_____/ _, _/ __(__ ) /_/ / / / / / / __/ -/_/ |_|\___/\__,_/\___/\__/_/ |___/\___/ /_/ |_|\___/____/\__,_/_/ /_/ /_/\___/ - From 7ac2c267596ee19ec5c9e4af8cb0fdff79dd1ee4 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 09:24:39 +0200 Subject: [PATCH 0597/1614] Further WF improvements --- .github/workflows/close-discussion.yaml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/close-discussion.yaml b/.github/workflows/close-discussion.yaml index 5d17e9e..80a3f50 100644 --- a/.github/workflows/close-discussion.yaml +++ b/.github/workflows/close-discussion.yaml @@ -102,15 +102,21 @@ jobs: } `; - const discussionResponse = await graphqlWithAuth(discussionQuery, { - owner, - repo, - number: parseInt(discussionNumber, 10), - }); + // + try { + const discussionResponse = await graphqlWithAuth(discussionQuery, { + owner, + repo, + number: parseInt(discussionNumber, 10), + }); - const discussionQLId = discussionResponse.repository.discussion.id; - if (!discussionQLId) { - console.log("Failed to fetch discussion GraphQL ID."); + const discussionQLId = discussionResponse.repository.discussion.id; + if (!discussionQLId) { + console.log("Failed to fetch discussion GraphQL ID."); + return; + } + } catch (error) { + console.error("Discussion not found or error occurred while fetching discussion:", error); return; } From 1b8fd7daccab215c1f0056cf0de5bb06264fb679 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Wed, 23 Apr 2025 09:25:22 +0200 Subject: [PATCH 0598/1614] Delete ct/test_wf.sh --- ct/test_wf.sh | 1 - 1 file changed, 1 deletion(-) delete mode 100644 ct/test_wf.sh diff --git a/ct/test_wf.sh b/ct/test_wf.sh deleted file mode 100644 index 8b13789..0000000 --- a/ct/test_wf.sh +++ /dev/null @@ -1 +0,0 @@ - From 79fd16a339571af27f2bcb5d53b7c40d0210e4a0 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 13:59:22 +0200 Subject: [PATCH 0599/1614] introduce config path to json --- frontend/public/json/librenms.json | 3 ++- frontend/src/app/json-editor/_schemas/schemas.ts | 1 + frontend/src/app/json-editor/page.tsx | 9 +++++++++ .../src/app/scripts/_components/ScriptItem.tsx | 14 ++++++++++++++ .../scripts/_components/ScriptItems/ConfigFile.tsx | 10 ++++++++++ frontend/src/lib/types.ts | 1 + 6 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 frontend/src/app/scripts/_components/ScriptItems/ConfigFile.tsx diff --git a/frontend/public/json/librenms.json b/frontend/public/json/librenms.json index ed854fe..0ac6c49 100644 --- a/frontend/public/json/librenms.json +++ b/frontend/public/json/librenms.json @@ -9,6 +9,7 @@ "updateable": false, "privileged": false, "interface_port": 80, + "config_path": "/opt/librenms/config.php", "documentation": "https://docs.librenms.org/", "website": "https://librenms.org/", "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/librenms.svg", @@ -31,4 +32,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/frontend/src/app/json-editor/_schemas/schemas.ts b/frontend/src/app/json-editor/_schemas/schemas.ts index 9ffe8f3..a35da4e 100644 --- a/frontend/src/app/json-editor/_schemas/schemas.ts +++ b/frontend/src/app/json-editor/_schemas/schemas.ts @@ -34,6 +34,7 @@ export const ScriptSchema = z.object({ website: z.string().url().nullable(), logo: z.string().url().nullable(), description: z.string().min(1, "Description is required"), + config_path: z.string(), install_methods: z.array(InstallMethodSchema).min(1, "At least one install method is required"), default_credentials: z.object({ username: z.string().nullable(), diff --git a/frontend/src/app/json-editor/page.tsx b/frontend/src/app/json-editor/page.tsx index 1789b0a..9354896 100644 --- a/frontend/src/app/json-editor/page.tsx +++ b/frontend/src/app/json-editor/page.tsx @@ -32,6 +32,7 @@ const initialScript: Script = { privileged: false, interface_port: null, documentation: null, + config_path: "", website: null, logo: null, description: "", @@ -184,6 +185,14 @@ export default function JSONGenerator() { onChange={(e) => updateScript("description", e.target.value)} />
+
+ + updateScript("config_path", e.target.value || null)} + /> +
diff --git a/frontend/src/app/scripts/_components/ScriptItem.tsx b/frontend/src/app/scripts/_components/ScriptItem.tsx index 7a2ba6d..d00dd90 100644 --- a/frontend/src/app/scripts/_components/ScriptItem.tsx +++ b/frontend/src/app/scripts/_components/ScriptItem.tsx @@ -18,9 +18,11 @@ import Buttons from "./ScriptItems/Buttons"; import DefaultPassword from "./ScriptItems/DefaultPassword"; import Description from "./ScriptItems/Description"; import InstallCommand from "./ScriptItems/InstallCommand"; +import ConfigFile from "./ScriptItems/ConfigFile"; import InterFaces from "./ScriptItems/InterFaces"; import Tooltips from "./ScriptItems/Tooltips"; + interface ScriptItemProps { item: Script; setSelectedScript: (script: string | null) => void; @@ -141,6 +143,7 @@ export function ScriptItem({ item, setSelectedScript }: ScriptItemProps) {
+

How to {item.type === "pve" ? "use" : item.type === "addon" ? "apply" : "install"} @@ -151,6 +154,17 @@ export function ScriptItem({ item, setSelectedScript }: ScriptItemProps) {
+ +
+

+ Location of config file +

+
+ +
+ +
+

diff --git a/frontend/src/app/scripts/_components/ScriptItems/ConfigFile.tsx b/frontend/src/app/scripts/_components/ScriptItems/ConfigFile.tsx new file mode 100644 index 0000000..c484aa5 --- /dev/null +++ b/frontend/src/app/scripts/_components/ScriptItems/ConfigFile.tsx @@ -0,0 +1,10 @@ +import CodeCopyButton from "@/components/ui/code-copy-button"; +import { Script } from "@/lib/types"; + +export default function ConfigFile({ item }: { item: Script }) { + return ( +
+ {item.config_path ? item.config_path : "No config path set"} +
+ ); +} diff --git a/frontend/src/lib/types.ts b/frontend/src/lib/types.ts index b6aa20b..dcf235b 100644 --- a/frontend/src/lib/types.ts +++ b/frontend/src/lib/types.ts @@ -13,6 +13,7 @@ export type Script = { website: string | null; logo: string | null; description: string; + config_path: string | null; install_methods: { type: "default" | "alpine"; script: string; From d7e09467eece495f38512868eabc0bfb606c9a91 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 14:08:51 +0200 Subject: [PATCH 0600/1614] Change Json --- frontend/public/json/add-iptag.json | 2 ++ frontend/public/json/alpine-rclone.json | 2 ++ frontend/public/json/documenso.json | 2 ++ frontend/public/json/freepbx.json | 2 ++ frontend/public/json/fumadocs.json | 3 ++- frontend/public/json/immich.json | 2 ++ frontend/public/json/librenms.json | 2 ++ frontend/public/json/manyfold.json | 2 ++ frontend/public/json/metadata.json | 1 + frontend/public/json/openproject.json | 2 ++ frontend/public/json/polaris.json | 3 ++- frontend/public/json/umlautadaptarr.json | 1 + frontend/public/json/versions.json | 1 + 13 files changed, 23 insertions(+), 2 deletions(-) diff --git a/frontend/public/json/add-iptag.json b/frontend/public/json/add-iptag.json index fbfe279..da84c85 100644 --- a/frontend/public/json/add-iptag.json +++ b/frontend/public/json/add-iptag.json @@ -12,6 +12,7 @@ "documentation": null, "website": null, "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/proxmox.svg", + "config_path": "", "description": "This script automatically adds IP address as tags to LXC containers using a Systemd service. The service also updates the tags if a LXC IP address is changed.", "install_methods": [ { @@ -45,3 +46,4 @@ } ] } + diff --git a/frontend/public/json/alpine-rclone.json b/frontend/public/json/alpine-rclone.json index 2bd2b85..23d8992 100644 --- a/frontend/public/json/alpine-rclone.json +++ b/frontend/public/json/alpine-rclone.json @@ -12,6 +12,7 @@ "documentation": "https://rclone.org/docs/", "website": "https://rclone.org/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/rclone.svg", + "config_path": "", "description": "Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces", "install_methods": [ { @@ -52,3 +53,4 @@ } ] } + diff --git a/frontend/public/json/documenso.json b/frontend/public/json/documenso.json index 4a44fb3..569ba93 100644 --- a/frontend/public/json/documenso.json +++ b/frontend/public/json/documenso.json @@ -12,6 +12,7 @@ "documentation": "https://documenso.com/", "website": "https://documenso.com/", "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/documenso.svg", + "config_path": "", "description": "Signing documents digitally should be fast and easy and should be the best practice for every document signed worldwide. This is technically quite easy today, but it also introduces a new party to every signature: The signing tool providers. While this is not a problem in itself, it should make us think about how we want these providers of trust to work. Documenso aims to be the world's most trusted document-signing tool. This trust is built by empowering you to self-host Documenso and review how it works under the hood.", "install_methods": [ { @@ -32,3 +33,4 @@ }, "notes": [] } + diff --git a/frontend/public/json/freepbx.json b/frontend/public/json/freepbx.json index 0b01f73..90208f6 100644 --- a/frontend/public/json/freepbx.json +++ b/frontend/public/json/freepbx.json @@ -12,6 +12,7 @@ "documentation": "https://sangomakb.atlassian.net/wiki/spaces/FP/overview?homepageId=8454359", "website": "https://www.freepbx.org/", "logo": "https://avatars.githubusercontent.com/u/696423?s=200&v=4", + "config_path": "", "description": "FreePBX is a web-based open-source graphical user interface that manages Asterisk, a voice over IP and telephony server.", "install_methods": [ { @@ -32,3 +33,4 @@ }, "notes": [] } + diff --git a/frontend/public/json/fumadocs.json b/frontend/public/json/fumadocs.json index 59d73df..69376b4 100644 --- a/frontend/public/json/fumadocs.json +++ b/frontend/public/json/fumadocs.json @@ -12,6 +12,7 @@ "documentation": "https://fumadocs.vercel.app/docs/ui", "website": "https://fumadocs.vercel.app/", "logo": "https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/dev/documents/logo.png", + "config_path": "", "description": "Fumadocs is a flexible and high-performance framework for creating well-structured documentation websites using Next.js. It allows developers to write content and transform it into structured data. Fumadocs supports various content sources, including MDX and Content Collections, and integrates search solutions like Orama and Algolia. It also provides interactive components to enhance the user experience.", "install_methods": [ { @@ -31,4 +32,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/frontend/public/json/immich.json b/frontend/public/json/immich.json index ca884a3..37ae168 100644 --- a/frontend/public/json/immich.json +++ b/frontend/public/json/immich.json @@ -12,6 +12,7 @@ "documentation": "https://immich.app/docs/overview/introduction", "website": "https://immich.app", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/immich.png", + "config_path": "", "description": "High performance self-hosted photo and video management solution.", "install_methods": [ { @@ -41,3 +42,4 @@ } ] } + diff --git a/frontend/public/json/librenms.json b/frontend/public/json/librenms.json index 0ac6c49..d59cdc1 100644 --- a/frontend/public/json/librenms.json +++ b/frontend/public/json/librenms.json @@ -13,6 +13,7 @@ "documentation": "https://docs.librenms.org/", "website": "https://librenms.org/", "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/librenms.svg", + "config_path": "", "description": "LibreNMS is an open-source, community-driven network monitoring system that provides automatic discovery, alerting, and performance tracking for network devices. It supports a wide range of hardware and integrates with various notification and logging platforms.", "install_methods": [ { @@ -33,3 +34,4 @@ }, "notes": [] } + diff --git a/frontend/public/json/manyfold.json b/frontend/public/json/manyfold.json index b8241f3..512963b 100644 --- a/frontend/public/json/manyfold.json +++ b/frontend/public/json/manyfold.json @@ -12,6 +12,7 @@ "documentation": "https://manyfold.app/sysadmin/", "website": "https://manyfold.app/", "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/webp/manyfold.webp", + "config_path": "", "description": "Manyfold is an open source, self-hosted web application for managing a collection of 3d models, particularly focused on 3d printing.", "install_methods": [ { @@ -32,3 +33,4 @@ }, "notes": [] } + diff --git a/frontend/public/json/metadata.json b/frontend/public/json/metadata.json index e25f0ee..16c7122 100644 --- a/frontend/public/json/metadata.json +++ b/frontend/public/json/metadata.json @@ -28,3 +28,4 @@ { "name": "Miscellaneous", "id": 0, "sort_order": 99.0, "description": "General scripts and tools that don't fit into other categories." } ] } + diff --git a/frontend/public/json/openproject.json b/frontend/public/json/openproject.json index b697b13..cd27f6c 100644 --- a/frontend/public/json/openproject.json +++ b/frontend/public/json/openproject.json @@ -12,6 +12,7 @@ "documentation": "https://www.openproject.org", "website": "https://www.openproject.org", "logo": "https://raw.githubusercontent.com/opf/openproject/dev/docker/prod/logo.png", + "config_path": "", "description": "OpenProject is a web-based project management software. Use OpenProject to manage your projects, tasks and goals. Collaborate via work packages and link them to your pull requests on Github. Read more about the OpenProject GitHub integration.", "install_methods": [ { @@ -32,3 +33,4 @@ }, "notes": [] } + diff --git a/frontend/public/json/polaris.json b/frontend/public/json/polaris.json index d63a432..908d868 100644 --- a/frontend/public/json/polaris.json +++ b/frontend/public/json/polaris.json @@ -12,6 +12,7 @@ "documentation": "https://github.com/agersant/polaris/blob/master/docs/SETUP.md", "website": "https://github.com/agersant/polaris", "logo": "https://raw.githubusercontent.com/agersant/polaris/refs/heads/master/res/branding/logo/sticker_print.svg", + "config_path": "", "description": "Polaris is a self-hosted music streaming server that allows you to enjoy your personal music collection from any computer or mobile device. It is a free and open-source application with no premium version. Polaris is highly performant and responsive, supporting large music libraries with over 100,000 tracks. It features an intuitive user interface and supports various audio formats, including FLAC, MP3, MP4, OGG, and WAV. There is an Android client available through the Google Play Store, F-Droid, or GitHub Releases.", "install_methods": [ { @@ -31,4 +32,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/frontend/public/json/umlautadaptarr.json b/frontend/public/json/umlautadaptarr.json index 0b8c927..cb600fd 100644 --- a/frontend/public/json/umlautadaptarr.json +++ b/frontend/public/json/umlautadaptarr.json @@ -32,3 +32,4 @@ }, "notes": [] } + diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 2b484c5..b180f5a 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -495,3 +495,4 @@ "date": "2025-04-10T19:48:43Z" } ] + From 49891bc0dc9f9a3ea9dd91ffa219141b531fb24a Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 14:10:40 +0200 Subject: [PATCH 0601/1614] Change Json --- frontend/public/json/alpine-rclone.json | 2 +- frontend/public/json/fumadocs.json | 2 +- frontend/public/json/immich.json | 2 +- frontend/public/json/librenms.json | 3 +-- frontend/public/json/openproject.json | 2 +- frontend/public/json/polaris.json | 2 +- frontend/public/json/umlautadaptarr.json | 1 + 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/public/json/alpine-rclone.json b/frontend/public/json/alpine-rclone.json index 23d8992..d017010 100644 --- a/frontend/public/json/alpine-rclone.json +++ b/frontend/public/json/alpine-rclone.json @@ -12,7 +12,7 @@ "documentation": "https://rclone.org/docs/", "website": "https://rclone.org/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/rclone.svg", - "config_path": "", + "config_path": "", "description": "Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces", "install_methods": [ { diff --git a/frontend/public/json/fumadocs.json b/frontend/public/json/fumadocs.json index 69376b4..ab20ffe 100644 --- a/frontend/public/json/fumadocs.json +++ b/frontend/public/json/fumadocs.json @@ -12,7 +12,7 @@ "documentation": "https://fumadocs.vercel.app/docs/ui", "website": "https://fumadocs.vercel.app/", "logo": "https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/dev/documents/logo.png", - "config_path": "", + "config_path": "", "description": "Fumadocs is a flexible and high-performance framework for creating well-structured documentation websites using Next.js. It allows developers to write content and transform it into structured data. Fumadocs supports various content sources, including MDX and Content Collections, and integrates search solutions like Orama and Algolia. It also provides interactive components to enhance the user experience.", "install_methods": [ { diff --git a/frontend/public/json/immich.json b/frontend/public/json/immich.json index 37ae168..5253587 100644 --- a/frontend/public/json/immich.json +++ b/frontend/public/json/immich.json @@ -12,7 +12,7 @@ "documentation": "https://immich.app/docs/overview/introduction", "website": "https://immich.app", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/immich.png", - "config_path": "", + "config_path": "", "description": "High performance self-hosted photo and video management solution.", "install_methods": [ { diff --git a/frontend/public/json/librenms.json b/frontend/public/json/librenms.json index d59cdc1..4848ba0 100644 --- a/frontend/public/json/librenms.json +++ b/frontend/public/json/librenms.json @@ -9,11 +9,10 @@ "updateable": false, "privileged": false, "interface_port": 80, - "config_path": "/opt/librenms/config.php", "documentation": "https://docs.librenms.org/", "website": "https://librenms.org/", "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/librenms.svg", - "config_path": "", + "config_path": "/opt/librenms/config.php", "description": "LibreNMS is an open-source, community-driven network monitoring system that provides automatic discovery, alerting, and performance tracking for network devices. It supports a wide range of hardware and integrates with various notification and logging platforms.", "install_methods": [ { diff --git a/frontend/public/json/openproject.json b/frontend/public/json/openproject.json index cd27f6c..39e26f1 100644 --- a/frontend/public/json/openproject.json +++ b/frontend/public/json/openproject.json @@ -12,7 +12,7 @@ "documentation": "https://www.openproject.org", "website": "https://www.openproject.org", "logo": "https://raw.githubusercontent.com/opf/openproject/dev/docker/prod/logo.png", - "config_path": "", + "config_path": "", "description": "OpenProject is a web-based project management software. Use OpenProject to manage your projects, tasks and goals. Collaborate via work packages and link them to your pull requests on Github. Read more about the OpenProject GitHub integration.", "install_methods": [ { diff --git a/frontend/public/json/polaris.json b/frontend/public/json/polaris.json index 908d868..11edceb 100644 --- a/frontend/public/json/polaris.json +++ b/frontend/public/json/polaris.json @@ -12,7 +12,7 @@ "documentation": "https://github.com/agersant/polaris/blob/master/docs/SETUP.md", "website": "https://github.com/agersant/polaris", "logo": "https://raw.githubusercontent.com/agersant/polaris/refs/heads/master/res/branding/logo/sticker_print.svg", - "config_path": "", + "config_path": "", "description": "Polaris is a self-hosted music streaming server that allows you to enjoy your personal music collection from any computer or mobile device. It is a free and open-source application with no premium version. Polaris is highly performant and responsive, supporting large music libraries with over 100,000 tracks. It features an intuitive user interface and supports various audio formats, including FLAC, MP3, MP4, OGG, and WAV. There is an Android client available through the Google Play Store, F-Droid, or GitHub Releases.", "install_methods": [ { diff --git a/frontend/public/json/umlautadaptarr.json b/frontend/public/json/umlautadaptarr.json index cb600fd..c432b91 100644 --- a/frontend/public/json/umlautadaptarr.json +++ b/frontend/public/json/umlautadaptarr.json @@ -12,6 +12,7 @@ "documentation": null, "website": "https://github.com/PCJones/UmlautAdaptarr", "logo": null, + "config_path": "", "description": "A tool to work around Sonarr, Radarr, Lidarr and Readarrs problems with foreign languages", "install_methods": [ { From 577ec126dfc6354f829a7de223d76b5a3d6fd809 Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Wed, 23 Apr 2025 12:38:14 +0000 Subject: [PATCH 0602/1614] Update versions.json --- frontend/public/json/versions.json | 135 ++++++++++++++--------------- 1 file changed, 67 insertions(+), 68 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index b180f5a..46f4d20 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,4 +1,69 @@ [ + { + "name": "keycloak/keycloak", + "version": "26.2.1", + "date": "2025-04-23T12:17:17Z" + }, + { + "name": "redis/redis", + "version": "7.4.3", + "date": "2025-04-23T12:00:04Z" + }, + { + "name": "donaldzou/WGDashboard", + "version": "v4.2.1", + "date": "2025-04-23T11:42:05Z" + }, + { + "name": "Graylog2/graylog2-server", + "version": "6.3.0-alpha.1", + "date": "2025-04-23T11:25:55Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-23T10:36:12Z" + }, + { + "name": "nzbgetcom/nzbget", + "version": "v24.8", + "date": "2025-03-18T07:33:51Z" + }, + { + "name": "cockpit-project/cockpit", + "version": "337", + "date": "2025-04-23T08:26:31Z" + }, + { + "name": "mattermost/mattermost", + "version": "v10.6.2", + "date": "2025-04-15T08:14:23Z" + }, + { + "name": "zabbix/zabbix", + "version": "7.2.6", + "date": "2025-04-23T08:06:23Z" + }, + { + "name": "jupyter/notebook", + "version": "v7.4.1", + "date": "2025-04-23T06:40:34Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1815", + "date": "2025-04-23T05:56:23Z" + }, + { + "name": "openobserve/openobserve", + "version": "v0.14.6-rc6", + "date": "2025-04-23T04:24:27Z" + }, + { + "name": "jhuckaby/Cronicle", + "version": "v0.9.78", + "date": "2025-04-23T01:38:28Z" + }, { "name": "grafana/grafana", "version": "v11.3.6", @@ -24,26 +89,11 @@ "version": "v0.7.13", "date": "2025-04-22T22:19:16Z" }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-22T20:30:58Z" - }, { "name": "netbox-community/netbox", "version": "v4.2.8", "date": "2025-04-22T19:44:49Z" }, - { - "name": "keycloak/keycloak", - "version": "26.2.0", - "date": "2025-04-11T12:48:27Z" - }, - { - "name": "donaldzou/WGDashboard", - "version": "v4.2.0", - "date": "2025-04-22T18:18:28Z" - }, { "name": "n8n-io/n8n", "version": "n8n@1.90.0", @@ -94,36 +144,11 @@ "version": "v1.20.0-victorialogs", "date": "2025-04-22T12:00:23Z" }, - { - "name": "zabbix/zabbix", - "version": "7.0.12", - "date": "2025-04-22T11:40:31Z" - }, - { - "name": "Graylog2/graylog2-server", - "version": "6.2.0-rc.2", - "date": "2025-04-22T11:35:32Z" - }, { "name": "OctoPrint/OctoPrint", "version": "1.11.0", "date": "2025-04-22T09:33:46Z" }, - { - "name": "nzbgetcom/nzbget", - "version": "v24.8", - "date": "2025-03-18T07:33:51Z" - }, - { - "name": "openobserve/openobserve", - "version": "v0.14.6-rc5", - "date": "2025-04-22T06:50:13Z" - }, - { - "name": "mattermost/mattermost", - "version": "v10.6.2", - "date": "2025-04-15T08:14:23Z" - }, { "name": "morpheus65535/bazarr", "version": "v1.5.1", @@ -134,11 +159,6 @@ "version": "v6.2.12", "date": "2025-04-20T19:22:17Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1809", - "date": "2025-04-22T05:55:35Z" - }, { "name": "monicahq/monica", "version": "v4.1.2", @@ -161,8 +181,8 @@ }, { "name": "runtipi/runtipi", - "version": "nightly", - "date": "2025-04-21T16:55:50Z" + "version": "v3.10.0-beta.9", + "date": "2025-04-17T11:46:08Z" }, { "name": "Prowlarr/Prowlarr", @@ -473,26 +493,5 @@ "name": "Bubka/2FAuth", "version": "v5.5.2", "date": "2025-04-11T22:00:06Z" - }, - { - "name": "NLnetLabs/unbound", - "version": "release-1.23.0rc2", - "date": "2025-04-11T13:24:25Z" - }, - { - "name": "sabnzbd/sabnzbd", - "version": "4.5.1", - "date": "2025-04-11T09:57:47Z" - }, - { - "name": "outline/outline", - "version": "v0.83.0", - "date": "2025-04-11T03:53:10Z" - }, - { - "name": "gristlabs/grist-core", - "version": "v1.5.1", - "date": "2025-04-10T19:48:43Z" } ] - From e5ee17809a084e2c8833246e045631cf326bfd2b Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 15:26:41 +0200 Subject: [PATCH 0603/1614] Changes according to mick --- install/librenms-install.sh | 50 +++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/install/librenms-install.sh b/install/librenms-install.sh index f215164..dc5119b 100644 --- a/install/librenms-install.sh +++ b/install/librenms-install.sh @@ -15,12 +15,8 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - sudo \ - curl \ - mc \ lsb-release \ ca-certificates \ - wget \ acl \ fping \ graphviz \ @@ -28,22 +24,44 @@ $STD apt-get install -y \ mariadb-client \ mariadb-server \ mtr-tiny \ - nginx-full \ + nginx \ nmap \ - php8.2-{cli,fpm,gd,gmp,mbstring,mysql,snmp,xml,zip,curl} \ - python3-{dotenv,pymysql,redis,setuptools,systemd,pip} \ rrdtool \ snmp \ snmpd \ - unzip \ git \ whois msg_ok "Installed Dependencies" +msg_info "Installing PHP" +$STD apt-get install -y \ + php8.2-{cli,fpm,gd,gmp,mbstring,mysql,snmp,xml,zip,curl} +msg_ok "Installed PHP" + +msg_info "Installing Python" +$STD apt-get install -y \ + python3-{dotenv,pymysql,redis,setuptools,systemd,pip} +msg_ok "Installed Python" + msg_info "Add User" $STD useradd librenms -d /opt/librenms -M -r -s "$(which bash)" msg_ok "Add User" +msg_info "Configuring Database" +DB_NAME=librenms +DB_USER=librenms +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +mariadb -u root -e "CREATE DATABASE $DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" +mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" +mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +{ + echo "LibreNMS-Credentials" + echo "LibreNMS Database User: $DB_USER" + echo "LibreNMS Database Password: $DB_PASS" + echo "LibreNMS Database Name: $DB_NAME" +} >>~/librenms.creds +msg_ok "Configured Database" + msg_info "Setup Librenms" tmp_file=$(mktemp) RELEASE=$(curl -s https://api.github.com/repos/librenms/librenms/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') @@ -77,22 +95,6 @@ sed -i '/\[mysqld\]/a innodb_file_per_table=1\nlower_case_table_names=0' /etc/my systemctl enable -q --now mariadb msg_ok "Setup MariaDB" -msg_info "Configuring Database" -DB_NAME=librenms -DB_USER=librenms -DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) -mariadb -u root -e "CREATE DATABASE $DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" -mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" -mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" - -{ - echo "LibreNMS-Credentials" - echo "LibreNMS Database User: $DB_USER" - echo "LibreNMS Database Password: $DB_PASS" - echo "LibreNMS Database Name: $DB_NAME" -} >>~/librenms.creds -msg_ok "Configured Database" - msg_info "Configure PHP-FPM" cp /etc/php/8.2/fpm/pool.d/www.conf /etc/php/8.2/fpm/pool.d/librenms.conf sed -i "s/\[www\]/\[librenms\]/g" /etc/php/8.2/fpm/pool.d/librenms.conf From 8c2467c69f4029e0a2701b85a15da4d78b93dd17 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 23 Apr 2025 15:28:23 +0200 Subject: [PATCH 0604/1614] Add update to librenms --- ct/librenms.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ct/librenms.sh b/ct/librenms.sh index 72291ff..5780ee1 100644 --- a/ct/librenms.sh +++ b/ct/librenms.sh @@ -27,7 +27,11 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "Update not supported!" + msg_info "Updating ${APP} Installation" + su librenms + cd /opt/librenms + ./daily.sh + msg_ok "Updated ${APP} Installation" exit } From 72ac3792eac45031f88fe5331b06573fc49ac751 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Wed, 23 Apr 2025 19:31:26 +0200 Subject: [PATCH 0605/1614] Update alpine-rclone --- ct/alpine-rclone.sh | 30 ++++++++++++++++++------------ install/alpine-rclone-install.sh | 15 ++++++++++----- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index 4c5eb23..d6fd160 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -20,21 +20,27 @@ color catch_errors function update_script() { - header_info - msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade - msg_ok "Updated Alpine Packages" + header_info + check_container_storage + check_container_resources - msg_info "Updating Rclone" - $STD apk upgrade rclone - msg_ok "Updated Rclone" + if [ ! -d /opt/rclone ]; then + msg_error "No ${APP} Installation Found!" + exit 1 + fi - msg_info "Restarting Rclone" - $STD rc-service rclone restart || true - msg_ok "Restarted Rclone" + RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then + msg_info "Updating ${APP} LXC" + temp_file=$(mktemp) + curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file + $STD unzip -o $temp_file '*/**' -d /opt/rclone + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi - exit 0 + exit 0 } start diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index 8ec630b..ee7044b 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -15,8 +15,8 @@ update_os msg_info "Installing dependencies" $STD apk add --no-cache \ - unzip \ - apache2-utils + unzip \ + apache2-utils msg_ok "Installed dependencies" msg_info "Installing rclone" @@ -29,9 +29,9 @@ cd /opt/rclone PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) $STD htpasswd -cb -B login.pwd admin $PASSWORD { - echo "rclone-Credentials" - echo "rclone User Name: admin" - echo "rclone Password: $PASSWORD" + echo "rclone-Credentials" + echo "rclone User Name: admin" + echo "rclone Password: $PASSWORD" } >>~/rclone.creds echo "${RELEASE}" >/opt/${APPLICATION}_version.txt rm -f $temp_file @@ -61,3 +61,8 @@ msg_ok "Started rclone" motd_ssh customize + +msg_info "Cleaning up" +rm -rf "$temp_file" +$STD apk cache clean +msg_ok "Cleaned" From 56fd53649ad72d07a06d13d86bc47ef23424d2a1 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Wed, 23 Apr 2025 19:38:11 +0200 Subject: [PATCH 0606/1614] Update alpine-rclone --- ct/alpine-rclone.sh | 4 ++-- install/alpine-rclone-install.sh | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index d6fd160..d5cc8f7 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -33,8 +33,8 @@ function update_script() { if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then msg_info "Updating ${APP} LXC" temp_file=$(mktemp) - curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file - $STD unzip -o $temp_file '*/**' -d /opt/rclone + curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" + $STD unzip -o "$temp_file" '*/**' -d /opt/rclone msg_ok "Updated Successfully" else msg_ok "No update required. ${APP} is already at ${RELEASE}" diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index ee7044b..ddcec77 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -23,18 +23,18 @@ msg_info "Installing rclone" temp_file=$(mktemp) mkdir -p /opt/rclone RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file -$STD unzip -j $temp_file '*/**' -d /opt/rclone +curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" +$STD unzip -j "$temp_file" '*/**' -d /opt/rclone cd /opt/rclone PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) -$STD htpasswd -cb -B login.pwd admin $PASSWORD +$STD htpasswd -cb -B login.pwd admin "$PASSWORD" { echo "rclone-Credentials" echo "rclone User Name: admin" echo "rclone Password: $PASSWORD" } >>~/rclone.creds -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -rm -f $temp_file +echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt +rm -f "$temp_file" msg_ok "Installed rclone" msg_info "Enabling rclone Service" From cce28b21a38ef163ddd55f560a242b616b4ce781 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Wed, 23 Apr 2025 19:40:55 +0200 Subject: [PATCH 0607/1614] Update alpine-rclone --- ct/alpine-rclone.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index d5cc8f7..fc4d924 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -35,6 +35,7 @@ function update_script() { temp_file=$(mktemp) curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" $STD unzip -o "$temp_file" '*/**' -d /opt/rclone + rm -f "$temp_file" msg_ok "Updated Successfully" else msg_ok "No update required. ${APP} is already at ${RELEASE}" From 5bad3969b4aae368a45798dbf935531c24a9aceb Mon Sep 17 00:00:00 2001 From: Edoardo Pavan Date: Wed, 23 Apr 2025 22:59:05 +0200 Subject: [PATCH 0608/1614] feat: add cloudflare-ddns --- ct/cloudflare-ddns.sh | 45 ++++++++++++++ install/cloudflare-ddns-install.sh | 99 ++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 ct/cloudflare-ddns.sh create mode 100644 install/cloudflare-ddns-install.sh diff --git a/ct/cloudflare-ddns.sh b/ct/cloudflare-ddns.sh new file mode 100644 index 0000000..838365d --- /dev/null +++ b/ct/cloudflare-ddns.sh @@ -0,0 +1,45 @@ +#!/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: edoardop13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/favonia/cloudflare-ddns + +APP="Cloudflare-DDNS" +var_tags="" +var_cpu="1" +var_ram="512" +var_disk="2" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -f /etc/systemd/system/cloudflare-ddns.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_error "We don't provide an update function because the service ${APP} use every time the latest version." + exit +} + +start +build_container +description +msg_ok "Completed Successfully!\n" +echo -e "${APP} setup has been successfully initialized!\n" +echo -e "If you want to update the service go to the container and run the command:\n" +echo -e "sudo nano /etc/systemd/system/cloudflare-ddns.service\n" +echo -e "Update the token or the other environment variables and save the file.\n" +echo -e "Then run the command:\n" +echo -e "sudo systemctl daemon-reload\n" +echo -e "And finally restart the service with:\n" +echo -e "sudo systemctl restart cloudflare-ddns.service" \ No newline at end of file diff --git a/install/cloudflare-ddns-install.sh b/install/cloudflare-ddns-install.sh new file mode 100644 index 0000000..b4ea27f --- /dev/null +++ b/install/cloudflare-ddns-install.sh @@ -0,0 +1,99 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: edoardop13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/favonia/cloudflare-ddns + +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 update +$STD apt-get install -y curl systemd + +msg_info "Installing Go" +GO_VERSION=$(curl -s https://go.dev/VERSION?m=text | grep -m1 '^go') +GO_TARBALL="${GO_VERSION}.linux-amd64.tar.gz" +GO_URL="https://go.dev/dl/${GO_TARBALL}" +INSTALL_DIR="/usr/bin" +echo "📦 Download Go ${GO_VERSION} from ${GO_URL}..." + +rm -rf "${INSTALL_DIR}/go" + +curl -LO "$GO_URL" +tar -C "$INSTALL_DIR" -xzf "$GO_TARBALL" +rm "$GO_TARBALL" + +echo 'export PATH=$PATH:/usr/bin/go/bin' >> ~/.bashrc +source ~/.bashrc +go version + +msg_ok "Dependencies installed" + +msg_info "Configure Application" + +var_cf_api_token="default" +var_cf_api_token=$(whiptail --title "CLOUDFLARE TOKEN" --backtitle "Type the Cloudflare Api Token:" --inputbox "token" 10 60 3>&1 1>&2 2>&3) +msg_ok "Cloudflare Api Token: '${var_cf_api_token}'" + +var_cf_domains="default" +var_cf_domains=$(whiptail --title "CLOUDFLARE DOMAINS" --backtitle "Type the domains separated with a comma (example.org,www.example.org)" --inputbox "*.example.com" 10 60 3>&1 1>&2 2>&3) +msg_ok "Cloudflare Domains: '${var_cf_domains}'" + +var_cf_proxied="false" +if whiptail --yesno "Proxied?" 8 45; then + var_cf_proxied="true" +fi +var_cf_ip6_provider="none" +if whiptail --yesno "IPv6 Provider?" 8 45; then + var_cf_ip6_provider="cloudflare" +else + var_cf_ip6_provider="none" +fi + +msg_ok "Application Configured" + +msg_info "Setting up systemd service" +mkdir -p /root/go +chown -R root:root /root/go +cat </etc/systemd/system/cloudflare-ddns.service +[Unit] +Description=Cloudflare DDNS Service (Go run) +After=network.target + +[Service] +Environment="CLOUDFLARE_API_TOKEN=${var_cf_api_token}" +Environment="DOMAINS=${var_cf_domains}" +Environment="PROXIED=${var_cf_proxied}" +Environment="IP6_PROVIDER=${var_cf_ip6_provider}" +Environment="GOPATH=/root/go" +Environment="GOCACHE=/tmp/go-build" +ExecStart=/usr/bin/go/bin/go run github.com/favonia/cloudflare-ddns/cmd/ddns@latest +Restart=always +RestartSec=300 + +[Install] +WantedBy=multi-user.target +EOF +msg_ok "Systemd service configured" + +msg_info "Enabling and starting service" +systemctl daemon-reload +systemctl enable --now cloudflare-ddns.service +msg_ok "Cloudflare DDNS service started" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" + +msg_ok "Completed Successfully! Cloudflare DDNS is running in the background.\n" From 60f247ff6e27fa2efaa9ce025f050f6b01a8dc5a Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Thu, 24 Apr 2025 01:24:42 +0000 Subject: [PATCH 0609/1614] Update versions.json --- frontend/public/json/versions.json | 159 ++++++++++++----------------- 1 file changed, 67 insertions(+), 92 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 46f4d20..84dc0f6 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,4 +1,69 @@ [ + { + "name": "immich-app/immich", + "version": "v1.132.1", + "date": "2025-04-23T22:08:21Z" + }, + { + "name": "fhem/fhem-mirror", + "version": "6.2", + "date": "2025-04-23T20:31:09Z" + }, + { + "name": "mongodb/mongo", + "version": "r6.0.22", + "date": "2025-04-23T19:53:55Z" + }, + { + "name": "Radarr/Radarr", + "version": "v5.22.4.9896", + "date": "2025-04-23T18:51:12Z" + }, + { + "name": "netbox-community/netbox", + "version": "v4.2.8", + "date": "2025-04-22T19:44:49Z" + }, + { + "name": "Kozea/Radicale", + "version": "v3.5.2", + "date": "2025-04-23T18:41:46Z" + }, + { + "name": "runtipi/runtipi", + "version": "nightly", + "date": "2025-04-21T16:55:50Z" + }, + { + "name": "NodeBB/NodeBB", + "version": "v4.2.2", + "date": "2025-04-22T16:33:53Z" + }, + { + "name": "grafana/grafana", + "version": "v11.6.1", + "date": "2025-04-23T17:04:02Z" + }, + { + "name": "syncthing/syncthing", + "version": "v2.0.0-beta.9", + "date": "2025-04-12T13:58:29Z" + }, + { + "name": "nzbgetcom/nzbget", + "version": "v24.8", + "date": "2025-03-18T07:33:51Z" + }, + { + "name": "docmost/docmost", + "version": "v0.20.1", + "date": "2025-04-23T13:44:12Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.3.0p31-rc1", + "date": "2025-04-23T13:16:47Z" + }, { "name": "keycloak/keycloak", "version": "26.2.1", @@ -19,16 +84,6 @@ "version": "6.3.0-alpha.1", "date": "2025-04-23T11:25:55Z" }, - { - "name": "fhem/fhem-mirror", - "version": "6.2", - "date": "2025-04-23T10:36:12Z" - }, - { - "name": "nzbgetcom/nzbget", - "version": "v24.8", - "date": "2025-03-18T07:33:51Z" - }, { "name": "cockpit-project/cockpit", "version": "337", @@ -64,11 +119,6 @@ "version": "v0.9.78", "date": "2025-04-23T01:38:28Z" }, - { - "name": "grafana/grafana", - "version": "v11.3.6", - "date": "2025-04-23T00:18:05Z" - }, { "name": "cross-seed/cross-seed", "version": "v6.11.2", @@ -79,31 +129,16 @@ "version": "RELEASE.2025-04-22T22-12-26Z", "date": "2025-04-22T22:44:34Z" }, - { - "name": "docmost/docmost", - "version": "v0.20.0", - "date": "2025-04-22T22:30:25Z" - }, { "name": "glanceapp/glance", "version": "v0.7.13", "date": "2025-04-22T22:19:16Z" }, - { - "name": "netbox-community/netbox", - "version": "v4.2.8", - "date": "2025-04-22T19:44:49Z" - }, { "name": "n8n-io/n8n", "version": "n8n@1.90.0", "date": "2025-04-22T08:58:15Z" }, - { - "name": "NodeBB/NodeBB", - "version": "v4.2.2", - "date": "2025-04-22T16:33:53Z" - }, { "name": "jenkinsci/jenkins", "version": "jenkins-2.507", @@ -114,11 +149,6 @@ "version": "0.203.2", "date": "2025-04-22T15:07:28Z" }, - { - "name": "Checkmk/checkmk", - "version": "v2.4.0b6", - "date": "2025-04-22T15:00:31Z" - }, { "name": "zwave-js/zwave-js-ui", "version": "v10.3.0", @@ -129,11 +159,6 @@ "version": "2025.4.22", "date": "2025-04-22T14:18:11Z" }, - { - "name": "mongodb/mongo", - "version": "r8.2.0-alpha", - "date": "2025-04-22T13:19:07Z" - }, { "name": "AdguardTeam/AdGuardHome", "version": "v0.107.61", @@ -179,11 +204,6 @@ "version": "e5.9.0-beta.4", "date": "2025-04-21T17:08:59Z" }, - { - "name": "runtipi/runtipi", - "version": "v3.10.0-beta.9", - "date": "2025-04-17T11:46:08Z" - }, { "name": "Prowlarr/Prowlarr", "version": "v1.34.1.5021", @@ -234,11 +254,6 @@ "version": "v2.0.0.4645", "date": "2017-03-07T18:56:06Z" }, - { - "name": "Radarr/Radarr", - "version": "v5.21.1.9799", - "date": "2025-03-24T15:52:12Z" - }, { "name": "paperless-ngx/paperless-ngx", "version": "v2.15.3", @@ -271,8 +286,8 @@ }, { "name": "ollama/ollama", - "version": "v0.6.6-rc1", - "date": "2025-04-17T01:56:29Z" + "version": "v0.6.6", + "date": "2025-04-19T01:13:05Z" }, { "name": "caddyserver/caddy", @@ -453,45 +468,5 @@ "name": "autobrr/autobrr", "version": "v1.61.0", "date": "2025-04-13T21:14:40Z" - }, - { - "name": "Ombi-app/Ombi", - "version": "v4.47.1", - "date": "2025-01-05T21:14:23Z" - }, - { - "name": "syncthing/syncthing", - "version": "v2.0.0-beta.9", - "date": "2025-04-12T13:58:29Z" - }, - { - "name": "qbittorrent/qBittorrent", - "version": "release-5.0.5", - "date": "2025-04-13T07:55:55Z" - }, - { - "name": "Lidarr/Lidarr", - "version": "v2.10.3.4602", - "date": "2025-03-23T11:00:37Z" - }, - { - "name": "Tautulli/Tautulli", - "version": "v2.15.2", - "date": "2025-04-12T23:27:51Z" - }, - { - "name": "StarFleetCPTN/GoMFT", - "version": "v0.2.11", - "date": "2025-04-12T21:13:08Z" - }, - { - "name": "readeck/readeck", - "version": "0.18.0", - "date": "2025-04-12T08:55:32Z" - }, - { - "name": "Bubka/2FAuth", - "version": "v5.5.2", - "date": "2025-04-11T22:00:06Z" } ] From 47bc4290646224a26a9aba195e9f03ece131183b Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 24 Apr 2025 07:58:01 +0200 Subject: [PATCH 0610/1614] Add debbuging to alpine_install_fnc --- misc/alpine-install.func | 244 ++++++++++++++++++++------------------- 1 file changed, 123 insertions(+), 121 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index d869657..9c13e94 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -6,192 +6,194 @@ # This function sets color variables for formatting output in the terminal color() { - # Colors - YW=$(echo "\033[33m") - YWB=$(echo "\033[93m") - BL=$(echo "\033[36m") - RD=$(echo "\033[01;31m") - GN=$(echo "\033[1;92m") + # Colors + YW=$(echo "\033[33m") + YWB=$(echo "\033[93m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + GN=$(echo "\033[1;92m") - # Formatting - CL=$(echo "\033[m") - BFR="\\r\\033[K" - BOLD=$(echo "\033[1m") - TAB=" " + # Formatting + CL=$(echo "\033[m") + BFR="\\r\\033[K" + BOLD=$(echo "\033[1m") + TAB=" " - # System - RETRY_NUM=10 - RETRY_EVERY=3 - i=$RETRY_NUM + # System + RETRY_NUM=10 + RETRY_EVERY=3 + i=$RETRY_NUM - # Icons - CM="${TAB}✔️${TAB}${CL}" - CROSS="${TAB}✖️${TAB}${CL}" - INFO="${TAB}💡${TAB}${CL}" - NETWORK="${TAB}📡${TAB}${CL}" - OS="${TAB}🖥️${TAB}${CL}" - OSVERSION="${TAB}🌟${TAB}${CL}" - HOSTNAME="${TAB}🏠${TAB}${CL}" - GATEWAY="${TAB}🌐${TAB}${CL}" - DEFAULT="${TAB}⚙️${TAB}${CL}" + # Icons + CM="${TAB}✔️${TAB}${CL}" + CROSS="${TAB}✖️${TAB}${CL}" + INFO="${TAB}💡${TAB}${CL}" + NETWORK="${TAB}📡${TAB}${CL}" + OS="${TAB}🖥️${TAB}${CL}" + OSVERSION="${TAB}🌟${TAB}${CL}" + HOSTNAME="${TAB}🏠${TAB}${CL}" + GATEWAY="${TAB}🌐${TAB}${CL}" + DEFAULT="${TAB}⚙️${TAB}${CL}" } # Function to set STD mode based on verbosity set_std_mode() { - if [ "$VERBOSE" = "yes" ]; then - STD="" - else - STD="silent" - fi + if [ "$VERBOSE" = "yes" ]; then + STD="" + else + STD="silent" + fi } # Silent execution function silent() { - "$@" >/dev/null 2>&1 + "$@" >/dev/null 2>&1 } # This function enables IPv6 if it's not disabled and sets verbose mode verb_ip6() { - set_std_mode # Set STD mode based on VERBOSE + set_std_mode # Set STD mode based on VERBOSE - if [ "$DISABLEIPV6" == "yes" ]; then - $STD sysctl -w net.ipv6.conf.all.disable_ipv6=1 - echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf - $STD rc-update add sysctl default - fi + if [ "$DISABLEIPV6" == "yes" ]; then + $STD sysctl -w net.ipv6.conf.all.disable_ipv6=1 + echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf + $STD rc-update add sysctl default + fi } # This function catches errors and handles them with the error handler function catch_errors() { - set -Eeuo pipefail - trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } # This function handles errors error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } # This function displays an informational message with a yellow color. msg_info() { - local msg="$1" - echo -ne " ${TAB}${YW}${msg}" + local msg="$1" + echo -ne " ${TAB}${YW}${msg}" } # This function displays a success message with a green color. msg_ok() { - local msg="$1" - echo -e "${BFR}${CM}${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR}${CM}${GN}${msg}${CL}" } # This function displays a error message with a red color. msg_error() { - local msg="$1" - echo -e "${BFR}${CROSS}${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR}${CROSS}${RD}${msg}${CL}" } # This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection setting_up_container() { - msg_info "Setting up Container OS" - while [ $i -gt 0 ]; do - if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - i=$((i - 1)) - done - - if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e "${NETWORK}Check Network Settings" - exit 1 + msg_info "Setting up Container OS" + while [ $i -gt 0 ]; do + if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then + break fi - msg_ok "Set up Container OS" - msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + i=$((i - 1)) + done + + if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e "${NETWORK}Check Network Settings" + exit 1 + fi + msg_ok "Set up Container OS" + msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" } # This function checks the network connection by pinging a known IP address and prompts the user to continue if the internet is not connected network_check() { - set +e - trap - ERR - if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then - msg_ok "Internet Connected" + set +e + trap - ERR + if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then + msg_ok "Internet Connected" + else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + echo -e "${INFO}${RD}Expect Issues Without Internet${CL}" else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e "${INFO}${RD}Expect Issues Without Internet${CL}" - else - echo -e "${NETWORK}Check Network Settings" - exit 1 - fi + echo -e "${NETWORK}Check Network Settings" + exit 1 fi - RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') - if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi - set -e - trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + fi + RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') + if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi + set -e + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } # This function updates the Container OS by running apt-get update and upgrade update_os() { - msg_info "Updating Container OS" - $STD apk update - $STD apk upgrade - msg_ok "Updated Container OS" + msg_info "Updating Container OS" + $STD apk update + $STD apk upgrade + msg_ok "Updated Container OS" - msg_info "Installing core dependencies" - $STD apk update - $STD apk add newt curl openssh nano mc ncurses - msg_ok "Core dependencies installed" + msg_info "Installing core dependencies" + $STD apk update + $STD apk add newt curl openssh nano mc ncurses + msg_ok "Core dependencies installed" } # This function modifies the message of the day (motd) and SSH settings motd_ssh() { - echo "export TERM='xterm-256color'" >>/root/.bashrc - IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1) + echo "export TERM='xterm-256color'" >>/root/.bashrc + IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1) - if [ -f "/etc/os-release" ]; then - OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"') - OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"') - else - OS_NAME="Alpine Linux" - OS_VERSION="Unknown" - fi + if [ -f "/etc/os-release" ]; then + OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"') + OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"') + else + OS_NAME="Alpine Linux" + OS_VERSION="Unknown" + fi - PROFILE_FILE="/etc/profile.d/00_lxc-details.sh" - echo "echo -e \"\"" >"$PROFILE_FILE" - echo -e "echo -e \"${BOLD}${YW}${APPLICATION} LXC Container - DEV Repository${CL}\"" >>"$PROFILE_FILE" - echo -e "echo -e \"${RD}WARNING: This is a DEVELOPMENT version (ProxmoxVED). Do NOT use in production!${CL}\"" >>"$PROFILE_FILE" - echo -e "echo -e \"${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >>"$PROFILE_FILE" - echo -e "echo -e \"${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE" - echo -e "echo -e \"${YW} IP Address: ${GN}${IP}${CL}\"" >>"$PROFILE_FILE" - echo -e "echo -e \"${YW} Repository: ${GN}https://github.com/community-scripts/ProxmoxVED${CL}\"" >>"$PROFILE_FILE" - echo "echo \"\"" >>"$PROFILE_FILE" + PROFILE_FILE="/etc/profile.d/00_lxc-details.sh" + echo "echo -e \"\"" >"$PROFILE_FILE" + echo -e "echo -e \"${BOLD}${YW}${APPLICATION} LXC Container - DEV Repository${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${RD}WARNING: This is a DEVELOPMENT version (ProxmoxVED). Do NOT use in production!${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${YW} IP Address: ${GN}${IP}${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${YW} Repository: ${GN}https://github.com/community-scripts/ProxmoxVED${CL}\"" >>"$PROFILE_FILE" + echo "echo \"\"" >>"$PROFILE_FILE" - if [[ "${SSH_ROOT}" == "yes" ]]; then - $STD rc-update add sshd - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - $STD /etc/init.d/sshd start - fi + if [[ "${SSH_ROOT}" == "yes" ]]; then + $STD rc-update add sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + $STD /etc/init.d/sshd start + fi } # Validate Timezone for some LXC's validate_tz() { - [[ -f "/usr/share/zoneinfo/$1" ]] + [[ -f "/usr/share/zoneinfo/$1" ]] } # This function customizes the container and enables passwordless login for the root user customize() { - if [[ "$PASSWORD" == "" ]]; then - msg_info "Customizing Container" - bash -c "passwd -d root" >/dev/null 2>&1 - msg_ok "Customized Container" - fi - echo "bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update - chmod +x /usr/bin/update + msg_ok "Started Customizing Container" + echo "PASSWORD=${PASSWORD}" + if [[ "$PASSWORD" == "" ]]; then + msg_info "Customizing Container" + bash -c "passwd -d root" >/dev/null 2>&1 + msg_ok "Customized Container" + fi + echo "bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update + chmod +x /usr/bin/update } From 83cb3d78266838fcb857ec8a29cdcedfecb147ac Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 24 Apr 2025 08:14:29 +0200 Subject: [PATCH 0611/1614] Add debug to build.func --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index ae3f8f4..0429538 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1214,6 +1214,7 @@ build_container() { export APPLICATION="$APP" export app="$NSAPP" export PASSWORD="$PW" + echo "in build.func PW=$PW, PASSWORD=$PASSWORD" export VERBOSE="$VERB" export SSH_ROOT="${SSH}" export SSH_AUTHORIZED_KEY From b267ce4c510afcbd30c81a8452e7cddbef276ffc Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 24 Apr 2025 08:17:07 +0200 Subject: [PATCH 0612/1614] change alpine-rcloud password variable --- install/alpine-rclone-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index ddcec77..311cb4f 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -26,12 +26,12 @@ RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | g curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" $STD unzip -j "$temp_file" '*/**' -d /opt/rclone cd /opt/rclone -PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) -$STD htpasswd -cb -B login.pwd admin "$PASSWORD" +RCLONE_PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) +$STD htpasswd -cb -B login.pwd admin "$RCLONE_PASSWORD" { echo "rclone-Credentials" echo "rclone User Name: admin" - echo "rclone Password: $PASSWORD" + echo "rclone Password: $RCLONE_PASSWORD" } >>~/rclone.creds echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt rm -f "$temp_file" From dd9bb14262d23ce9eb76bf09acd26c8b385e4ca7 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 24 Apr 2025 09:57:16 +0200 Subject: [PATCH 0613/1614] remove debuging --- misc/alpine-install.func | 2 -- misc/build.func | 1 - 2 files changed, 3 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 9c13e94..d3eeaed 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -187,8 +187,6 @@ validate_tz() { # This function customizes the container and enables passwordless login for the root user customize() { - msg_ok "Started Customizing Container" - echo "PASSWORD=${PASSWORD}" if [[ "$PASSWORD" == "" ]]; then msg_info "Customizing Container" bash -c "passwd -d root" >/dev/null 2>&1 diff --git a/misc/build.func b/misc/build.func index 0429538..ae3f8f4 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1214,7 +1214,6 @@ build_container() { export APPLICATION="$APP" export app="$NSAPP" export PASSWORD="$PW" - echo "in build.func PW=$PW, PASSWORD=$PASSWORD" export VERBOSE="$VERB" export SSH_ROOT="${SSH}" export SSH_AUTHORIZED_KEY From ea8983bdd60c9536d5a76a50af6da6c625e66c95 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 24 Apr 2025 10:02:11 +0200 Subject: [PATCH 0614/1614] Handel Responsive/Mobile --- .../_components/ScriptItems/ConfigFile.tsx | 4 +- .../src/components/ui/config-copy-button.tsx | 55 +++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 frontend/src/components/ui/config-copy-button.tsx diff --git a/frontend/src/app/scripts/_components/ScriptItems/ConfigFile.tsx b/frontend/src/app/scripts/_components/ScriptItems/ConfigFile.tsx index c484aa5..0f4f43f 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/ConfigFile.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/ConfigFile.tsx @@ -1,10 +1,10 @@ -import CodeCopyButton from "@/components/ui/code-copy-button"; +import ConfigCopyButton from "@/components/ui/config-copy-button"; import { Script } from "@/lib/types"; export default function ConfigFile({ item }: { item: Script }) { return (
- {item.config_path ? item.config_path : "No config path set"} + {item.config_path ? item.config_path : "No config path set"}
); } diff --git a/frontend/src/components/ui/config-copy-button.tsx b/frontend/src/components/ui/config-copy-button.tsx new file mode 100644 index 0000000..45fc2e9 --- /dev/null +++ b/frontend/src/components/ui/config-copy-button.tsx @@ -0,0 +1,55 @@ +"use client"; +import { cn } from "@/lib/utils"; +import { CheckIcon, ClipboardIcon } from "lucide-react"; +import { useEffect, useState } from "react"; +import { toast } from "sonner"; +import { Card } from "./card"; + +export default function CodeCopyButton({ + children, +}: { + children: React.ReactNode; +}) { + const [hasCopied, setHasCopied] = useState(false); + const isMobile = window.innerWidth <= 640; + + useEffect(() => { + if (hasCopied) { + setTimeout(() => { + setHasCopied(false); + }, 2000); + } + }, [hasCopied]); + + const handleCopy = (type: string, value: any) => { + navigator.clipboard.writeText(value); + + setHasCopied(true); + + + // toast.success(`copied ${type} to clipboard`, { + // icon: , + // }); + }; + + return ( +
+ +
+ {!isMobile && children ? children : "Copy Config File Path"} +
+
handleCopy("install command", children)} + > + {hasCopied ? ( + + ) : ( + + )} + Copy +
+
+
+ ); +} From 50b47d0b9e9c6dfe8e359f7ff1dca9ace4d30676 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Thu, 24 Apr 2025 11:11:48 +0200 Subject: [PATCH 0615/1614] Create openobserve.json --- frontend/public/json/openobserve.json | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 frontend/public/json/openobserve.json diff --git a/frontend/public/json/openobserve.json b/frontend/public/json/openobserve.json new file mode 100644 index 0000000..feaaf45 --- /dev/null +++ b/frontend/public/json/openobserve.json @@ -0,0 +1,39 @@ +{ + "name": "OpenObserve", + "slug": "openobserve", + "categories": [ + 9 + ], + "date_created": "2024-05-02", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 5080, + "documentation": null, + "website": "https://openobserve.ai/", + "logo": "https://avatars.githubusercontent.com/u/95867656", + "description": "OpenObserve is a simple yet sophisticated log search, infrastructure monitoring, and APM solution.", + "install_methods": [ + { + "type": "default", + "script": "ct/openobserve.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 3, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Show Login Credentials: `cat /opt/openobserve/data/.env`", + "type": "info" + } + ] +} From 95575f73112e5b418ed02b373c377f9508fa8c2b Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Thu, 24 Apr 2025 11:13:06 +0200 Subject: [PATCH 0616/1614] Update openobserve.json --- frontend/public/json/openobserve.json | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/public/json/openobserve.json b/frontend/public/json/openobserve.json index feaaf45..e1bc3da 100644 --- a/frontend/public/json/openobserve.json +++ b/frontend/public/json/openobserve.json @@ -12,6 +12,7 @@ "documentation": null, "website": "https://openobserve.ai/", "logo": "https://avatars.githubusercontent.com/u/95867656", + "config_path": "" "description": "OpenObserve is a simple yet sophisticated log search, infrastructure monitoring, and APM solution.", "install_methods": [ { From abd399e8c441fcfa8d646eda1f352df2075f38fa Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Thu, 24 Apr 2025 11:14:43 +0200 Subject: [PATCH 0617/1614] love json --- frontend/public/json/openobserve.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/openobserve.json b/frontend/public/json/openobserve.json index e1bc3da..84367d7 100644 --- a/frontend/public/json/openobserve.json +++ b/frontend/public/json/openobserve.json @@ -12,7 +12,7 @@ "documentation": null, "website": "https://openobserve.ai/", "logo": "https://avatars.githubusercontent.com/u/95867656", - "config_path": "" + "config_path": "", "description": "OpenObserve is a simple yet sophisticated log search, infrastructure monitoring, and APM solution.", "install_methods": [ { From cfdf684514626a6790e6205fb6a0373f3574cbab Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Thu, 24 Apr 2025 11:16:29 +0200 Subject: [PATCH 0618/1614] Create openobserve.sh --- ct/openobserve.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ct/openobserve.sh diff --git a/ct/openobserve.sh b/ct/openobserve.sh new file mode 100644 index 0000000..203248b --- /dev/null +++ b/ct/openobserve.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://openobserve.ai/ + +APP="OpenObserve" +var_tags="${var_tags:-monitoring}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-3}" +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 [[ ! -d /opt/openobserve/ ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP" + systemctl stop openobserve + LATEST=$(curl -fsSL https://api.github.com/repos/openobserve/openobserve/releases/latest | grep '"tag_name":' | cut -d'"' -f4) + tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve + systemctl start openobserve + msg_ok "Updated $APP" + 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}:5080${CL}" From a4233fe1eb677901b2a44c0e8b204eb23f1a70dc Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 24 Apr 2025 09:16:47 +0000 Subject: [PATCH 0619/1614] Update .app files --- ct/headers/openobserve | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/openobserve diff --git a/ct/headers/openobserve b/ct/headers/openobserve new file mode 100644 index 0000000..08933fd --- /dev/null +++ b/ct/headers/openobserve @@ -0,0 +1,6 @@ + ____ ____ __ + / __ \____ ___ ____ / __ \/ /_ ________ ______ _____ + / / / / __ \/ _ \/ __ \/ / / / __ \/ ___/ _ \/ ___/ | / / _ \ +/ /_/ / /_/ / __/ / / / /_/ / /_/ (__ ) __/ / | |/ / __/ +\____/ .___/\___/_/ /_/\____/_.___/____/\___/_/ |___/\___/ + /_/ From 9dd44f85ec4e121d31af930ca98453df3729a529 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Thu, 24 Apr 2025 11:17:05 +0200 Subject: [PATCH 0620/1614] Create openobserve.sh --- install/openobserve.sh | 54 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/openobserve.sh diff --git a/install/openobserve.sh b/install/openobserve.sh new file mode 100644 index 0000000..fb7dd0f --- /dev/null +++ b/install/openobserve.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://openobserve.ai/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing OpenObserve" +mkdir -p /opt/openobserve/data +LATEST=$(curl -fsSL https://api.github.com/repos/openobserve/openobserve/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +$STD tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve + +cat </opt/openobserve/data/.env +ZO_ROOT_USER_EMAIL = "admin@example.com" +ZO_ROOT_USER_PASSWORD = "$(openssl rand -base64 18 | cut -c1-13)" +ZO_DATA_DIR = "/opt/openobserve/data" +ZO_HTTP_PORT = "5080" +EOF +msg_ok "Installed OpenObserve" + +msg_info "Creating Service" +cat </etc/systemd/system/openobserve.service +[Unit] +Description=OpenObserve +After=network.target + +[Service] +Type=simple +EnvironmentFile=/opt/openobserve/data/.env +ExecStart=/opt/openobserve/openobserve +ExecStop=killall -QUIT openobserve +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now openobserve +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From bc9827a008d4c63672d2c20bbe79b59a80ddf11d Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 13:21:48 +0200 Subject: [PATCH 0621/1614] Update tinyauth --- ct/alpine-tinyauth.sh | 35 ++++++++++++++---------------- install/alpine-tinyauth-install.sh | 8 +++---- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 8f816f5..4359fc4 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -20,28 +20,25 @@ color catch_errors function update_script() { - header_info - if [ ! -d /opt/tinyauth ]; then - msg_error "No ${APP} Installation Found!" - exit 1 - fi - msg_info "Updating Alpine Packages" - $STD apk update - $STD apk upgrade - msg_ok "Updated Alpine Packages" + header_info + if [ ! -d /opt/tinyauth ]; then + msg_error "No ${APP} Installation Found!" + exit 1 + fi + msg_info "Updating Alpine Packages" + $STD apk update + $STD apk upgrade + msg_ok "Updated Alpine Packages" - echo "DEBUG: CT_TYPE before update_script=${CT_TYPE:-UNDEFINED}" - echo "DEBUG: var_unprivileged=${var_unprivileged:-UNDEFINED}" + msg_info "Updating tinyauth" + $STD apk upgrade tinyauth + msg_ok "Updated tinyauth" - msg_info "Updating tinyauth" - $STD apk upgrade tinyauth - msg_ok "Updated tinyauth" + msg_info "Restarting tinyauth" + $STD rc-service tinyauth restart + msg_ok "Restarted tinyauth" - msg_info "Restarting tinyauth" - $STD rc-service tinyauth restart - msg_ok "Restarted tinyauth" - - exit 0 + exit 0 } start diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh index d8cc796..84af543 100644 --- a/install/alpine-tinyauth-install.sh +++ b/install/alpine-tinyauth-install.sh @@ -26,7 +26,7 @@ $STD npm install -g bun mkdir -p /opt/tinyauth RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') curl -fsSL https://github.com/steveiliop56/tinyauth/archive/refs/tags/v3.1.0.tar.gz -o $temp_file -tar -xzf $temp_file -C /opt/tinyauth --strip-components=1 +tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1 cd /opt/tinyauth/site $STD bun install $STD bun run build @@ -40,17 +40,17 @@ msg_ok "Installed tinyauth" msg_info "Enabling tinyauth Service" service_path="/etc/init.d/tinyauth" -echo '#!/sbin/openrc-run +echo "#!/sbin/openrc-run description="tinyauth Service" command="/opt/tinyauth/tinyauth" -command_args="--secret=$SECRET --users=admin@example.com:$apr1$n61ztxfk$0f/uGQFxnB.FBa5cxgqNg." +command_args="--secret=$SECRET --users=admin@example.com:\$apr1\$n61ztxfk\$0f/uGQFxnB.FBa5cxgqNg." command_user="root" pidfile="/var/run/tinyauth.pid" depend() { use net -}' >$service_path +}" >$service_path chmod +x $service_path $STD rc-update add tinyauth default From 1e2ca15f1f467d3d1725856005dfbc3e58a54a50 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 13:32:04 +0200 Subject: [PATCH 0622/1614] update tinyauth --- ct/alpine-tinyauth.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 4359fc4..8dabe44 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -5,7 +5,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/steveiliop56/tinyauth -APP="tinyauth" +APP="Alpine-tinyauth" var_tags="${var_tags:-alpine;auth}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-512}" From d8f5fddf4542d50f92d636ae4766c7bcdd69c04f Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 13:43:08 +0200 Subject: [PATCH 0623/1614] update tinyauth --- ct/alpine-tinyauth.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 8dabe44..60fe616 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -9,7 +9,7 @@ APP="Alpine-tinyauth" var_tags="${var_tags:-alpine;auth}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-512}" -var_disk="${var_disk:-2}" +var_disk="${var_disk:-4}" var_os="${var_os:-alpine}" var_version="${var_version:-3.21}" var_unprivileged="${var_unprivileged:-1}" From 8565b7d7012e70ce80d2ea31093025396ead6aa0 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 24 Apr 2025 11:43:24 +0000 Subject: [PATCH 0624/1614] Update .app files --- ct/headers/alpine-tinyauth | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/headers/alpine-tinyauth b/ct/headers/alpine-tinyauth index e0c36ae..207a090 100644 --- a/ct/headers/alpine-tinyauth +++ b/ct/headers/alpine-tinyauth @@ -1,6 +1,6 @@ - __ _ __ __ - / /_(_)___ __ ______ ___ __/ /_/ /_ - / __/ / __ \/ / / / __ `/ / / / __/ __ \ -/ /_/ / / / / /_/ / /_/ / /_/ / /_/ / / / -\__/_/_/ /_/\__, /\__,_/\__,_/\__/_/ /_/ - /____/ + ___ __ _ __ _ __ __ + / | / /___ (_)___ ___ / /_(_)___ __ ______ ___ __/ /_/ /_ + / /| | / / __ \/ / __ \/ _ \______/ __/ / __ \/ / / / __ `/ / / / __/ __ \ + / ___ |/ / /_/ / / / / / __/_____/ /_/ / / / / /_/ / /_/ / /_/ / /_/ / / / +/_/ |_/_/ .___/_/_/ /_/\___/ \__/_/_/ /_/\__, /\__,_/\__,_/\__/_/ /_/ + /_/ /____/ From 820ec7ae5a6efae9d17fd88995fd89520e5d9303 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 15:17:37 +0200 Subject: [PATCH 0625/1614] update tinyauth --- install/alpine-tinyauth-install.sh | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh index 84af543..3577125 100644 --- a/install/alpine-tinyauth-install.sh +++ b/install/alpine-tinyauth-install.sh @@ -34,25 +34,38 @@ mv dist /opt/tinyauth/internal/assets/ cd /opt/tinyauth $STD go mod download CGO_ENABLED=0 go build -ldflags "-s -w" -SECRET=$(head -c 32 /dev/urandom | xxd -p -c 32) msg_ok "Installed tinyauth" msg_info "Enabling tinyauth Service" -service_path="/etc/init.d/tinyauth" -echo "#!/sbin/openrc-run +SECRET=$(head -c 16 /dev/urandom | xxd -p -c 16 | tr -d '\n') +{ + echo "SECRET=${SECRET}" + echo "USERS=admin@example.com:\$apr1\$n61ztxfk\$0f/uGQFxnB.FBa5cxgqNg." + echo "APP_URL=http://localhost:3000" +} >>/opt/tinyauth/.env + +cat </etc/init.d/tinyauth +#!/sbin/openrc-run description="tinyauth Service" command="/opt/tinyauth/tinyauth" -command_args="--secret=$SECRET --users=admin@example.com:\$apr1\$n61ztxfk\$0f/uGQFxnB.FBa5cxgqNg." +directory="/opt/tinyauth" command_user="root" +command_background="true" pidfile="/var/run/tinyauth.pid" +start_pre() { + if [ -f "/opt/tinyauth/.env" ]; then + export $(grep -v '^#' /opt/tinyauth/.env | xargs) + fi +} + depend() { use net -}" >$service_path - -chmod +x $service_path +} +EOF +chmod +x /etc/init.d/tinyauth $STD rc-update add tinyauth default msg_ok "Enabled tinyauth Service" From 0f2aa586bf81a1dbf3e32e02d43d073ba7bef55d Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 15:25:14 +0200 Subject: [PATCH 0626/1614] update tinyauth --- install/alpine-tinyauth-install.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh index 3577125..a70f275 100644 --- a/install/alpine-tinyauth-install.sh +++ b/install/alpine-tinyauth-install.sh @@ -14,7 +14,7 @@ network_check update_os msg_info "Installing Dependencies" -$STD apk add \ +$STD apk add --no-cache \ npm \ curl \ go @@ -24,8 +24,8 @@ msg_info "Installing tinyauth" temp_file=$(mktemp) $STD npm install -g bun mkdir -p /opt/tinyauth -RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL https://github.com/steveiliop56/tinyauth/archive/refs/tags/v3.1.0.tar.gz -o $temp_file +RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +curl -fsSL https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz -o $temp_file tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1 cd /opt/tinyauth/site $STD bun install @@ -37,7 +37,6 @@ CGO_ENABLED=0 go build -ldflags "-s -w" msg_ok "Installed tinyauth" msg_info "Enabling tinyauth Service" - SECRET=$(head -c 16 /dev/urandom | xxd -p -c 16 | tr -d '\n') { echo "SECRET=${SECRET}" From b77f38edf5f6f95ec952ac651219dd979815afd5 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 15:37:16 +0200 Subject: [PATCH 0627/1614] update tinyauth --- install/alpine-tinyauth-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh index a70f275..1406b90 100644 --- a/install/alpine-tinyauth-install.sh +++ b/install/alpine-tinyauth-install.sh @@ -27,7 +27,7 @@ mkdir -p /opt/tinyauth RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz -o $temp_file tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1 -cd /opt/tinyauth/site +cd /opt/tinyauth/frontend $STD bun install $STD bun run build mv dist /opt/tinyauth/internal/assets/ From 39f6bc9477a80253c8803bdf1be77d94a157229c Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 16:07:31 +0200 Subject: [PATCH 0628/1614] update tinyauth --- ct/alpine-tinyauth.sh | 13 +++++++++++-- install/alpine-tinyauth-install.sh | 8 +++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 60fe616..2a4d2b6 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -31,7 +31,16 @@ function update_script() { msg_ok "Updated Alpine Packages" msg_info "Updating tinyauth" - $STD apk upgrade tinyauth + RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + curl -fsSL https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz -o $temp_file + tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1 + cd /opt/tinyauth/frontend + $STD bun install + $STD bun run build + mv dist /opt/tinyauth/internal/assets/ + cd /opt/tinyauth + $STD go mod download + CGO_ENABLED=0 go build -ldflags "-s -w" msg_ok "Updated tinyauth" msg_info "Restarting tinyauth" @@ -48,4 +57,4 @@ 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}:xxxx${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh index 1406b90..6dc0a8a 100644 --- a/install/alpine-tinyauth-install.sh +++ b/install/alpine-tinyauth-install.sh @@ -34,13 +34,19 @@ mv dist /opt/tinyauth/internal/assets/ cd /opt/tinyauth $STD go mod download CGO_ENABLED=0 go build -ldflags "-s -w" +{ + echo "tinyauth Credentials" + echo "Username: admin@example.com" + echo "Password: admin" +} >>~/tinyauth.creds +echo "${RELEASE}" >"/opt/${APP}_version.txt" msg_ok "Installed tinyauth" msg_info "Enabling tinyauth Service" SECRET=$(head -c 16 /dev/urandom | xxd -p -c 16 | tr -d '\n') { echo "SECRET=${SECRET}" - echo "USERS=admin@example.com:\$apr1\$n61ztxfk\$0f/uGQFxnB.FBa5cxgqNg." + echo "USERS=admin@example.com:\$2a\$10\$CrTK.W7WXSClo3ZY1yJUFupg5UdV8WNcynEhZhJFNjhGQB.Ga0ZDm" echo "APP_URL=http://localhost:3000" } >>/opt/tinyauth/.env From 33c2469174a5bba45146a6dd0edbb1ec312a84b2 Mon Sep 17 00:00:00 2001 From: Edoardo Pavan Date: Thu, 24 Apr 2025 17:47:04 +0200 Subject: [PATCH 0629/1614] fix: suggestions from PR --- ct/cloudflare-ddns.sh | 10 +----- install/cloudflare-ddns-install.sh | 54 +++++++++++++----------------- 2 files changed, 25 insertions(+), 39 deletions(-) diff --git a/ct/cloudflare-ddns.sh b/ct/cloudflare-ddns.sh index 838365d..9c6f604 100644 --- a/ct/cloudflare-ddns.sh +++ b/ct/cloudflare-ddns.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "We don't provide an update function because the service ${APP} use every time the latest version." + msg_error "There is no update function for ${APP}." exit } @@ -35,11 +35,3 @@ start build_container description msg_ok "Completed Successfully!\n" -echo -e "${APP} setup has been successfully initialized!\n" -echo -e "If you want to update the service go to the container and run the command:\n" -echo -e "sudo nano /etc/systemd/system/cloudflare-ddns.service\n" -echo -e "Update the token or the other environment variables and save the file.\n" -echo -e "Then run the command:\n" -echo -e "sudo systemctl daemon-reload\n" -echo -e "And finally restart the service with:\n" -echo -e "sudo systemctl restart cloudflare-ddns.service" \ No newline at end of file diff --git a/install/cloudflare-ddns-install.sh b/install/cloudflare-ddns-install.sh index b4ea27f..daf4de0 100644 --- a/install/cloudflare-ddns-install.sh +++ b/install/cloudflare-ddns-install.sh @@ -14,54 +14,50 @@ network_check update_os msg_info "Installing dependencies" -$STD apt-get update $STD apt-get install -y curl systemd +msg_ok "Installed dependencies" msg_info "Installing Go" GO_VERSION=$(curl -s https://go.dev/VERSION?m=text | grep -m1 '^go') GO_TARBALL="${GO_VERSION}.linux-amd64.tar.gz" GO_URL="https://go.dev/dl/${GO_TARBALL}" INSTALL_DIR="/usr/bin" -echo "📦 Download Go ${GO_VERSION} from ${GO_URL}..." - rm -rf "${INSTALL_DIR}/go" - curl -LO "$GO_URL" tar -C "$INSTALL_DIR" -xzf "$GO_TARBALL" -rm "$GO_TARBALL" - echo 'export PATH=$PATH:/usr/bin/go/bin' >> ~/.bashrc source ~/.bashrc -go version - -msg_ok "Dependencies installed" +msg_ok "Installed Go" msg_info "Configure Application" - var_cf_api_token="default" -var_cf_api_token=$(whiptail --title "CLOUDFLARE TOKEN" --backtitle "Type the Cloudflare Api Token:" --inputbox "token" 10 60 3>&1 1>&2 2>&3) -msg_ok "Cloudflare Api Token: '${var_cf_api_token}'" +read -rp "Enter the Cloudflare API token: " var_cf_api_token var_cf_domains="default" -var_cf_domains=$(whiptail --title "CLOUDFLARE DOMAINS" --backtitle "Type the domains separated with a comma (example.org,www.example.org)" --inputbox "*.example.com" 10 60 3>&1 1>&2 2>&3) -msg_ok "Cloudflare Domains: '${var_cf_domains}'" +read -rp "Enter the domains separated with a comma (*.example.org,www.example.org) " var_cf_domains var_cf_proxied="false" -if whiptail --yesno "Proxied?" 8 45; then - var_cf_proxied="true" -fi +while true; do + read -rp "Proxied? (y/n): " answer + case "$answer" in + [Yy]* ) var_cf_proxied="true"; break;; + [Nn]* ) var_cf_proxied="false"; break;; + * ) echo "Please answer y or n.";; + esac +done var_cf_ip6_provider="none" -if whiptail --yesno "IPv6 Provider?" 8 45; then - var_cf_ip6_provider="cloudflare" -else - var_cf_ip6_provider="none" -fi +while true; do + read -rp "Enable IPv6 support? (y/n): " answer + case "$answer" in + [Yy]* ) var_cf_ip6_provider="auto"; break;; + [Nn]* ) var_cf_ip6_provider="none"; break;; + * ) echo "Please answer y or n.";; + esac +done +msg_ok "Configured Application" -msg_ok "Application Configured" - -msg_info "Setting up systemd service" +msg_info "Setting up service" mkdir -p /root/go -chown -R root:root /root/go cat </etc/systemd/system/cloudflare-ddns.service [Unit] Description=Cloudflare DDNS Service (Go run) @@ -84,8 +80,7 @@ EOF msg_ok "Systemd service configured" msg_info "Enabling and starting service" -systemctl daemon-reload -systemctl enable --now cloudflare-ddns.service +systemctl enable -q --now cloudflare-ddns.service msg_ok "Cloudflare DDNS service started" motd_ssh @@ -94,6 +89,5 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean +rm -f "$GO_TARBALL" msg_ok "Cleaned" - -msg_ok "Completed Successfully! Cloudflare DDNS is running in the background.\n" From ee0c9421daa0d872515f7d60b55e43aae8cc7707 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 18:17:38 +0200 Subject: [PATCH 0630/1614] Update tinyauth update procedure --- ct/alpine-tinyauth.sh | 11 +++++++++-- install/alpine-tinyauth-install.sh | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 2a4d2b6..79421a6 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -31,8 +31,13 @@ function update_script() { msg_ok "Updated Alpine Packages" msg_info "Updating tinyauth" + $STD service tinyauth stop + temp_file=$(mktemp) + cp /opt/tinyauth/.env /opt + rm -rf /opt/tinyauth + mkdir -p /opt/tinyauth RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - curl -fsSL https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz -o $temp_file + curl -fsSL "https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1 cd /opt/tinyauth/frontend $STD bun install @@ -41,10 +46,12 @@ function update_script() { cd /opt/tinyauth $STD go mod download CGO_ENABLED=0 go build -ldflags "-s -w" + cp /opt/.env /opt/tinyauth + rm -f "$temp_file" msg_ok "Updated tinyauth" msg_info "Restarting tinyauth" - $STD rc-service tinyauth restart + $STD service tinyauth start msg_ok "Restarted tinyauth" exit 0 diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh index 6dc0a8a..4210c17 100644 --- a/install/alpine-tinyauth-install.sh +++ b/install/alpine-tinyauth-install.sh @@ -25,7 +25,7 @@ temp_file=$(mktemp) $STD npm install -g bun mkdir -p /opt/tinyauth RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz -o $temp_file +curl -fsSL "https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1 cd /opt/tinyauth/frontend $STD bun install From 5e1ce1504e7eb255f7afc70f8e02285dc82f4b86 Mon Sep 17 00:00:00 2001 From: Edoardo Pavan Date: Thu, 24 Apr 2025 18:19:36 +0200 Subject: [PATCH 0631/1614] feat: add cloudflare-ddns.json --- frontend/public/json/cloudflare-ddns.json | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 frontend/public/json/cloudflare-ddns.json diff --git a/frontend/public/json/cloudflare-ddns.json b/frontend/public/json/cloudflare-ddns.json new file mode 100644 index 0000000..29ee612 --- /dev/null +++ b/frontend/public/json/cloudflare-ddns.json @@ -0,0 +1,44 @@ +{ + "name": "Cloudflare-DDNS", + "slug": "cloudflare-ddns", + "categories": [ + 4 + ], + "date_created": "2025-04-23", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": null, + "documentation": "https://github.com/favonia/cloudflare-ddns", + "config_path": "/etc/systemd/system/cloudflare-ddns.service", + "website": null, + "logo": null, + "description": "A feature-rich and robust Cloudflare DDNS updater with a small footprint. The program will detect your machine’s public IP addresses and update DNS records using the Cloudflare API", + "install_methods": [ + { + "type": "default", + "script": "ct/cloudflare-ddns.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "To setup the updater you must have the Cloudflare Token and the domains, please read the Github documentation at \"Step 1: Updating the Compose File\" (only the expandable section)", + "type": "warning" + }, + { + "text": "To update the configuration edit `/etc/systemd/system/cloudflare-ddns.service`. After edit please restard with `sudo systemctl restart cloudflare-ddns.service`", + "type": "info" + } + ] +} \ No newline at end of file From d0320473f19487945fdc2fdc128f768850f0c2bc Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 18:21:41 +0200 Subject: [PATCH 0632/1614] Update tinyauth update procedure --- ct/alpine-tinyauth.sh | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 79421a6..2d87160 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -21,10 +21,14 @@ catch_errors function update_script() { header_info + check_container_storage + check_container_resources + if [ ! -d /opt/tinyauth ]; then msg_error "No ${APP} Installation Found!" exit 1 fi + msg_info "Updating Alpine Packages" $STD apk update $STD apk upgrade @@ -37,18 +41,22 @@ function update_script() { rm -rf /opt/tinyauth mkdir -p /opt/tinyauth RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - curl -fsSL "https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" - tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1 - cd /opt/tinyauth/frontend - $STD bun install - $STD bun run build - mv dist /opt/tinyauth/internal/assets/ - cd /opt/tinyauth - $STD go mod download - CGO_ENABLED=0 go build -ldflags "-s -w" - cp /opt/.env /opt/tinyauth - rm -f "$temp_file" - msg_ok "Updated tinyauth" + if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then + curl -fsSL "https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" + tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1 + cd /opt/tinyauth/frontend + $STD bun install + $STD bun run build + mv dist /opt/tinyauth/internal/assets/ + cd /opt/tinyauth + $STD go mod download + CGO_ENABLED=0 go build -ldflags "-s -w" + cp /opt/.env /opt/tinyauth + rm -f "$temp_file" + msg_ok "Updated tinyauth" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi msg_info "Restarting tinyauth" $STD service tinyauth start From c862e687999313257432783b3a771d9fe991ff6f Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 18:35:59 +0200 Subject: [PATCH 0633/1614] Update tinyauth update procedure --- ct/alpine-tinyauth.sh | 4 ++-- install/alpine-tinyauth-install.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 2d87160..3635918 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -9,7 +9,7 @@ APP="Alpine-tinyauth" var_tags="${var_tags:-alpine;auth}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-512}" -var_disk="${var_disk:-4}" +var_disk="${var_disk:-3}" var_os="${var_os:-alpine}" var_version="${var_version:-3.21}" var_unprivileged="${var_unprivileged:-1}" @@ -41,7 +41,7 @@ function update_script() { rm -rf /opt/tinyauth mkdir -p /opt/tinyauth RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then + if [ "${RELEASE}" != "$(cat /opt/tinyauth_version.txt)" ] || [ ! -f /opt/tinyauth_version.txt ]; then curl -fsSL "https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1 cd /opt/tinyauth/frontend diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh index 4210c17..4b3b817 100644 --- a/install/alpine-tinyauth-install.sh +++ b/install/alpine-tinyauth-install.sh @@ -39,7 +39,7 @@ CGO_ENABLED=0 go build -ldflags "-s -w" echo "Username: admin@example.com" echo "Password: admin" } >>~/tinyauth.creds -echo "${RELEASE}" >"/opt/${APP}_version.txt" +echo "${RELEASE}" >/opt/tinyauth_version.txt msg_ok "Installed tinyauth" msg_info "Enabling tinyauth Service" From 54bab4455af51fbebbdcc813b68e244a592c5995 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 18:37:31 +0200 Subject: [PATCH 0634/1614] Update tinyauth update procedure --- install/alpine-tinyauth-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh index 4b3b817..9a7a627 100644 --- a/install/alpine-tinyauth-install.sh +++ b/install/alpine-tinyauth-install.sh @@ -70,6 +70,7 @@ depend() { use net } EOF + chmod +x /etc/init.d/tinyauth $STD rc-update add tinyauth default msg_ok "Enabled tinyauth Service" From 5d5c81d10066b1a63b482eb0188ef777471d46a6 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 18:45:36 +0200 Subject: [PATCH 0635/1614] Update tinyauth update procedure --- install/alpine-tinyauth-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh index 9a7a627..5692be0 100644 --- a/install/alpine-tinyauth-install.sh +++ b/install/alpine-tinyauth-install.sh @@ -62,7 +62,7 @@ pidfile="/var/run/tinyauth.pid" start_pre() { if [ -f "/opt/tinyauth/.env" ]; then - export $(grep -v '^#' /opt/tinyauth/.env | xargs) + export \$(grep -v '^#' /opt/tinyauth/.env | xargs) fi } From 8c0f373cf982b573d167ac1853fbe56094cfc66a Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 18:55:08 +0200 Subject: [PATCH 0636/1614] Update tinyauth update procedure --- ct/alpine-tinyauth.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 3635918..4b30f96 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -21,8 +21,6 @@ catch_errors function update_script() { header_info - check_container_storage - check_container_resources if [ ! -d /opt/tinyauth ]; then msg_error "No ${APP} Installation Found!" From ccdad0e478d6b3182aa525d16d5b281f1c538408 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 19:14:14 +0200 Subject: [PATCH 0637/1614] Update tinyauth update procedure --- ct/alpine-tinyauth.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 4b30f96..7c4e482 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -50,6 +50,7 @@ function update_script() { $STD go mod download CGO_ENABLED=0 go build -ldflags "-s -w" cp /opt/.env /opt/tinyauth + echo "${RELEASE}" >/opt/tinyauth_version.txt rm -f "$temp_file" msg_ok "Updated tinyauth" else From df626f08acf35e9c102ea21e0a12f14386148676 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 19:21:32 +0200 Subject: [PATCH 0638/1614] Update tinyauth update procedure --- ct/alpine-tinyauth.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 7c4e482..2984c96 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -20,8 +20,6 @@ color catch_errors function update_script() { - header_info - if [ ! -d /opt/tinyauth ]; then msg_error "No ${APP} Installation Found!" exit 1 From 06c22e72f0b6bbe5d861516e677bdb7622567194 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 24 Apr 2025 19:37:18 +0200 Subject: [PATCH 0639/1614] Update tinyauth update procedure --- ct/alpine-tinyauth.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 2984c96..057f839 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -20,7 +20,7 @@ color catch_errors function update_script() { - if [ ! -d /opt/tinyauth ]; then + if [[ ! -d /opt/tinyauth ]]; then msg_error "No ${APP} Installation Found!" exit 1 fi From 842d776aa143c4a98870946af1f46c7da7866ead Mon Sep 17 00:00:00 2001 From: "GitHub Actions[bot]" Date: Fri, 25 Apr 2025 12:36:50 +0000 Subject: [PATCH 0640/1614] Update versions.json --- frontend/public/json/versions.json | 238 ++++++++++++++--------------- 1 file changed, 119 insertions(+), 119 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 84dc0f6..ab1e5f7 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,18 +1,128 @@ [ { - "name": "immich-app/immich", - "version": "v1.132.1", - "date": "2025-04-23T22:08:21Z" + "name": "zitadel/zitadel", + "version": "v2.71.8", + "date": "2025-04-25T11:50:04Z" + }, + { + "name": "photoprism/photoprism", + "version": "250425-21ddba459", + "date": "2025-04-25T11:18:53Z" }, { "name": "fhem/fhem-mirror", "version": "6.2", - "date": "2025-04-23T20:31:09Z" + "date": "2025-04-25T10:34:09Z" + }, + { + "name": "home-assistant/core", + "version": "2025.4.4", + "date": "2025-04-25T07:47:57Z" + }, + { + "name": "donaldzou/WGDashboard", + "version": "v4.2.2", + "date": "2025-04-25T07:42:03Z" + }, + { + "name": "evcc-io/evcc", + "version": "0.203.3", + "date": "2025-04-25T06:29:28Z" + }, + { + "name": "mattermost/mattermost", + "version": "v10.6.2", + "date": "2025-04-15T08:14:23Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1823", + "date": "2025-04-25T05:52:52Z" + }, + { + "name": "goauthentik/authentik", + "version": "version/2025.4.0-rc1", + "date": "2025-04-25T04:53:56Z" + }, + { + "name": "immich-app/immich", + "version": "v1.132.2", + "date": "2025-04-25T03:07:06Z" + }, + { + "name": "moghtech/komodo", + "version": "v1.17.3", + "date": "2025-04-25T02:33:19Z" + }, + { + "name": "docmost/docmost", + "version": "v0.20.3", + "date": "2025-04-24T22:33:32Z" }, { "name": "mongodb/mongo", - "version": "r6.0.22", - "date": "2025-04-23T19:53:55Z" + "version": "r7.0.19", + "date": "2025-04-24T20:59:43Z" + }, + { + "name": "keycloak/keycloak", + "version": "26.2.1", + "date": "2025-04-23T12:17:17Z" + }, + { + "name": "rogerfar/rdt-client", + "version": "v2.0.110", + "date": "2025-04-24T19:11:06Z" + }, + { + "name": "cross-seed/cross-seed", + "version": "v6.11.2", + "date": "2025-02-26T14:54:49Z" + }, + { + "name": "dotnetfactory/fluid-calendar", + "version": "v1.4.0", + "date": "2025-04-24T16:20:17Z" + }, + { + "name": "jhuckaby/Cronicle", + "version": "v0.9.79", + "date": "2025-04-24T15:53:43Z" + }, + { + "name": "openobserve/openobserve", + "version": "v0.14.6-rc8", + "date": "2025-04-24T15:39:41Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.3.0p31", + "date": "2025-04-24T15:08:03Z" + }, + { + "name": "glpi-project/glpi", + "version": "10.0.18", + "date": "2025-02-12T11:07:02Z" + }, + { + "name": "zwave-js/zwave-js-ui", + "version": "v10.3.1", + "date": "2025-04-24T08:47:43Z" + }, + { + "name": "NLnetLabs/unbound", + "version": "release-1.23.0", + "date": "2025-04-24T08:07:21Z" + }, + { + "name": "inventree/InvenTree", + "version": "0.17.11", + "date": "2025-04-24T05:25:55Z" + }, + { + "name": "syncthing/syncthing", + "version": "v2.0.0-beta.9", + "date": "2025-04-12T13:58:29Z" }, { "name": "Radarr/Radarr", @@ -31,8 +141,8 @@ }, { "name": "runtipi/runtipi", - "version": "nightly", - "date": "2025-04-21T16:55:50Z" + "version": "v3.10.0-beta.9", + "date": "2025-04-17T11:46:08Z" }, { "name": "NodeBB/NodeBB", @@ -44,41 +154,16 @@ "version": "v11.6.1", "date": "2025-04-23T17:04:02Z" }, - { - "name": "syncthing/syncthing", - "version": "v2.0.0-beta.9", - "date": "2025-04-12T13:58:29Z" - }, { "name": "nzbgetcom/nzbget", "version": "v24.8", "date": "2025-03-18T07:33:51Z" }, - { - "name": "docmost/docmost", - "version": "v0.20.1", - "date": "2025-04-23T13:44:12Z" - }, - { - "name": "Checkmk/checkmk", - "version": "v2.3.0p31-rc1", - "date": "2025-04-23T13:16:47Z" - }, - { - "name": "keycloak/keycloak", - "version": "26.2.1", - "date": "2025-04-23T12:17:17Z" - }, { "name": "redis/redis", "version": "7.4.3", "date": "2025-04-23T12:00:04Z" }, - { - "name": "donaldzou/WGDashboard", - "version": "v4.2.1", - "date": "2025-04-23T11:42:05Z" - }, { "name": "Graylog2/graylog2-server", "version": "6.3.0-alpha.1", @@ -89,11 +174,6 @@ "version": "337", "date": "2025-04-23T08:26:31Z" }, - { - "name": "mattermost/mattermost", - "version": "v10.6.2", - "date": "2025-04-15T08:14:23Z" - }, { "name": "zabbix/zabbix", "version": "7.2.6", @@ -104,26 +184,6 @@ "version": "v7.4.1", "date": "2025-04-23T06:40:34Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1815", - "date": "2025-04-23T05:56:23Z" - }, - { - "name": "openobserve/openobserve", - "version": "v0.14.6-rc6", - "date": "2025-04-23T04:24:27Z" - }, - { - "name": "jhuckaby/Cronicle", - "version": "v0.9.78", - "date": "2025-04-23T01:38:28Z" - }, - { - "name": "cross-seed/cross-seed", - "version": "v6.11.2", - "date": "2025-02-26T14:54:49Z" - }, { "name": "minio/minio", "version": "RELEASE.2025-04-22T22-12-26Z", @@ -144,16 +204,6 @@ "version": "jenkins-2.507", "date": "2025-04-22T15:22:53Z" }, - { - "name": "evcc-io/evcc", - "version": "0.203.2", - "date": "2025-04-22T15:07:28Z" - }, - { - "name": "zwave-js/zwave-js-ui", - "version": "v10.3.0", - "date": "2025-04-22T14:57:47Z" - }, { "name": "OliveTin/OliveTin", "version": "2025.4.22", @@ -274,20 +324,10 @@ "version": "v11.8.7", "date": "2025-04-19T11:19:29Z" }, - { - "name": "home-assistant/core", - "version": "2025.4.3", - "date": "2025-04-19T10:23:38Z" - }, - { - "name": "moghtech/komodo", - "version": "v1.17.2", - "date": "2025-04-19T06:56:25Z" - }, { "name": "ollama/ollama", "version": "v0.6.6", - "date": "2025-04-19T01:13:05Z" + "date": "2025-04-17T04:34:58Z" }, { "name": "caddyserver/caddy", @@ -428,45 +468,5 @@ "name": "Stirling-Tools/Stirling-PDF", "version": "v0.45.6", "date": "2025-04-15T14:16:52Z" - }, - { - "name": "slskd/slskd", - "version": "0.22.5", - "date": "2025-04-15T02:52:26Z" - }, - { - "name": "blakeblackshear/frigate", - "version": "v0.14.1", - "date": "2024-08-29T22:32:51Z" - }, - { - "name": "home-assistant/operating-system", - "version": "15.2", - "date": "2025-04-14T15:37:12Z" - }, - { - "name": "stackblitz-labs/bolt.diy", - "version": "v0.0.7-hf1", - "date": "2025-03-10T20:49:39Z" - }, - { - "name": "bluenviron/mediamtx", - "version": "v1.12.0", - "date": "2025-04-14T10:36:04Z" - }, - { - "name": "open-webui/open-webui", - "version": "v0.6.5", - "date": "2025-04-14T09:13:36Z" - }, - { - "name": "rogerfar/rdt-client", - "version": "v2.0.108", - "date": "2025-04-13T22:17:55Z" - }, - { - "name": "autobrr/autobrr", - "version": "v1.61.0", - "date": "2025-04-13T21:14:40Z" } ] From a178d2e97bb5a00c28bba9a80733a0aa12078468 Mon Sep 17 00:00:00 2001 From: elvito Date: Sat, 26 Apr 2025 10:56:52 +0200 Subject: [PATCH 0641/1614] Create librespeed-install.sh --- install/librespeed-install.sh | 1 + 1 file changed, 1 insertion(+) create mode 100644 install/librespeed-install.sh diff --git a/install/librespeed-install.sh b/install/librespeed-install.sh new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/install/librespeed-install.sh @@ -0,0 +1 @@ + From 473746a1a5470a19f61fd56315aa97ee777ffac9 Mon Sep 17 00:00:00 2001 From: elvito Date: Sat, 26 Apr 2025 10:57:10 +0200 Subject: [PATCH 0642/1614] Create librespeed.sh --- ct/librespeed.sh | 1 + 1 file changed, 1 insertion(+) create mode 100644 ct/librespeed.sh diff --git a/ct/librespeed.sh b/ct/librespeed.sh new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ct/librespeed.sh @@ -0,0 +1 @@ + From ade09418e0959a5821cdfa830c354738c1c05f91 Mon Sep 17 00:00:00 2001 From: elvito Date: Sat, 26 Apr 2025 10:57:47 +0200 Subject: [PATCH 0643/1614] Create librespeed.json --- frontend/public/json/librespeed.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 frontend/public/json/librespeed.json diff --git a/frontend/public/json/librespeed.json b/frontend/public/json/librespeed.json new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/frontend/public/json/librespeed.json @@ -0,0 +1 @@ + From d425d44f4dda440f0fa2d55e85bb5140bc2fbcd6 Mon Sep 17 00:00:00 2001 From: elvito Date: Sat, 26 Apr 2025 11:00:02 +0200 Subject: [PATCH 0644/1614] Update librespeed.sh --- ct/librespeed.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/ct/librespeed.sh b/ct/librespeed.sh index 8b13789..487df58 100644 --- a/ct/librespeed.sh +++ b/ct/librespeed.sh @@ -1 +1,57 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/refs/heads/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: elvito +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/librespeed/speedtest + +APP="librespeed" +var_tags="speedtest" +var_cpu="1" +var_ram="512" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f /opt/librespeed/index.html ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -fsSL https://api.github.com/repos/librespeed/speedtest/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') + if [[ ! -f /opt/librespeed/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt//librespeed/${APP}_version.txt)" ]]; then + msg_info "Updating $APP..." + temp_file=$(mktemp) + curl -fsSL "https://github.com/librespeed/speedtest/archive/refs/tags/${RELEASE}.zip" -o $temp_file + mkdir -p /temp + unzip -qu $temp_file -d /temp + cd /temp/speedtest-${RELEASE} + cp -u favicon.ico index.html speedtest.js speedtest_worker.js /opt/librespeed/ + cp -ru backend /opt/librespeed/ + echo "${RELEASE}" >"/opt/librespeed/librespeed_version.txt" + systemctl restart caddy + msg_ok "$APP has been updated." + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + 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}:80${CL}" From 476fdbdd4237122e7d101ea4b56d5ad780540c19 Mon Sep 17 00:00:00 2001 From: elvito Date: Sat, 26 Apr 2025 11:01:13 +0200 Subject: [PATCH 0645/1614] Update librespeed-install.sh --- install/librespeed-install.sh | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/install/librespeed-install.sh b/install/librespeed-install.sh index 8b13789..ab1ec6c 100644 --- a/install/librespeed-install.sh +++ b/install/librespeed-install.sh @@ -1 +1,56 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: elvito +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/librespeed/speedtest + +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 update +$STD apt-get install -y \ + caddy \ + php-fpm +msg_ok "Installed Dependencies" + +msg_info "Installing librespeed" +temp_file=$(mktemp) +RELEASE=$(curl -fsSL https://api.github.com/repos/librespeed/speedtest/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') +curl -fsSL "https://github.com/librespeed/speedtest/archive/refs/tags/${RELEASE}.zip" -o $temp_file +mkdir -p /opt/librespeed +mkdir -p /temp +unzip -q $temp_file -d /temp +cd /temp/speedtest-${RELEASE} +cp -u favicon.ico index.html speedtest.js speedtest_worker.js /opt/librespeed/ +cp -ru backend results /opt/librespeed/ +echo "${RELEASE}" >"/opt/librespeed/librespeed_version.txt" +msg_ok "Installation completed" + +msg_info "Creating Caddyfile" +cat </etc/caddy/Caddyfile +:80 { + root * /opt/librespeed + file_server + php_fastcgi unix//run/php/php-fpm.sock +} +EOF +systemctl restart caddy +msg_ok "Caddyfile created" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /temp +rm -f $temp_file +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 03199562d5c74d07d6764fbca920694c7abd8d76 Mon Sep 17 00:00:00 2001 From: elvito Date: Sat, 26 Apr 2025 11:02:30 +0200 Subject: [PATCH 0646/1614] Update librespeed.json --- frontend/public/json/librespeed.json | 41 +++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/frontend/public/json/librespeed.json b/frontend/public/json/librespeed.json index 8b13789..8ee55dc 100644 --- a/frontend/public/json/librespeed.json +++ b/frontend/public/json/librespeed.json @@ -1 +1,40 @@ - +{ + "name": "Librespeed", + "slug": "librespeed", + "categories": [ + 4 + ], + "date_created": "2025-04-25", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": null, + "config_path": "", + "website": null, + "logo": "https://github.com/librespeed/speedtest/blob/master/.logo/icon_huge.png", + "description": "No Flash, No Java, No Websocket, No Bullshit. This is a very lightweight speed test implemented in Javascript, using XMLHttpRequest and Web Workers.", + "install_methods": [ + { + "type": "default", + "script": "ct/librespeed.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 4, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "root", + "password": null + }, + "notes": [ + { + "text": "", + "type": "" + } + ] +} From 569d3cfc31e219d044b4142ea41d17fb03486660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Sat, 26 Apr 2025 18:40:09 +0200 Subject: [PATCH 0647/1614] Update librespeed.sh --- ct/librespeed.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ct/librespeed.sh b/ct/librespeed.sh index 487df58..1213943 100644 --- a/ct/librespeed.sh +++ b/ct/librespeed.sh @@ -20,16 +20,16 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources + header_info + check_container_storage + check_container_resources - if [[ ! -f /opt/librespeed/index.html ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - RELEASE=$(curl -fsSL https://api.github.com/repos/librespeed/speedtest/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') - if [[ ! -f /opt/librespeed/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt//librespeed/${APP}_version.txt)" ]]; then + if [[ ! -f /opt/librespeed/index.html ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -fsSL https://api.github.com/repos/librespeed/speedtest/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') + if [[ ! -f /opt/librespeed/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt//librespeed/${APP}_version.txt)" ]]; then msg_info "Updating $APP..." temp_file=$(mktemp) curl -fsSL "https://github.com/librespeed/speedtest/archive/refs/tags/${RELEASE}.zip" -o $temp_file @@ -41,7 +41,7 @@ function update_script() { echo "${RELEASE}" >"/opt/librespeed/librespeed_version.txt" systemctl restart caddy msg_ok "$APP has been updated." - else + else msg_ok "No update required. ${APP} is already at ${RELEASE}" fi exit @@ -53,5 +53,5 @@ 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}:80${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" From a351d12156c8cdc60a173bd3e147c8f82f62ab8c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 26 Apr 2025 21:15:44 +0200 Subject: [PATCH 0648/1614] Update frontend/public/json/librespeed.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- frontend/public/json/librespeed.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/frontend/public/json/librespeed.json b/frontend/public/json/librespeed.json index 8ee55dc..2ae9ced 100644 --- a/frontend/public/json/librespeed.json +++ b/frontend/public/json/librespeed.json @@ -31,10 +31,5 @@ "username": "root", "password": null }, - "notes": [ - { - "text": "", - "type": "" - } - ] + "notes": [] } From 27e85df4677966f55e3a2cce2a60e7eca0da1d0e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 26 Apr 2025 21:15:48 +0200 Subject: [PATCH 0649/1614] Update frontend/public/json/librespeed.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- frontend/public/json/librespeed.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/librespeed.json b/frontend/public/json/librespeed.json index 2ae9ced..3f717ed 100644 --- a/frontend/public/json/librespeed.json +++ b/frontend/public/json/librespeed.json @@ -9,7 +9,7 @@ "updateable": true, "privileged": false, "interface_port": 80, - "documentation": null, + "documentation": "https://github.com/librespeed/speedtest/blob/master/doc.md", "config_path": "", "website": null, "logo": "https://github.com/librespeed/speedtest/blob/master/.logo/icon_huge.png", From f90237b55df3c362db13dfc9c518c2f05ce1fb37 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 26 Apr 2025 21:15:55 +0200 Subject: [PATCH 0650/1614] Update frontend/public/json/librespeed.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- frontend/public/json/librespeed.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/librespeed.json b/frontend/public/json/librespeed.json index 3f717ed..8be8b80 100644 --- a/frontend/public/json/librespeed.json +++ b/frontend/public/json/librespeed.json @@ -11,7 +11,7 @@ "interface_port": 80, "documentation": "https://github.com/librespeed/speedtest/blob/master/doc.md", "config_path": "", - "website": null, + "website": "https://librespeed.org", "logo": "https://github.com/librespeed/speedtest/blob/master/.logo/icon_huge.png", "description": "No Flash, No Java, No Websocket, No Bullshit. This is a very lightweight speed test implemented in Javascript, using XMLHttpRequest and Web Workers.", "install_methods": [ From 2520e5d40df55e9b5b98c38c82d0569f90a0b817 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 26 Apr 2025 21:16:05 +0200 Subject: [PATCH 0651/1614] Update frontend/public/json/librespeed.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- frontend/public/json/librespeed.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/librespeed.json b/frontend/public/json/librespeed.json index 8be8b80..c6292c5 100644 --- a/frontend/public/json/librespeed.json +++ b/frontend/public/json/librespeed.json @@ -4,7 +4,7 @@ "categories": [ 4 ], - "date_created": "2025-04-25", + "date_created": "2025-04-26", "type": "ct", "updateable": true, "privileged": false, From 3242b993db57f24a698f9b39e5547be3b33954d6 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 26 Apr 2025 19:16:41 +0000 Subject: [PATCH 0652/1614] Update .app files --- ct/headers/librespeed | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/librespeed diff --git a/ct/headers/librespeed b/ct/headers/librespeed new file mode 100644 index 0000000..b75b5ce --- /dev/null +++ b/ct/headers/librespeed @@ -0,0 +1,6 @@ + ___ __ __ + / (_) /_ ________ _________ ___ ___ ____/ / + / / / __ \/ ___/ _ \/ ___/ __ \/ _ \/ _ \/ __ / + / / / /_/ / / / __(__ ) /_/ / __/ __/ /_/ / +/_/_/_.___/_/ \___/____/ .___/\___/\___/\__,_/ + /_/ From 606940889f1b78d2c77219e83ee5aa5473bdb35c Mon Sep 17 00:00:00 2001 From: tremor021 Date: Sun, 27 Apr 2025 01:32:10 +0200 Subject: [PATCH 0653/1614] Update librespeed install --- install/librespeed-install.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/install/librespeed-install.sh b/install/librespeed-install.sh index ab1ec6c..b60aab6 100644 --- a/install/librespeed-install.sh +++ b/install/librespeed-install.sh @@ -5,7 +5,7 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/librespeed/speedtest -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -30,10 +30,7 @@ unzip -q $temp_file -d /temp cd /temp/speedtest-${RELEASE} cp -u favicon.ico index.html speedtest.js speedtest_worker.js /opt/librespeed/ cp -ru backend results /opt/librespeed/ -echo "${RELEASE}" >"/opt/librespeed/librespeed_version.txt" -msg_ok "Installation completed" -msg_info "Creating Caddyfile" cat </etc/caddy/Caddyfile :80 { root * /opt/librespeed @@ -41,8 +38,10 @@ cat </etc/caddy/Caddyfile php_fastcgi unix//run/php/php-fpm.sock } EOF + systemctl restart caddy -msg_ok "Caddyfile created" +echo "${RELEASE}" >"/opt/librespeed/librespeed_version.txt" +msg_ok "Installation completed" motd_ssh customize @@ -53,4 +52,3 @@ rm -f $temp_file $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" - From 34d5e38b63d3abe00b49d34b67819bdc143e8e7b Mon Sep 17 00:00:00 2001 From: tremor021 Date: Sun, 27 Apr 2025 01:35:41 +0200 Subject: [PATCH 0654/1614] Update librespeed --- ct/librespeed.sh | 9 ++++----- install/librespeed-install.sh | 10 +++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ct/librespeed.sh b/ct/librespeed.sh index 1213943..f01376f 100644 --- a/ct/librespeed.sh +++ b/ct/librespeed.sh @@ -32,13 +32,13 @@ function update_script() { if [[ ! -f /opt/librespeed/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt//librespeed/${APP}_version.txt)" ]]; then msg_info "Updating $APP..." temp_file=$(mktemp) - curl -fsSL "https://github.com/librespeed/speedtest/archive/refs/tags/${RELEASE}.zip" -o $temp_file + curl -fsSL "https://github.com/librespeed/speedtest/archive/refs/tags/${RELEASE}.zip" -o "$temp_file" mkdir -p /temp - unzip -qu $temp_file -d /temp - cd /temp/speedtest-${RELEASE} + unzip -qu "$temp_file" -d /temp + cd /temp/speedtest-"${RELEASE}" cp -u favicon.ico index.html speedtest.js speedtest_worker.js /opt/librespeed/ cp -ru backend /opt/librespeed/ - echo "${RELEASE}" >"/opt/librespeed/librespeed_version.txt" + echo "${RELEASE}" >/opt/librespeed/"${APP}_version.txt" systemctl restart caddy msg_ok "$APP has been updated." else @@ -54,4 +54,3 @@ 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/install/librespeed-install.sh b/install/librespeed-install.sh index b60aab6..8b2bc48 100644 --- a/install/librespeed-install.sh +++ b/install/librespeed-install.sh @@ -23,11 +23,11 @@ msg_ok "Installed Dependencies" msg_info "Installing librespeed" temp_file=$(mktemp) RELEASE=$(curl -fsSL https://api.github.com/repos/librespeed/speedtest/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') -curl -fsSL "https://github.com/librespeed/speedtest/archive/refs/tags/${RELEASE}.zip" -o $temp_file +curl -fsSL "https://github.com/librespeed/speedtest/archive/refs/tags/${RELEASE}.zip" -o "$temp_file" mkdir -p /opt/librespeed mkdir -p /temp -unzip -q $temp_file -d /temp -cd /temp/speedtest-${RELEASE} +unzip -q "$temp_file" -d /temp +cd /temp/speedtest-"${RELEASE}" cp -u favicon.ico index.html speedtest.js speedtest_worker.js /opt/librespeed/ cp -ru backend results /opt/librespeed/ @@ -40,7 +40,7 @@ cat </etc/caddy/Caddyfile EOF systemctl restart caddy -echo "${RELEASE}" >"/opt/librespeed/librespeed_version.txt" +echo "${RELEASE}" >/opt/"${APP}_version.txt" msg_ok "Installation completed" motd_ssh @@ -48,7 +48,7 @@ customize msg_info "Cleaning up" rm -rf /temp -rm -f $temp_file +rm -f "$temp_file" $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From b5c01125e638099aac317e5d7513c77bbe93f349 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Sun, 27 Apr 2025 01:36:40 +0200 Subject: [PATCH 0655/1614] Update librespeed --- ct/librespeed.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/librespeed.sh b/ct/librespeed.sh index f01376f..931248c 100644 --- a/ct/librespeed.sh +++ b/ct/librespeed.sh @@ -38,7 +38,7 @@ function update_script() { cd /temp/speedtest-"${RELEASE}" cp -u favicon.ico index.html speedtest.js speedtest_worker.js /opt/librespeed/ cp -ru backend /opt/librespeed/ - echo "${RELEASE}" >/opt/librespeed/"${APP}_version.txt" + echo "${RELEASE}" >/opt/"${APP}"_version.txt systemctl restart caddy msg_ok "$APP has been updated." else From e78a588c64994e527ff31d3094781fa9c7cd0fa1 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Sun, 27 Apr 2025 15:39:46 +0200 Subject: [PATCH 0656/1614] move-to-main-repo.yaml aktualisieren --- .github/workflows/move-to-main-repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/move-to-main-repo.yaml b/.github/workflows/move-to-main-repo.yaml index 0f49556..77c8d37 100644 --- a/.github/workflows/move-to-main-repo.yaml +++ b/.github/workflows/move-to-main-repo.yaml @@ -134,7 +134,7 @@ jobs: sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|' ct/$script_name.sh sed -i 's|# License: MIT \| https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE|# License: MIT \| https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE|' ct/$script_name.sh - sed -i 's|# License: MIT \| https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE|# License: MIT \| https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE|' ct/$script_name-install.sh + sed -i 's|# License: MIT \| https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE|# License: MIT \| https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE|' install/$script_name-install.sh git add . if git diff --cached --exit-code; then echo "No changes detected, skipping commit." From 9d0c90432e210e1b8bb898680ea45ee768058924 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Sun, 27 Apr 2025 23:04:54 +0200 Subject: [PATCH 0657/1614] Fix immich directory creation --- install/immich-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/immich-install.sh b/install/immich-install.sh index 58e3395..3f99b26 100644 --- a/install/immich-install.sh +++ b/install/immich-install.sh @@ -258,7 +258,7 @@ ML_DIR="${APP_DIR}/machine-learning" GEO_DIR="${INSTALL_DIR}/geodata" mkdir -p "$INSTALL_DIR" mv "$APPLICATION-$RELEASE"/ "$SRC_DIR" -mkdir -p "{$APP_DIR,$UPLOAD_DIR,$GEO_DIR,$ML_DIR,$INSTALL_DIR/.cache}" +mkdir -p $APP_DIR $UPLOAD_DIR $GEO_DIR $ML_DIR $INSTALL_DIR/.cache cd "$SRC_DIR"/server || exit $STD npm ci From 0105cb2b8aa318d16ce7aa760962dcb0e0e39d96 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 28 Apr 2025 09:29:12 +0200 Subject: [PATCH 0658/1614] cleanup --- .../CONTRIBUTOR_AND_GUIDES}/CODE-AUDIT.md | 0 .../CONTRIBUTOR_AND_GUIDES}/CONTRIBUTING.md | 0 .../USER_SUBMITTED_GUIDES.md | 0 .../CONTRIBUTOR_AND_GUIDES}/ct/AppName.md | 0 .../CONTRIBUTOR_AND_GUIDES}/ct/AppName.sh | 0 .../install/AppName-install.md | 0 .../install/AppName-install.sh | 0 .../CONTRIBUTOR_AND_GUIDES}/json/AppName.json | 0 .../CONTRIBUTOR_AND_GUIDES}/json/AppName.md | 0 docs/CODE_OF_CONDUCT.md => CODE_OF_CONDUCT.md | 0 {core/api => api}/.env.example | 0 {core/api => api}/go.mod | 0 {core/api => api}/go.sum | 0 {core/api => api}/main.go | 0 ct/ollama.sh | 43 ++++++++ install/ollama-install.sh | 98 +++++++++++++++++++ {vms => vm}/debian-vm-test-helper.sh | 0 {vms => vm}/debian-vm.sh | 0 18 files changed, 141 insertions(+) rename {docs => .github/CONTRIBUTOR_AND_GUIDES}/CODE-AUDIT.md (100%) rename {docs => .github/CONTRIBUTOR_AND_GUIDES}/CONTRIBUTING.md (100%) rename {docs => .github/CONTRIBUTOR_AND_GUIDES}/USER_SUBMITTED_GUIDES.md (100%) rename {docs => .github/CONTRIBUTOR_AND_GUIDES}/ct/AppName.md (100%) rename {docs => .github/CONTRIBUTOR_AND_GUIDES}/ct/AppName.sh (100%) rename {docs => .github/CONTRIBUTOR_AND_GUIDES}/install/AppName-install.md (100%) rename {docs => .github/CONTRIBUTOR_AND_GUIDES}/install/AppName-install.sh (100%) rename {docs => .github/CONTRIBUTOR_AND_GUIDES}/json/AppName.json (100%) rename {docs => .github/CONTRIBUTOR_AND_GUIDES}/json/AppName.md (100%) rename docs/CODE_OF_CONDUCT.md => CODE_OF_CONDUCT.md (100%) rename {core/api => api}/.env.example (100%) rename {core/api => api}/go.mod (100%) rename {core/api => api}/go.sum (100%) rename {core/api => api}/main.go (100%) create mode 100644 ct/ollama.sh create mode 100644 install/ollama-install.sh rename {vms => vm}/debian-vm-test-helper.sh (100%) rename {vms => vm}/debian-vm.sh (100%) diff --git a/docs/CODE-AUDIT.md b/.github/CONTRIBUTOR_AND_GUIDES/CODE-AUDIT.md similarity index 100% rename from docs/CODE-AUDIT.md rename to .github/CONTRIBUTOR_AND_GUIDES/CODE-AUDIT.md diff --git a/docs/CONTRIBUTING.md b/.github/CONTRIBUTOR_AND_GUIDES/CONTRIBUTING.md similarity index 100% rename from docs/CONTRIBUTING.md rename to .github/CONTRIBUTOR_AND_GUIDES/CONTRIBUTING.md diff --git a/docs/USER_SUBMITTED_GUIDES.md b/.github/CONTRIBUTOR_AND_GUIDES/USER_SUBMITTED_GUIDES.md similarity index 100% rename from docs/USER_SUBMITTED_GUIDES.md rename to .github/CONTRIBUTOR_AND_GUIDES/USER_SUBMITTED_GUIDES.md diff --git a/docs/ct/AppName.md b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md similarity index 100% rename from docs/ct/AppName.md rename to .github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md diff --git a/docs/ct/AppName.sh b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh similarity index 100% rename from docs/ct/AppName.sh rename to .github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh diff --git a/docs/install/AppName-install.md b/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md similarity index 100% rename from docs/install/AppName-install.md rename to .github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md diff --git a/docs/install/AppName-install.sh b/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh similarity index 100% rename from docs/install/AppName-install.sh rename to .github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh diff --git a/docs/json/AppName.json b/.github/CONTRIBUTOR_AND_GUIDES/json/AppName.json similarity index 100% rename from docs/json/AppName.json rename to .github/CONTRIBUTOR_AND_GUIDES/json/AppName.json diff --git a/docs/json/AppName.md b/.github/CONTRIBUTOR_AND_GUIDES/json/AppName.md similarity index 100% rename from docs/json/AppName.md rename to .github/CONTRIBUTOR_AND_GUIDES/json/AppName.md diff --git a/docs/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md similarity index 100% rename from docs/CODE_OF_CONDUCT.md rename to CODE_OF_CONDUCT.md diff --git a/core/api/.env.example b/api/.env.example similarity index 100% rename from core/api/.env.example rename to api/.env.example diff --git a/core/api/go.mod b/api/go.mod similarity index 100% rename from core/api/go.mod rename to api/go.mod diff --git a/core/api/go.sum b/api/go.sum similarity index 100% rename from core/api/go.sum rename to api/go.sum diff --git a/core/api/main.go b/api/main.go similarity index 100% rename from core/api/main.go rename to api/main.go diff --git a/ct/ollama.sh b/ct/ollama.sh new file mode 100644 index 0000000..8a2c4b4 --- /dev/null +++ b/ct/ollama.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 tteck +# Author: tteck | Co-Author: havardthom +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://ollama.com/ + +APP="Ollama" +var_tags="${var_tags:-ai}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-24}" +var_os="${var_os:-ubuntu}" +var_version="${var_version:-22.04}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/ollama ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP}" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "Updated Successfully" + 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}:14434${CL}" \ No newline at end of file diff --git a/install/ollama-install.sh b/install/ollama-install.sh new file mode 100644 index 0000000..fd0baac --- /dev/null +++ b/install/ollama-install.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 tteck +# Author: tteck +# Co-Author: havardthom +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://ollama.com/ + +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 \ + gpg \ + git \ + build-essential \ + pkg-config \ + cmake +msg_ok "Installed Dependencies" + +msg_info "Installing Golang" +set +o pipefail +temp_file=$(mktemp) +golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) +curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" +tar -C /usr/local -xzf "$temp_file" +ln -sf /usr/local/go/bin/go /usr/local/bin/go +rm -f "$temp_file" +set -o pipefail +msg_ok "Installed Golang" + +msg_info "Setting up Intel® Repositories" +mkdir -p /etc/apt/keyrings +curl -fsSL https://repositories.intel.com/gpu/intel-graphics.key | gpg --dearmor -o /etc/apt/keyrings/intel-graphics.gpg +echo "deb [arch=amd64,i386 signed-by=/etc/apt/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy client" >/etc/apt/sources.list.d/intel-gpu-jammy.list +curl -fsSL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor -o /etc/apt/keyrings/oneapi-archive-keyring.gpg +echo "deb [signed-by=/etc/apt/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" >/etc/apt/sources.list.d/oneAPI.list +$STD apt-get update +msg_ok "Set up Intel® Repositories" + +msg_info "Setting Up Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools,intel-level-zero-gpu,level-zero,level-zero-dev} +if [[ "$CTTYPE" == "0" ]]; then + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render +fi +msg_ok "Set Up Hardware Acceleration" + +msg_info "Installing Intel® oneAPI Base Toolkit (Patience)" +$STD apt-get install -y --no-install-recommends intel-basekit-2024.1 +msg_ok "Installed Intel® oneAPI Base Toolkit" + +msg_info "Installing Ollama (Patience)" +$STD git clone https://github.com/ollama/ollama.git /opt/ollama +cd /opt/ollama +$STD go generate ./... +$STD go build . +msg_ok "Installed Ollama" + +msg_info "Creating Service" +cat </etc/systemd/system/ollama.service +[Unit] +Description=Ollama Service +After=network-online.target + +[Service] +Type=exec +ExecStart=/opt/ollama/ollama serve +Environment=HOME=$HOME +Environment=OLLAMA_INTEL_GPU=true +Environment=OLLAMA_HOST=0.0.0.0 +Environment=OLLAMA_NUM_GPU=999 +Environment=SYCL_CACHE_PERSISTENT=1 +Environment=ZES_ENABLE_SYSMAN=1 +Restart=always +RestartSec=3 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now ollama +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/vms/debian-vm-test-helper.sh b/vm/debian-vm-test-helper.sh similarity index 100% rename from vms/debian-vm-test-helper.sh rename to vm/debian-vm-test-helper.sh diff --git a/vms/debian-vm.sh b/vm/debian-vm.sh similarity index 100% rename from vms/debian-vm.sh rename to vm/debian-vm.sh From 2839ec9fac98e442deeea80a0e2c07386a08443c Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 28 Apr 2025 07:30:05 +0000 Subject: [PATCH 0659/1614] Update .app files --- ct/headers/ollama | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/ollama diff --git a/ct/headers/ollama b/ct/headers/ollama new file mode 100644 index 0000000..4247d5b --- /dev/null +++ b/ct/headers/ollama @@ -0,0 +1,6 @@ + ____ ____ + / __ \/ / /___ _____ ___ ____ _ + / / / / / / __ `/ __ `__ \/ __ `/ +/ /_/ / / / /_/ / / / / / / /_/ / +\____/_/_/\__,_/_/ /_/ /_/\__,_/ + From 5c4af6fa02f69d5348b40d600bd144370537294c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 28 Apr 2025 09:35:28 +0200 Subject: [PATCH 0660/1614] ollama_testing --- install/ollama-install.sh | 69 ++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/install/ollama-install.sh b/install/ollama-install.sh index fd0baac..39e1ae6 100644 --- a/install/ollama-install.sh +++ b/install/ollama-install.sh @@ -16,23 +16,21 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gpg \ - git \ - build-essential \ - pkg-config \ - cmake + gpg \ + build-essential \ + pkg-config msg_ok "Installed Dependencies" -msg_info "Installing Golang" -set +o pipefail -temp_file=$(mktemp) -golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" -tar -C /usr/local -xzf "$temp_file" -ln -sf /usr/local/go/bin/go /usr/local/bin/go -rm -f "$temp_file" -set -o pipefail -msg_ok "Installed Golang" +# msg_info "Installing Golang" +# set +o pipefail +# temp_file=$(mktemp) +# golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) +# curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" +# tar -C /usr/local -xzf "$temp_file" +# ln -sf /usr/local/go/bin/go /usr/local/bin/go +# rm -f "$temp_file" +# set -o pipefail +# msg_ok "Installed Golang" msg_info "Setting up Intel® Repositories" mkdir -p /etc/apt/keyrings @@ -46,25 +44,42 @@ msg_ok "Set up Intel® Repositories" msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools,intel-level-zero-gpu,level-zero,level-zero-dev} if [[ "$CTTYPE" == "0" ]]; then - chgrp video /dev/dri - chmod 755 /dev/dri - chmod 660 /dev/dri/* - $STD adduser $(id -u -n) video - $STD adduser $(id -u -n) render + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render fi msg_ok "Set Up Hardware Acceleration" msg_info "Installing Intel® oneAPI Base Toolkit (Patience)" -$STD apt-get install -y --no-install-recommends intel-basekit-2024.1 +$STD apt-get install -y intel-basekit-2025.1 msg_ok "Installed Intel® oneAPI Base Toolkit" msg_info "Installing Ollama (Patience)" -$STD git clone https://github.com/ollama/ollama.git /opt/ollama -cd /opt/ollama -$STD go generate ./... -$STD go build . +ARCH=$(uname -m) +OLLAMA_INSTALL_DIR="/usr/local/lib/ollama" +BINDIR="/usr/local/bin" +mkdir -p "$OLLAMA_INSTALL_DIR" +curl --fail --show-error --location --progress-bar \ + "https://ollama.com/download/ollama-linux-${ARCH}.tgz${OLLAMA_VERSION:+?version=$OLLAMA_VERSION}" | + tar -xzf - -C "$OLLAMA_INSTALL_DIR" +ln -sf "$OLLAMA_INSTALL_DIR/ollama" "$BINDIR/ollama" +#$STD git clone https://github.com/ollama/ollama.git /opt/ollama +#cd /opt/ollama +#$STD go generate ./... +#$STD go build . msg_ok "Installed Ollama" +msg_info "Creating ollama User and Group" +if ! id ollama >/dev/null 2>&1; then + useradd -r -s /usr/sbin/nologin -U -m -d /usr/share/ollama ollama +fi +$STD usermod -aG render ollama || true +$STD usermod -aG video ollama || true +$STD usermod -aG ollama $(id -u -n) +msg_ok "Created ollama User and adjusted Groups" + msg_info "Creating Service" cat </etc/systemd/system/ollama.service [Unit] @@ -73,7 +88,7 @@ After=network-online.target [Service] Type=exec -ExecStart=/opt/ollama/ollama serve +ExecStart=/usr/local/bin/ollama serve Environment=HOME=$HOME Environment=OLLAMA_INTEL_GPU=true Environment=OLLAMA_HOST=0.0.0.0 @@ -95,4 +110,4 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" From 1a12e40826daae230acfe4e553adb63cb85dbcda Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 28 Apr 2025 09:36:57 +0200 Subject: [PATCH 0661/1614] Update hw-acceleration.sh --- tools/pve/hw-acceleration.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/pve/hw-acceleration.sh b/tools/pve/hw-acceleration.sh index 712fd0a..5d46704 100644 --- a/tools/pve/hw-acceleration.sh +++ b/tools/pve/hw-acceleration.sh @@ -32,9 +32,9 @@ set -euo pipefail TEMP_DIR=$(mktemp -d) trap 'rm -rf $TEMP_DIR' EXIT -source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-nvidia.func) -source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-intel.func) -source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/scripts/tools/gpu-amd.func) +source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/tools/pve/gpu-nvidia.func) +source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/tools/pve/gpu-intel.func) +source <(wget -qO- https://github.com/community-scripts/ProxmoxVED/raw/main/tools/pve/gpu-amd.func) function header_info() { clear From 9021c2bebadc0ff3a110262315a0f9026bb1bbb8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 28 Apr 2025 09:48:28 +0200 Subject: [PATCH 0662/1614] fixes --- ct/ollama.sh | 4 ++-- frontend/public/json/librespeed.json | 2 +- frontend/public/json/ollama.json | 35 ++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 frontend/public/json/ollama.json diff --git a/ct/ollama.sh b/ct/ollama.sh index 8a2c4b4..e2c39e8 100644 --- a/ct/ollama.sh +++ b/ct/ollama.sh @@ -11,7 +11,7 @@ var_cpu="${var_cpu:-4}" var_ram="${var_ram:-4096}" var_disk="${var_disk:-24}" var_os="${var_os:-ubuntu}" -var_version="${var_version:-22.04}" +var_version="${var_version:-24.04}" header_info "$APP" variables @@ -40,4 +40,4 @@ 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}:14434${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:11434${CL}" diff --git a/frontend/public/json/librespeed.json b/frontend/public/json/librespeed.json index c6292c5..f651f2c 100644 --- a/frontend/public/json/librespeed.json +++ b/frontend/public/json/librespeed.json @@ -12,7 +12,7 @@ "documentation": "https://github.com/librespeed/speedtest/blob/master/doc.md", "config_path": "", "website": "https://librespeed.org", - "logo": "https://github.com/librespeed/speedtest/blob/master/.logo/icon_huge.png", + "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/librespeed.svg", "description": "No Flash, No Java, No Websocket, No Bullshit. This is a very lightweight speed test implemented in Javascript, using XMLHttpRequest and Web Workers.", "install_methods": [ { diff --git a/frontend/public/json/ollama.json b/frontend/public/json/ollama.json new file mode 100644 index 0000000..a3c6149 --- /dev/null +++ b/frontend/public/json/ollama.json @@ -0,0 +1,35 @@ +{ + "name": "Ollama", + "slug": "ollama", + "categories": [ + 20 + ], + "date_created": "2024-10-26", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 11434, + "documentation": "https://github.com/ollama/ollama/tree/main/docs", + "config_path": "/usr/local/lib/ollama", + "website": "https://ollama.com/", + "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/ollama.svg", + "description": "Ollama is a tool that allows you to run large language models locally on your own computer. This means you can experiment with and use these AI models without needing an internet connection or relying on cloud-based services. It simplifies the process of managing and running these models, offering a way to keep your data private and potentially work faster. 1 You can use Ollama to create local chatbots, conduct AI research, develop privacy-focused AI applications, and integrate AI into existing systems.", + "install_methods": [ + { + "type": "default", + "script": "ct/ollama.sh", + "resources": { + "cpu": 4, + "ram": 4096, + "hdd": 24, + "os": "Ubuntu", + "version": "24.04" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} From dc2d5ce8a0e912cf0e3f725c0efe17611bae1680 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 28 Apr 2025 09:57:31 +0200 Subject: [PATCH 0663/1614] Update build.func --- misc/build.func | 2087 ++++++++++++++++++++++++----------------------- 1 file changed, 1053 insertions(+), 1034 deletions(-) diff --git a/misc/build.func b/misc/build.func index ae3f8f4..10bebcc 100644 --- a/misc/build.func +++ b/misc/build.func @@ -5,35 +5,35 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE variables() { - NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. - var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. - INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern. - PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase - DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. - METHOD="default" # sets the METHOD variable to "default", used for the API call. - RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. + NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. + var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. + INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern. + PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase + DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. + METHOD="default" # sets the METHOD variable to "default", used for the API call. + RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. } source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func) catch_errors() { - set -Eeuo pipefail - trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } error_handler() { - source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi - printf "\e[?25h" - local exit_code="$?" - local line_number="$1" - local command="$2" - ## 26.03.2025 alpine bug - #local error_description="$(get_error_description "$exit_code")" - #local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" - #post_update_to_api "failed" "$exit_code" "$error_description" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - post_update_to_api "failed" "${command}" - echo -e "\n$error_message\n" + source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi + printf "\e[?25h" + local exit_code="$?" + local line_number="$1" + local command="$2" + ## 26.03.2025 alpine bug + #local error_description="$(get_error_description "$exit_code")" + #local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL} (${YW}$error_description${CL}): while executing command ${YW}$command${CL}" + #post_update_to_api "failed" "$exit_code" "$error_description" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + post_update_to_api "failed" "${command}" + echo -e "\n$error_message\n" } trap 'stop_spinner' EXIT INT TERM HUP @@ -42,517 +42,517 @@ trap 'stop_spinner' EXIT INT TERM HUP # These are tuneable, so verify if the currently deployment is approaching the limits, advise the user on how to tune the limits, and exit the script. # https://cleveruptime.com/docs/files/proc-key-users | https://docs.kernel.org/security/keys/core.html maxkeys_check() { - # Read kernel parameters - per_user_maxkeys=$(cat /proc/sys/kernel/keys/maxkeys 2>/dev/null || echo 0) - per_user_maxbytes=$(cat /proc/sys/kernel/keys/maxbytes 2>/dev/null || echo 0) + # Read kernel parameters + per_user_maxkeys=$(cat /proc/sys/kernel/keys/maxkeys 2>/dev/null || echo 0) + per_user_maxbytes=$(cat /proc/sys/kernel/keys/maxbytes 2>/dev/null || echo 0) - # Exit if kernel parameters are unavailable - if [[ "$per_user_maxkeys" -eq 0 || "$per_user_maxbytes" -eq 0 ]]; then - echo -e "${CROSS}${RD} Error: Unable to read kernel parameters. Ensure proper permissions.${CL}" - exit 1 - fi + # Exit if kernel parameters are unavailable + if [[ "$per_user_maxkeys" -eq 0 || "$per_user_maxbytes" -eq 0 ]]; then + echo -e "${CROSS}${RD} Error: Unable to read kernel parameters. Ensure proper permissions.${CL}" + exit 1 + fi - # Fetch key usage for user ID 100000 (typical for containers) - used_lxc_keys=$(awk '/100000:/ {print $2}' /proc/key-users 2>/dev/null || echo 0) - used_lxc_bytes=$(awk '/100000:/ {split($5, a, "/"); print a[1]}' /proc/key-users 2>/dev/null || echo 0) + # Fetch key usage for user ID 100000 (typical for containers) + used_lxc_keys=$(awk '/100000:/ {print $2}' /proc/key-users 2>/dev/null || echo 0) + used_lxc_bytes=$(awk '/100000:/ {split($5, a, "/"); print a[1]}' /proc/key-users 2>/dev/null || echo 0) - # Calculate thresholds and suggested new limits - threshold_keys=$((per_user_maxkeys - 100)) - threshold_bytes=$((per_user_maxbytes - 1000)) - new_limit_keys=$((per_user_maxkeys * 2)) - new_limit_bytes=$((per_user_maxbytes * 2)) + # Calculate thresholds and suggested new limits + threshold_keys=$((per_user_maxkeys - 100)) + threshold_bytes=$((per_user_maxbytes - 1000)) + new_limit_keys=$((per_user_maxkeys * 2)) + new_limit_bytes=$((per_user_maxbytes * 2)) - # Check if key or byte usage is near limits - failure=0 - if [[ "$used_lxc_keys" -gt "$threshold_keys" ]]; then - echo -e "${CROSS}${RD} Warning: Key usage is near the limit (${used_lxc_keys}/${per_user_maxkeys}).${CL}" - echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxkeys=${new_limit_keys}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." - failure=1 - fi - if [[ "$used_lxc_bytes" -gt "$threshold_bytes" ]]; then - echo -e "${CROSS}${RD} Warning: Key byte usage is near the limit (${used_lxc_bytes}/${per_user_maxbytes}).${CL}" - echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxbytes=${new_limit_bytes}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." - failure=1 - fi + # Check if key or byte usage is near limits + failure=0 + if [[ "$used_lxc_keys" -gt "$threshold_keys" ]]; then + echo -e "${CROSS}${RD} Warning: Key usage is near the limit (${used_lxc_keys}/${per_user_maxkeys}).${CL}" + echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxkeys=${new_limit_keys}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." + failure=1 + fi + if [[ "$used_lxc_bytes" -gt "$threshold_bytes" ]]; then + echo -e "${CROSS}${RD} Warning: Key byte usage is near the limit (${used_lxc_bytes}/${per_user_maxbytes}).${CL}" + echo -e "${INFO} Suggested action: Set ${GN}kernel.keys.maxbytes=${new_limit_bytes}${CL} in ${BOLD}/etc/sysctl.d/98-community-scripts.conf${CL}." + failure=1 + fi - # Provide next steps if issues are detected - if [[ "$failure" -eq 1 ]]; then - echo -e "${INFO} To apply changes, run: ${BOLD}service procps force-reload${CL}" - exit 1 - fi + # Provide next steps if issues are detected + if [[ "$failure" -eq 1 ]]; then + echo -e "${INFO} To apply changes, run: ${BOLD}service procps force-reload${CL}" + exit 1 + fi - echo -e "${CM}${GN} All kernel key limits are within safe thresholds.${CL}" + echo -e "${CM}${GN} All kernel key limits are within safe thresholds.${CL}" } # Function to get the current IP address based on the distribution get_current_ip() { - if [ -f /etc/os-release ]; then - # Check for Debian/Ubuntu (uses hostname -I) - if grep -qE 'ID=debian|ID=ubuntu' /etc/os-release; then - CURRENT_IP=$(hostname -I | awk '{print $1}') - # Check for Alpine (uses ip command) - elif grep -q 'ID=alpine' /etc/os-release; then - CURRENT_IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1) - else - CURRENT_IP="Unknown" + if [ -f /etc/os-release ]; then + # Check for Debian/Ubuntu (uses hostname -I) + if grep -qE 'ID=debian|ID=ubuntu' /etc/os-release; then + CURRENT_IP=$(hostname -I | awk '{print $1}') + # Check for Alpine (uses ip command) + elif grep -q 'ID=alpine' /etc/os-release; then + CURRENT_IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1) + else + CURRENT_IP="Unknown" + fi fi - fi - echo "$CURRENT_IP" + echo "$CURRENT_IP" } # Function to update the IP address in the MOTD file update_motd_ip() { - MOTD_FILE="/etc/motd" + MOTD_FILE="/etc/motd" - if [ -f "$MOTD_FILE" ]; then - # Remove existing IP Address lines to prevent duplication - sed -i '/IP Address:/d' "$MOTD_FILE" + if [ -f "$MOTD_FILE" ]; then + # Remove existing IP Address lines to prevent duplication + sed -i '/IP Address:/d' "$MOTD_FILE" - IP=$(get_current_ip) - # Add the new IP address - echo -e "${TAB}${NETWORK}${YW} IP Address: ${GN}${IP}${CL}" >>"$MOTD_FILE" - fi + IP=$(get_current_ip) + # Add the new IP address + echo -e "${TAB}${NETWORK}${YW} IP Address: ${GN}${IP}${CL}" >>"$MOTD_FILE" + fi } # Function to download & save header files get_header() { - local app_name=$(echo "${APP,,}" | tr -d ' ') - local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/headers/${app_name}" - local local_header_path="/usr/local/community-scripts/headers/${app_name}" + local app_name=$(echo "${APP,,}" | tr -d ' ') + local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/headers/${app_name}" + local local_header_path="/usr/local/community-scripts/headers/${app_name}" - mkdir -p "$(dirname "$local_header_path")" + mkdir -p "$(dirname "$local_header_path")" - if [ ! -s "$local_header_path" ]; then - if ! curl -fsSL "$header_url" -o "$local_header_path"; then - echo -e "${WARN:-}[WARN]${BOLD:-}${YLW:-} Failed to download header for ${app_name}. No header will be displayed.${CL:-}" - return 1 + if [ ! -s "$local_header_path" ]; then + if ! curl -fsSL "$header_url" -o "$local_header_path"; then + echo -e "${WARN:-}[WARN]${BOLD:-}${YLW:-} Failed to download header for ${app_name}. No header will be displayed.${CL:-}" + return 1 + fi fi - fi - cat "$local_header_path" + cat "$local_header_path" } # This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node. header_info() { - local app_name=$(echo ${APP,,} | tr -d ' ') - local header_content + local app_name=$(echo ${APP,,} | tr -d ' ') + local header_content - # Download & save Header-File locally - header_content=$(get_header "$app_name") - if [ $? -ne 0 ]; then - # Fallback: Doesn't show Header - return 0 - fi + # Download & save Header-File locally + header_content=$(get_header "$app_name") + if [ $? -ne 0 ]; then + # Fallback: Doesn't show Header + return 0 + fi - # Show ASCII-Header - term_width=$(tput cols 2>/dev/null || echo 120) - clear - echo "$header_content" + # Show ASCII-Header + term_width=$(tput cols 2>/dev/null || echo 120) + clear + echo "$header_content" } base_settings() { - # Default Settings - CT_TYPE="1" - DISK_SIZE="4" - CORE_COUNT="1" - RAM_SIZE="1024" - VERBOSE="${1:-no}" - PW="" - CT_ID=$NEXTID - HN=$NSAPP - BRG="vmbr0" - NET="dhcp" - # 26.03.2025 disabled - #IPv6="dhcp" - #IPv6GW="" - GATE="" - APT_CACHER="" - APT_CACHER_IP="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - SSH_AUTHORIZED_KEY="" - TAGS="community-script-dev;" - # 26.03.2025 disabled - # ENABLE_FUSE="no" + # Default Settings + CT_TYPE="1" + DISK_SIZE="4" + CORE_COUNT="1" + RAM_SIZE="1024" + VERBOSE="${1:-no}" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + BRG="vmbr0" + NET="dhcp" + # 26.03.2025 disabled + #IPv6="dhcp" + #IPv6GW="" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + SSH_AUTHORIZED_KEY="" + TAGS="community-script-dev;" + # 26.03.2025 disabled + # ENABLE_FUSE="no" - # Override default settings with variables from ct script - CT_TYPE=${var_unprivileged:-$CT_TYPE} - DISK_SIZE=${var_disk:-$DISK_SIZE} - CORE_COUNT=${var_cpu:-$CORE_COUNT} - RAM_SIZE=${var_ram:-$RAM_SIZE} - VERB=${var_verbose:-$VERBOSE} - TAGS="${TAGS}${var_tags:-}" - # 26.03.2025 disabled - #ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} + # Override default settings with variables from ct script + CT_TYPE=${var_unprivileged:-$CT_TYPE} + DISK_SIZE=${var_disk:-$DISK_SIZE} + CORE_COUNT=${var_cpu:-$CORE_COUNT} + RAM_SIZE=${var_ram:-$RAM_SIZE} + VERB=${var_verbose:-$VERBOSE} + TAGS="${TAGS}${var_tags:-}" + # 26.03.2025 disabled + #ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} - # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts - if [ -z "$var_os" ]; then - var_os="debian" - fi - if [ -z "$var_version" ]; then - var_version="12" - fi + # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts + if [ -z "$var_os" ]; then + var_os="debian" + fi + if [ -z "$var_version" ]; then + var_version="12" + fi } # This function displays the default values for various settings. echo_default() { - # Convert CT_TYPE to description - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi + # Convert CT_TYPE to description + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi - # Output the selected values with icons - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}" - if [ "$VERB" == "yes" ]; then - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}" - fi - echo -e "${CREATING}${BOLD}${BL}Creating a ${APP} LXC using the above default settings${CL}" - echo -e " " + # Output the selected values with icons + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}" + if [ "$VERB" == "yes" ]; then + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}" + fi + echo -e "${CREATING}${BOLD}${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e " " } # This function allows the user to configure advanced settings for the script. advanced_settings() { - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 - # Setting Default Tag for Advanced Settings - TAGS="community-script-dev;${var_tags:-}" - CT_DEFAULT_TYPE="${CT_TYPE}" - CT_TYPE="" - while [ -z "$CT_TYPE" ]; do - if [ "$CT_DEFAULT_TYPE" == "1" ]; then - if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - if [ -n "$CT_TYPE" ]; then - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - fi - else - exit_script - fi - fi - if [ "$CT_DEFAULT_TYPE" == "0" ]; then - if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - if [ -n "$CT_TYPE" ]; then - CT_TYPE_DESC="Unprivileged" - if [ "$CT_TYPE" -eq 0 ]; then - CT_TYPE_DESC="Privileged" - fi - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - fi - else - exit_script - fi - fi - done - - while true; do - if PW1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [[ ! -z "$PW1" ]]; then - if [[ "$PW1" == *" "* ]]; then - whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 - elif [ ${#PW1} -lt 5 ]; then - whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 - else - if PW2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then - if [[ "$PW1" == "$PW2" ]]; then - PW="-password $PW1" - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" - break + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 + # Setting Default Tag for Advanced Settings + TAGS="community-script-dev;${var_tags:-}" + CT_DEFAULT_TYPE="${CT_TYPE}" + CT_TYPE="" + while [ -z "$CT_TYPE" ]; do + if [ "$CT_DEFAULT_TYPE" == "1" ]; then + if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$CT_TYPE" ]; then + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + fi else - whiptail --msgbox "Passwords do not match. Please try again." 8 58 + exit_script fi - else - exit_script - fi fi - else - PW1="Automatic Login" - PW="" - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}" - break - fi - else - exit_script - fi - done - - if CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi - else - exit - fi - - if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" - else - exit_script - fi - - if DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" - fi - else - exit_script - fi - - if CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" - fi - else - exit_script - fi - - if RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - else - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" - fi - else - exit_script - fi - - if BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" - else - echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" - fi - else - exit_script - fi - - while true; do - NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) - exit_status=$? - if [ $exit_status -eq 0 ]; then - if [ "$NET" = "dhcp" ]; then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" - break - else - if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" - break - else - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 + if [ "$CT_DEFAULT_TYPE" == "0" ]; then + if CT_TYPE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3); then + if [ -n "$CT_TYPE" ]; then + CT_TYPE_DESC="Unprivileged" + if [ "$CT_TYPE" -eq 0 ]; then + CT_TYPE_DESC="Privileged" + fi + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + fi + else + exit_script + fi fi - fi - else - exit_script - fi - done - - if [ "$NET" != "dhcp" ]; then - while true; do - GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) - if [ -z "$GATE1" ]; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 - elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 - else - GATE=",gw=$GATE1" - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}" - break - fi done - else - GATE="" - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" - fi - if [ "$var_os" == "alpine" ]; then - APT_CACHER="" - APT_CACHER_IP="" - else - if APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then - APT_CACHER="${APT_CACHER_IP:+yes}" - echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" + while true; do + if PW1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [[ ! -z "$PW1" ]]; then + if [[ "$PW1" == *" "* ]]; then + whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 + elif [ ${#PW1} -lt 5 ]; then + whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 + else + if PW2=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then + if [[ "$PW1" == "$PW2" ]]; then + PW="-password $PW1" + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" + break + else + whiptail --msgbox "Passwords do not match. Please try again." 8 58 + fi + else + exit_script + fi + fi + else + PW1="Automatic Login" + PW="" + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}" + break + fi + else + exit_script + fi + done + + if CT_ID=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi else - exit_script + exit fi - fi - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" - else - DISABLEIP6="no" - fi - echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - - if MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" + if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') + fi + echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" else - MTU=",mtu=$MTU1" + exit_script fi - echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" - else - exit_script - fi - if SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" + if DISK_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + fi else - SX=$SD - SD="-searchdomain=$SD" + exit_script fi - echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}" - else - exit_script - fi - if NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" + if CORE_COUNT=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" + fi else - NS="-nameserver=$NX" + exit_script fi - echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}" - else - exit_script - fi - if MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" + if RAM_SIZE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + else + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + fi else - MAC=",hwaddr=$MAC1" - echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}" + exit_script fi - else - exit_script - fi - if VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" + if BRG=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + else + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + fi else - VLAN=",tag=$VLAN1" + exit_script fi - echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}" - else - exit_script - fi - if ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then - if [ -n "${ADV_TAGS}" ]; then - ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') - TAGS="${ADV_TAGS}" + while true; do + NET=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) + exit_status=$? + if [ $exit_status -eq 0 ]; then + if [ "$NET" = "dhcp" ]; then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + break + else + if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + break + else + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 + fi + fi + else + exit_script + fi + done + + if [ "$NET" != "dhcp" ]; then + while true; do + GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) + if [ -z "$GATE1" ]; then + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 + elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 + else + GATE=",gw=$GATE1" + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}" + break + fi + done else - TAGS=";" + GATE="" + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" fi - echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" - else - exit_script - fi - if [[ "$PW" == -password* ]]; then - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" + if [ "$var_os" == "alpine" ]; then + APT_CACHER="" + APT_CACHER_IP="" else - SSH="no" + if APT_CACHER_IP=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then + APT_CACHER="${APT_CACHER_IP:+yes}" + echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" + else + exit_script + fi fi - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" - else - SSH="no" - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" - fi - if [[ "${SSH}" == "yes" ]]; then - SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" - - if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then - echo "Warning: No SSH key provided." + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" + else + DISABLEIP6="no" fi - else - SSH_AUTHORIZED_KEY="" - fi + echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then - ENABLE_FUSE="yes" - else - ENABLE_FUSE="no" - fi - echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" + if MTU1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" + else + exit_script + fi - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" - else - VERB="no" - fi - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" + if SD=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}" + else + exit_script + fi - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" - advanced_settings - fi + if NX=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}" + else + exit_script + fi + + if MAC1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit_script + fi + + if VLAN1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}" + else + exit_script + fi + + if ADV_TAGS=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then + if [ -n "${ADV_TAGS}" ]; then + ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') + TAGS="${ADV_TAGS}" + else + TAGS=";" + fi + echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" + else + exit_script + fi + + if [[ "$PW" == -password* ]]; then + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" + else + SSH="no" + fi + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + else + SSH="no" + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + fi + + if [[ "${SSH}" == "yes" ]]; then + SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" + + if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then + echo "Warning: No SSH key provided." + fi + else + SSH_AUTHORIZED_KEY="" + fi + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE (Filesystem in Userspace) support in the container?" 10 58); then + ENABLE_FUSE="yes" + else + ENABLE_FUSE="no" + fi + echo -e "${FUSE}${BOLD}${DGN}FUSE (Filesystem in Userspace) Support: ${BGN}$ENABLE_FUSE${CL}" + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" + else + VERB="no" + fi + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" + + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" + advanced_settings + fi } diagnostics_check() { - if ! [ -d "/usr/local/community-scripts" ]; then - mkdir -p /usr/local/community-scripts - fi + if ! [ -d "/usr/local/community-scripts" ]; then + mkdir -p /usr/local/community-scripts + fi - if ! [ -f "/usr/local/community-scripts/diagnostics" ]; then - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS" --yesno "Send Diagnostics of LXC Installation?\n\n(This only transmits data without user data, just RAM, CPU, LXC name, ...)" 10 58); then - cat </usr/local/community-scripts/diagnostics + if ! [ -f "/usr/local/community-scripts/diagnostics" ]; then + if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS" --yesno "Send Diagnostics of LXC Installation?\n\n(This only transmits data without user data, just RAM, CPU, LXC name, ...)" 10 58); then + cat </usr/local/community-scripts/diagnostics DIAGNOSTICS=yes #This file is used to store the diagnostics settings for the Community-Scripts API. @@ -577,9 +577,9 @@ DIAGNOSTICS=yes #"status" #If you have any concerns, please review the source code at /misc/build.func EOF - DIAGNOSTICS="yes" - else - cat </usr/local/community-scripts/diagnostics + DIAGNOSTICS="yes" + else + cat </usr/local/community-scripts/diagnostics DIAGNOSTICS=no #This file is used to store the diagnostics settings for the Community-Scripts API. @@ -604,626 +604,628 @@ DIAGNOSTICS=no #"status" #If you have any concerns, please review the source code at /misc/build.func EOF - DIAGNOSTICS="no" - fi - else - DIAGNOSTICS=$(awk -F '=' '/^DIAGNOSTICS/ {print $2}' /usr/local/community-scripts/diagnostics) + DIAGNOSTICS="no" + fi + else + DIAGNOSTICS=$(awk -F '=' '/^DIAGNOSTICS/ {print $2}' /usr/local/community-scripts/diagnostics) - fi + fi } config_file() { - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 - CONFIG_FILE="/opt/community-scripts/.settings" + CONFIG_FILE="/opt/community-scripts/.settings" - if [[ -f "/opt/community-scripts/${NSAPP}.conf" ]]; then - CONFIG_FILE="/opt/community-scripts/${NSAPP}.conf" - fi - - if CONFIG_FILE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set absolute path to config file" 8 58 $CONFIG_FILE --title "CONFIG FILE" 3>&1 1>&2 2>&3); then - if [[ ! -f "$CONFIG_FILE" ]]; then - echo -e "${CROSS}${RD}Config file not found, exiting script!.${CL}" - exit - else - echo -e "${INFO}${BOLD}${DGN}Using config File: ${BGN}$CONFIG_FILE${CL}" - base_settings - source "$CONFIG_FILE" + if [[ -f "/opt/community-scripts/${NSAPP}.conf" ]]; then + CONFIG_FILE="/opt/community-scripts/${NSAPP}.conf" fi - fi - if [[ "$var_os" == "debian" ]]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - if [[ "$var_version" == "11" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "12" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - else - msg_error "Unknown setting for var_version, should be 11 or 12, was ${var_version}" - exit - fi - elif [[ "$var_os" == "ubuntu" ]]; then - echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" - if [[ "$var_version" == "20.04" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "22.04" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "24.04" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - elif [[ "$var_version" == "24.10" ]]; then - echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" - else - msg_error "Unknown setting for var_version, should be 20.04, 22.04, 24.04 or 24.10, was ${var_version}" - exit - fi - else - msg_error "Unknown setting for var_os! should be debian or ubuntu, was ${var_os}" - exit - fi - - if [[ -n "$CT_ID" ]]; then - - if [[ "$CT_ID" =~ ^([0-9]{3,4})-([0-9]{3,4})$ ]]; then - MIN_ID=${BASH_REMATCH[1]} - MAX_ID=${BASH_REMATCH[2]} - - if ((MIN_ID >= MAX_ID)); then - msg_error "Invalid Container ID range. The first number must be smaller than the second number, was ${CT_ID}" - exit - fi - - LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') - - for ((ID = MIN_ID; ID <= MAX_ID; ID++)); do - if ! grep -q "^$ID$" <<<"$LIST_OF_IDS"; then - CT_ID=$ID - break + if CONFIG_FILE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set absolute path to config file" 8 58 $CONFIG_FILE --title "CONFIG FILE" 3>&1 1>&2 2>&3); then + if [[ ! -f "$CONFIG_FILE" ]]; then + echo -e "${CROSS}${RD}Config file not found, exiting script!.${CL}" + exit + else + echo -e "${INFO}${BOLD}${DGN}Using config File: ${BGN}$CONFIG_FILE${CL}" + base_settings + source "$CONFIG_FILE" fi - done + fi - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - - elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then - - LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') - if ! grep -q "^$CT_ID$" <<<"$LIST_OF_IDS"; then - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - msg_error "Container ID $CT_ID already exists" + if [[ "$var_os" == "debian" ]]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + if [[ "$var_version" == "11" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "12" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + else + msg_error "Unknown setting for var_version, should be 11 or 12, was ${var_version}" + exit + fi + elif [[ "$var_os" == "ubuntu" ]]; then + echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" + if [[ "$var_version" == "20.04" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "22.04" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "24.04" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + elif [[ "$var_version" == "24.10" ]]; then + echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" + else + msg_error "Unknown setting for var_version, should be 20.04, 22.04, 24.04 or 24.10, was ${var_version}" + exit + fi + else + msg_error "Unknown setting for var_os! should be debian or ubuntu, was ${var_os}" exit - fi - else - msg_error "Invalid Container ID format. Needs to be 0000-9999 or 0-9999, was ${CT_ID}" - exit fi - fi - if [[ "$CT_TYPE" -eq 0 ]]; then - CT_TYPE_DESC="Privileged" - elif [[ "$CT_TYPE" -eq 1 ]]; then - CT_TYPE_DESC="Unprivileged" - else - msg_error "Unknown setting for CT_TYPE, should be 1 or 0, was ${CT_TYPE}" - exit - fi - echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" + if [[ -n "$CT_ID" ]]; then - if [[ ! -z "$PW" ]]; then + if [[ "$CT_ID" =~ ^([0-9]{3,4})-([0-9]{3,4})$ ]]; then + MIN_ID=${BASH_REMATCH[1]} + MAX_ID=${BASH_REMATCH[2]} - if [[ "$PW" == *" "* ]]; then - msg_error "Password cannot be empty" - exit - elif [[ ${#PW} -lt 5 ]]; then - msg_error "Password must be at least 5 characters long" - exit - else - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" + if ((MIN_ID >= MAX_ID)); then + msg_error "Invalid Container ID range. The first number must be smaller than the second number, was ${CT_ID}" + exit + fi + + LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') + + for ((ID = MIN_ID; ID <= MAX_ID; ID++)); do + if ! grep -q "^$ID$" <<<"$LIST_OF_IDS"; then + CT_ID=$ID + break + fi + done + + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + + elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then + + LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+') + if ! grep -q "^$CT_ID$" <<<"$LIST_OF_IDS"; then + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + msg_error "Container ID $CT_ID already exists" + exit + fi + else + msg_error "Invalid Container ID format. Needs to be 0000-9999 or 0-9999, was ${CT_ID}" + exit + fi fi - PW="-password $PW" - else - PW="" - echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}Automatic Login${CL}" - fi - echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - if [[ ! -z "$HN" ]]; then - echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" - else - msg_error "Hostname cannot be empty" - exit - fi - - if [[ ! -z "$DISK_SIZE" ]]; then - if [[ "$DISK_SIZE" =~ ^-?[0-9]+$ ]]; then - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + if [[ "$CT_TYPE" -eq 0 ]]; then + CT_TYPE_DESC="Privileged" + elif [[ "$CT_TYPE" -eq 1 ]]; then + CT_TYPE_DESC="Unprivileged" else - msg_error "DISK_SIZE must be an integer, was ${DISK_SIZE}" - exit + msg_error "Unknown setting for CT_TYPE, should be 1 or 0, was ${CT_TYPE}" + exit fi - else - msg_error "DISK_SIZE cannot be empty" - exit - fi + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - if [[ ! -z "$CORE_COUNT" ]]; then - if [[ "$CORE_COUNT" =~ ^-?[0-9]+$ ]]; then - echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" + if [[ ! -z "$PW" ]]; then + + if [[ "$PW" == *" "* ]]; then + msg_error "Password cannot be empty" + exit + elif [[ ${#PW} -lt 5 ]]; then + msg_error "Password must be at least 5 characters long" + exit + else + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}" + fi + PW="-password $PW" else - msg_error "CORE_COUNT must be an integer, was ${CORE_COUNT}" - exit + PW="" + echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}Automatic Login${CL}" fi - else - msg_error "CORE_COUNT cannot be empty" - exit - fi + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" - if [[ ! -z "$RAM_SIZE" ]]; then - if [[ "$RAM_SIZE" =~ ^-?[0-9]+$ ]]; then - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + if [[ ! -z "$HN" ]]; then + echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" else - msg_error "RAM_SIZE must be an integer, was ${RAM_SIZE}" - exit + msg_error "Hostname cannot be empty" + exit fi - else - msg_error "RAM_SIZE cannot be empty" - exit - fi - if [[ ! -z "$BRG" ]]; then - if grep -q "^iface ${BRG}" /etc/network/interfaces; then - echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + if [[ ! -z "$DISK_SIZE" ]]; then + if [[ "$DISK_SIZE" =~ ^-?[0-9]+$ ]]; then + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" + else + msg_error "DISK_SIZE must be an integer, was ${DISK_SIZE}" + exit + fi else - msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces" - exit + msg_error "DISK_SIZE cannot be empty" + exit fi - else - msg_error "Bridge cannot be empty" - exit - fi - local ip_cidr_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/([0-9]{1,2})$' - local ip_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$' - - if [[ ! -z $NET ]]; then - if [ "$NET" == "dhcp" ]; then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}DHCP${CL}" - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" - elif - [[ "$NET" =~ $ip_cidr_regex ]] - then - echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + if [[ ! -z "$CORE_COUNT" ]]; then + if [[ "$CORE_COUNT" =~ ^-?[0-9]+$ ]]; then + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" + else + msg_error "CORE_COUNT must be an integer, was ${CORE_COUNT}" + exit + fi else - msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}" - exit + msg_error "CORE_COUNT cannot be empty" + exit fi - fi - if [ ! -z "$GATE" ]; then - if [[ "$GATE" =~ $ip_regex ]]; then - echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE${CL}" - GATE=",gw=$GATE" + + if [[ ! -z "$RAM_SIZE" ]]; then + if [[ "$RAM_SIZE" =~ ^-?[0-9]+$ ]]; then + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" + else + msg_error "RAM_SIZE must be an integer, was ${RAM_SIZE}" + exit + fi else - msg_error "Invalid IP Address format for Gateway. Needs to be 0.0.0.0, was ${GATE}" - exit + msg_error "RAM_SIZE cannot be empty" + exit fi - else - msg_error "Gateway IP Address cannot be empty" - exit - fi - if [[ ! -z "$APT_CACHER_IP" ]]; then - if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then - APT_CACHER="yes" - echo -e "${NETWORK}${BOLD}${DGN}APT-CACHER IP Address: ${BGN}$APT_CACHER_IP${CL}" + if [[ ! -z "$BRG" ]]; then + if grep -q "^iface ${BRG}" /etc/network/interfaces; then + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + else + msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces" + exit + fi else - msg_error "Invalid IP Address format for APT-Cacher. Needs to be 0.0.0.0, was ${APT_CACHER_IP}" - exit + msg_error "Bridge cannot be empty" + exit fi - fi - if [[ "$DISABLEIP6" == "yes" ]]; then - echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}Yes${CL}" - elif [[ "$DISABLEIP6" == "no" ]]; then - echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}No${CL}" - else - msg_error "Disable IPv6 needs to be 'yes' or 'no'" - exit - fi + local ip_cidr_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/([0-9]{1,2})$' + local ip_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$' - if [[ ! -z "$MTU" ]]; then - if [[ "$MTU" =~ ^-?[0-9]+$ ]]; then - echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU${CL}" - MTU=",mtu=$MTU" + if [[ ! -z $NET ]]; then + if [ "$NET" == "dhcp" ]; then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}DHCP${CL}" + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}" + elif + [[ "$NET" =~ $ip_cidr_regex ]] + then + echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}" + else + msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}" + exit + fi + fi + if [ ! -z "$GATE" ]; then + if [[ "$GATE" =~ $ip_regex ]]; then + echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE${CL}" + GATE=",gw=$GATE" + else + msg_error "Invalid IP Address format for Gateway. Needs to be 0.0.0.0, was ${GATE}" + exit + fi else - msg_error "MTU must be an integer, was ${MTU}" - exit + msg_error "Gateway IP Address cannot be empty" + exit fi - else - MTU="" - echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}" - fi + if [[ ! -z "$APT_CACHER_IP" ]]; then + if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then + APT_CACHER="yes" + echo -e "${NETWORK}${BOLD}${DGN}APT-CACHER IP Address: ${BGN}$APT_CACHER_IP${CL}" + else + msg_error "Invalid IP Address format for APT-Cacher. Needs to be 0.0.0.0, was ${APT_CACHER_IP}" + exit + fi + fi - if [[ ! -z "$SD" ]]; then - echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SD${CL}" - SD="-searchdomain=$SD" - else - SD="" - echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}HOST${CL}" - fi - - if [[ ! -z "$NS" ]]; then - if [[ "$NS" =~ $ip_regex ]]; then - echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NS${CL}" - NS="-nameserver=$NS" + if [[ "$DISABLEIP6" == "yes" ]]; then + echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}Yes${CL}" + elif [[ "$DISABLEIP6" == "no" ]]; then + echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}No${CL}" else - msg_error "Invalid IP Address format for DNS Server. Needs to be 0.0.0.0, was ${NS}" - exit + msg_error "Disable IPv6 needs to be 'yes' or 'no'" + exit fi - else - NS="" - echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}HOST${CL}" - fi - if [[ ! -z "$MAC" ]]; then - if [[ "$MAC" =~ ^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$ ]]; then - echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}" - MAC=",hwaddr=$MAC" + if [[ ! -z "$MTU" ]]; then + if [[ "$MTU" =~ ^-?[0-9]+$ ]]; then + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU${CL}" + MTU=",mtu=$MTU" + else + msg_error "MTU must be an integer, was ${MTU}" + exit + fi else - msg_error "MAC Address must be in the format xx:xx:xx:xx:xx:xx, was ${MAC}" - exit - fi - fi + MTU="" + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}" - if [[ ! -z "$VLAN" ]]; then - if [[ "$VLAN" =~ ^-?[0-9]+$ ]]; then - echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN${CL}" - VLAN=",tag=$VLAN" + fi + + if [[ ! -z "$SD" ]]; then + echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SD${CL}" + SD="-searchdomain=$SD" else - msg_error "VLAN must be an integer, was ${VLAN}" - exit + SD="" + echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}HOST${CL}" fi - fi - if [[ ! -z "$TAGS" ]]; then - echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" - fi - - if [[ "$SSH" == "yes" ]]; then - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" - if [[ ! -z "$SSH_AUTHORIZED_KEY" ]]; then - echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}********************${CL}" + if [[ ! -z "$NS" ]]; then + if [[ "$NS" =~ $ip_regex ]]; then + echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NS${CL}" + NS="-nameserver=$NS" + else + msg_error "Invalid IP Address format for DNS Server. Needs to be 0.0.0.0, was ${NS}" + exit + fi else - echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}None${CL}" + NS="" + echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}HOST${CL}" fi - elif [[ "$SSH" == "no" ]]; then - echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" - else - msg_error "SSH needs to be 'yes' or 'no', was ${SSH}" - exit - fi - if [[ "$VERB" == "yes" ]]; then - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" - elif [[ "$VERB" == "no" ]]; then - echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}No${CL}" - else - msg_error "Verbose Mode needs to be 'yes' or 'no', was ${VERB}" - exit - fi + if [[ ! -z "$MAC" ]]; then + if [[ "$MAC" =~ ^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$ ]]; then + echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}" + MAC=",hwaddr=$MAC" + else + msg_error "MAC Address must be in the format xx:xx:xx:xx:xx:xx, was ${MAC}" + exit + fi + fi - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS WITH CONFIG FILE COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above settings${CL}" - else - clear - header_info - echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" - config_file - fi + if [[ ! -z "$VLAN" ]]; then + if [[ "$VLAN" =~ ^-?[0-9]+$ ]]; then + echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN${CL}" + VLAN=",tag=$VLAN" + else + msg_error "VLAN must be an integer, was ${VLAN}" + exit + fi + fi + + if [[ ! -z "$TAGS" ]]; then + echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" + fi + + if [[ "$SSH" == "yes" ]]; then + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + if [[ ! -z "$SSH_AUTHORIZED_KEY" ]]; then + echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}********************${CL}" + else + echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}None${CL}" + fi + elif [[ "$SSH" == "no" ]]; then + echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" + else + msg_error "SSH needs to be 'yes' or 'no', was ${SSH}" + exit + fi + + if [[ "$VERB" == "yes" ]]; then + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}" + elif [[ "$VERB" == "no" ]]; then + echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}No${CL}" + else + msg_error "Verbose Mode needs to be 'yes' or 'no', was ${VERB}" + exit + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS WITH CONFIG FILE COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above settings${CL}" + else + clear + header_info + echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" + config_file + fi } install_script() { - pve_check - shell_check - root_check - arch_check - ssh_check - maxkeys_check - diagnostics_check + pve_check + shell_check + root_check + arch_check + ssh_check + maxkeys_check + diagnostics_check - if systemctl is-active -q ping-instances.service; then - systemctl -q stop ping-instances.service - fi - NEXTID=$(pvesh get /cluster/nextid) - timezone=$(cat /etc/timezone) - header_info - while true; do - - CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \ - 18 60 6 \ - "1" "Default Settings" \ - "2" "Default Settings (with output)" \ - "3" "Advanced Settings" \ - "4" "Diagnostic Settings" \ - "5" "Use Config File" \ - "6" "Exit" --nocancel --default-item "1" 3>&1 1>&2 2>&3) - - if [ $? -ne 0 ]; then - echo -e "${CROSS}${RD} Menu canceled. Exiting.${CL}" - exit 0 + if systemctl is-active -q ping-instances.service; then + systemctl -q stop ping-instances.service fi + NEXTID=$(pvesh get /cluster/nextid) + timezone=$(cat /etc/timezone) + header_info + while true; do - case $CHOICE in - 1) - header_info - echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME${CL}" - VERB="no" - METHOD="default" - base_settings "$VERB" - echo_default - break - ;; - 2) - header_info - echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${VERBOSE_CROPPED}Verbose)${CL}" - VERB="yes" - METHOD="default" - base_settings "$VERB" - echo_default - break - ;; - 3) - header_info - echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" - METHOD="advanced" - base_settings - advanced_settings - break - ;; - 4) - if [[ $DIAGNOSTICS == "yes" ]]; then - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ - --yes-button "No" --no-button "Back"; then - DIAGNOSTICS="no" - sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=no/' /usr/local/community-scripts/diagnostics - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 - fi - else - if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ - --yes-button "Yes" --no-button "Back"; then - DIAGNOSTICS="yes" - sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=yes/' /usr/local/community-scripts/diagnostics - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 - fi - fi + CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \ + 18 60 6 \ + "1" "Default Settings" \ + "2" "Default Settings (with verbose)" \ + "3" "Advanced Settings" \ + "4" "Use Config File" \ + "5" "Diagnostic Settings" \ + "6" "Exit" --nocancel --default-item "1" 3>&1 1>&2 2>&3) - ;; - 5) - header_info - echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" - config_file - break - ;; - 6) - echo -e "${CROSS}${RD}Exiting.${CL}" - exit 0 - ;; - *) - echo -e "${CROSS}${RD}Invalid option, please try again.${CL}" - ;; - esac - done + if [ $? -ne 0 ]; then + echo -e "${CROSS}${RD} Menu canceled. Exiting.${CL}" + exit 0 + fi + + case $CHOICE in + 1) + header_info + echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME${CL}" + VERB="no" + METHOD="default" + base_settings "$VERB" + echo_default + break + ;; + 2) + header_info + echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${VERBOSE_CROPPED}Verbose)${CL}" + VERB="yes" + METHOD="default" + base_settings "$VERB" + echo_default + break + ;; + 3) + header_info + echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}" + METHOD="advanced" + base_settings + advanced_settings + break + ;; + 4) + header_info + echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}" + METHOD="advanced" + base_settings + config_file + break + ;; + 5) + if [[ $DIAGNOSTICS == "yes" ]]; then + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ + --yes-button "No" --no-button "Back"; then + DIAGNOSTICS="no" + sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=no/' /usr/local/community-scripts/diagnostics + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 + fi + else + if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ + --yes-button "Yes" --no-button "Back"; then + DIAGNOSTICS="yes" + sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=yes/' /usr/local/community-scripts/diagnostics + whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 + fi + fi + + ;; + 6) + echo -e "${CROSS}${RD}Exiting.${CL}" + exit 0 + ;; + *) + echo -e "${CROSS}${RD}Invalid option, please try again.${CL}" + ;; + esac + done } check_container_resources() { - # Determine current RAM in MB (Debian uses free, Alpine reads from /proc/meminfo) - if command -v free >/dev/null 2>&1; then - current_ram=$(free -m | awk '/^Mem:/{print $2}') - elif [ -f /proc/meminfo ]; then - current_ram=$(awk '/MemTotal/{printf "%.0f", $2 / 1024}' /proc/meminfo) - else - echo "${CROSS}${HOLD} Unable to determine RAM on this system.${CL}" - exit 1 - fi + # Determine current RAM in MB (Debian uses free, Alpine reads from /proc/meminfo) + if command -v free >/dev/null 2>&1; then + current_ram=$(free -m | awk '/^Mem:/{print $2}') + elif [ -f /proc/meminfo ]; then + current_ram=$(awk '/MemTotal/{printf "%.0f", $2 / 1024}' /proc/meminfo) + else + echo "${CROSS}${HOLD} Unable to determine RAM on this system.${CL}" + exit 1 + fi - # Determine number of CPU cores (POSIX-safe) - if command -v nproc >/dev/null 2>&1; then - current_cpu=$(nproc) - else - current_cpu=$(grep -c ^processor /proc/cpuinfo) - fi - # Check if RAM or CPU is below requirement - if [ "$current_ram" -lt "$var_ram" ] || [ "$current_cpu" -lt "$var_cpu" ]; then - echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}" - echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n" - echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " - read -r prompt + # Determine number of CPU cores (POSIX-safe) + if command -v nproc >/dev/null 2>&1; then + current_cpu=$(nproc) + else + current_cpu=$(grep -c ^processor /proc/cpuinfo) + fi + # Check if RAM or CPU is below requirement + if [ "$current_ram" -lt "$var_ram" ] || [ "$current_cpu" -lt "$var_cpu" ]; then + echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}" + echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n" + echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " + read -r prompt - case "$(printf "%s" "$prompt" | tr '[:upper:]' '[:lower:]')" in - yes) ;; - *) - echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}" - exit 1 - ;; - esac - else - echo -e "" - fi + case "$(printf "%s" "$prompt" | tr '[:upper:]' '[:lower:]')" in + yes) ;; + *) + echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}" + exit 1 + ;; + esac + else + echo -e "" + fi } check_container_storage() { - # Check if /boot is mounted and retrieve total and used blocks - if df /boot >/dev/null 2>&1; then - total_size=$(df /boot | awk 'NR==2 {print $2}') - used_size=$(df /boot | awk 'NR==2 {print $3}') - else - echo -e "${CROSS}${HOLD} ${RD}/boot partition not found or cannot be checked.${CL}" - exit 1 - fi - # Fallback in case of invalid data - if [ -z "$total_size" ] || [ -z "$used_size" ]; then - echo -e "${CROSS}${HOLD} ${RD}Unable to determine storage usage.${CL}" - exit 1 - fi - # Calculate disk usage percentage (integer) - usage=$((100 * used_size / total_size)) - if [ "$usage" -gt 80 ]; then - echo -e "${INFO}${HOLD} ${YWB}Warning: /boot storage is critically low (${usage}%).${CL}" - echo -ne "Continue anyway? " - read -r prompt - case "$(printf "%s" "$prompt" | tr '[:upper:]' '[:lower:]')" in - y | yes) ;; - *) - echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}" - exit 1 - ;; - esac - fi + # Check if /boot is mounted and retrieve total and used blocks + if df /boot >/dev/null 2>&1; then + total_size=$(df /boot | awk 'NR==2 {print $2}') + used_size=$(df /boot | awk 'NR==2 {print $3}') + else + echo -e "${CROSS}${HOLD} ${RD}/boot partition not found or cannot be checked.${CL}" + exit 1 + fi + # Fallback in case of invalid data + if [ -z "$total_size" ] || [ -z "$used_size" ]; then + echo -e "${CROSS}${HOLD} ${RD}Unable to determine storage usage.${CL}" + exit 1 + fi + # Calculate disk usage percentage (integer) + usage=$((100 * used_size / total_size)) + if [ "$usage" -gt 80 ]; then + echo -e "${INFO}${HOLD} ${YWB}Warning: /boot storage is critically low (${usage}%).${CL}" + echo -ne "Continue anyway? " + read -r prompt + case "$(printf "%s" "$prompt" | tr '[:upper:]' '[:lower:]')" in + y | yes) ;; + *) + echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}" + exit 1 + ;; + esac + fi } get_gh_release() { - local repo="$1" - local app="${repo##*/}" - local api_url="https://api.github.com/repos/$repo/releases/latest" - local header=() - local attempt=0 - local max_attempts=3 - local api_response tag + local repo="$1" + local app="${repo##*/}" + local api_url="https://api.github.com/repos/$repo/releases/latest" + local header=() + local attempt=0 + local max_attempts=3 + local api_response tag - echo "🔍 Checking latest release for: $repo" + echo "🔍 Checking latest release for: $repo" - [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") + [[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN") - until [[ $attempt -ge $max_attempts ]]; do - ((attempt++)) - $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" + until [[ $attempt -ge $max_attempts ]]; do + ((attempt++)) + $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" - if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then - $STD msg_info "Request failed, retrying...\n" - sleep 2 - continue - fi + if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then + $STD msg_info "Request failed, retrying...\n" + sleep 2 + continue + fi - if echo "$api_response" | grep -q "API rate limit exceeded"; then - msg_error "GitHub API rate limit exceeded." - return 1 - fi + if echo "$api_response" | grep -q "API rate limit exceeded"; then + msg_error "GitHub API rate limit exceeded." + return 1 + fi - if echo "$api_response" | jq -e '.message == "Not Found"' &>/dev/null; then - msg_error "Repository not found: $repo" - return 1 - fi + if echo "$api_response" | jq -e '.message == "Not Found"' &>/dev/null; then + msg_error "Repository not found: $repo" + return 1 + fi - tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') - [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" + tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty') + [[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}" - if [[ -z "$tag" ]]; then - $STD msg_info "Empty tag received, retrying...\n" - sleep 2 - continue - fi + if [[ -z "$tag" ]]; then + $STD msg_info "Empty tag received, retrying...\n" + sleep 2 + continue + fi - $STD msg_ok "Found release: $tag for $repo" - echo "$tag" - return 0 - done + $STD msg_ok "Found release: $tag for $repo" + echo "$tag" + return 0 + done - msg_error "Failed to fetch release for $repo after $max_attempts attempts." - return 1 + msg_error "Failed to fetch release for $repo after $max_attempts attempts." + return 1 } start() { - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/tools.func) - LOGDIR="/usr/local/community-scripts/logs" - mkdir -p "$LOGDIR" + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/tools.func) + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" - if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - exit_script - exit + if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + exit_script + exit + fi + SPINNER_PID="" + install_script fi - SPINNER_PID="" - install_script - fi - if ! command -v pveversion >/dev/null 2>&1; then - CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ - "Support/Update functions for ${APP} LXC. Choose an option:" \ - 12 60 3 \ - "1" "YES (Silent Mode)" \ - "2" "YES (Verbose Mode)" \ - "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) + if ! command -v pveversion >/dev/null 2>&1; then + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ + "Support/Update functions for ${APP} LXC. Choose an option:" \ + 12 60 3 \ + "1" "YES (Silent Mode)" \ + "2" "YES (Verbose Mode)" \ + "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) - case "$CHOICE" in - 1) - VERB="no" - set_std_mode - #log_message "INFO" "Update started (Silent Mode)" - ;; - 2) - VERB="yes" - set_std_mode - #log_message "INFO" "Update started (Verbose Mode)" - ;; - 3) - clear - #log_message "INFO" "Update aborted." - exit_script - exit 0 - ;; - esac + case "$CHOICE" in + 1) + VERB="no" + set_std_mode + #log_message "INFO" "Update started (Silent Mode)" + ;; + 2) + VERB="yes" + set_std_mode + #log_message "INFO" "Update started (Verbose Mode)" + ;; + 3) + clear + #log_message "INFO" "Update aborted." + exit_script + exit 0 + ;; + esac - SPINNER_PID="" - update_script - fi + SPINNER_PID="" + update_script + fi } # This function collects user settings and integrates all the collected information. build_container() { - # if [ "$VERB" == "yes" ]; then set -x; fi + # if [ "$VERB" == "yes" ]; then set -x; fi - if [ "$CT_TYPE" == "1" ]; then - FEATURES="keyctl=1,nesting=1" - else - FEATURES="nesting=1" - fi - # 26.03.2025 disabled - #if [ "$ENABLE_FUSE" == "yes" ]; then - # FEATURES+=",fuse=1" - #fi + if [ "$CT_TYPE" == "1" ]; then + FEATURES="keyctl=1,nesting=1" + else + FEATURES="nesting=1" + fi + # 26.03.2025 disabled + #if [ "$ENABLE_FUSE" == "yes" ]; then + # FEATURES+=",fuse=1" + #fi - if [[ $DIAGNOSTICS == "yes" ]]; then - post_to_api - fi + if [[ $DIAGNOSTICS == "yes" ]]; then + post_to_api + fi - FEATURES="${FEATURES#,}" - TEMP_DIR=$(mktemp -d) - pushd $TEMP_DIR >/dev/null - if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" - else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" - fi - export RANDOM_UUID="$RANDOM_UUID" - export CACHER="$APT_CACHER" - export CACHER_IP="$APT_CACHER_IP" - export tz="$timezone" - export DISABLEIPV6="$DISABLEIP6" - export APPLICATION="$APP" - export app="$NSAPP" - export PASSWORD="$PW" - export VERBOSE="$VERB" - export SSH_ROOT="${SSH}" - export SSH_AUTHORIZED_KEY - export CTID="$CT_ID" - export CTTYPE="$CT_TYPE" - export PCT_OSTYPE="$var_os" - export PCT_OSVERSION="$var_version" - export PCT_DISK_SIZE="$DISK_SIZE" - #export IPv6="$IPv6" - export PCT_OPTIONS=" + FEATURES="${FEATURES#,}" + TEMP_DIR=$(mktemp -d) + pushd $TEMP_DIR >/dev/null + if [ "$var_os" == "alpine" ]; then + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" + else + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + fi + export RANDOM_UUID="$RANDOM_UUID" + export CACHER="$APT_CACHER" + export CACHER_IP="$APT_CACHER_IP" + export tz="$timezone" + export DISABLEIPV6="$DISABLEIP6" + export APPLICATION="$APP" + export app="$NSAPP" + export PASSWORD="$PW" + export VERBOSE="$VERB" + export SSH_ROOT="${SSH}" + export SSH_AUTHORIZED_KEY + export CTID="$CT_ID" + export CTTYPE="$CT_TYPE" + export PCT_OSTYPE="$var_os" + export PCT_OSVERSION="$var_version" + export PCT_DISK_SIZE="$DISK_SIZE" + #export IPv6="$IPv6" + export PCT_OPTIONS=" -features $FEATURES -hostname $HN -tags $TAGS @@ -1237,12 +1239,12 @@ build_container() { $PW " - # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? + # This executes create_lxc.sh and creates the container and .conf file + bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - if [ "$CT_TYPE" == "0" ]; then - cat <>$LXC_CONFIG + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + if [ "$CT_TYPE" == "0" ]; then + cat <>$LXC_CONFIG # USB passthrough lxc.cgroup2.devices.allow: a lxc.cap.drop: @@ -1254,11 +1256,11 @@ lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create= lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file EOF - fi + fi - if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then - cat <>$LXC_CONFIG + if [ "$CT_TYPE" == "0" ]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then + cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm @@ -1267,50 +1269,50 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF - fi - else - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then - if [[ -e "/dev/dri/renderD128" ]]; then - if [[ -e "/dev/dri/card0" ]]; then - cat <>$LXC_CONFIG + fi + else + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then + if [[ -e "/dev/dri/renderD128" ]]; then + if [[ -e "/dev/dri/card0" ]]; then + cat <>$LXC_CONFIG # VAAPI hardware transcoding dev0: /dev/dri/card0,gid=44 dev1: /dev/dri/renderD128,gid=104 EOF - else - cat <>$LXC_CONFIG + else + cat <>$LXC_CONFIG # VAAPI hardware transcoding dev0: /dev/dri/card1,gid=44 dev1: /dev/dri/renderD128,gid=104 EOF + fi + fi fi - fi fi - fi - # This starts the container and executes -install.sh - msg_info "Starting LXC Container" - pct start "$CTID" - msg_ok "Started LXC Container" - if [ "$var_os" == "alpine" ]; then - sleep 3 - pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories + # This starts the container and executes -install.sh + msg_info "Starting LXC Container" + pct start "$CTID" + msg_ok "Started LXC Container" + if [ "$var_os" == "alpine" ]; then + sleep 3 + pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories http://dl-cdn.alpinelinux.org/alpine/latest-stable/main http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' - pct exec "$CTID" -- ash -c "apk add bash >/dev/null" - fi - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? + pct exec "$CTID" -- ash -c "apk add bash >/dev/null" + fi + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? } # This function sets the description of the container. description() { - IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) + IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - # Generate LXC Description - DESCRIPTION=$( - cat <
Logo @@ -1338,16 +1340,33 @@ description() {
EOF - ) + ) - # Set Description in LXC - pct set "$CTID" -description "$DESCRIPTION" + # Set Description in LXC + pct set "$CTID" -description "$DESCRIPTION" - if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service - fi + if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service + fi - post_update_to_api "done" "none" + post_update_to_api "done" "none" +} + +set_std_mode() { + if [ "$VERB" = "yes" ]; then + STD="" + else + STD="silent" + fi +} + +# Silent execution function +silent() { + if [ "$VERB" = "no" ]; then + "$@" >>"$LOGFILE" 2>&1 + else + "$@" 2>&1 | tee -a "$LOGFILE" + fi } # Silent execution function @@ -1364,27 +1383,27 @@ EOF #trap 'post_update_to_api "failed" "143"' SIGTERM exit_script() { - exit_code=$? # Capture the exit status of the last executed command - #200 exit codes indicate error in create_lxc.sh - #100 exit codes indicate error in install.func + exit_code=$? # Capture the exit status of the last executed command + #200 exit codes indicate error in create_lxc.sh + #100 exit codes indicate error in install.func - if [ $exit_code -ne 0 ]; then - case $exit_code in - 100) post_update_to_api "failed" "100: Unexpected error in create_lxc.sh" ;; - 101) post_update_to_api "failed" "101: No network connection detected in create_lxc.sh" ;; - 200) post_update_to_api "failed" "200: LXC creation failed in create_lxc.sh" ;; - 201) post_update_to_api "failed" "201: Invalid Storage class in create_lxc.sh" ;; - 202) post_update_to_api "failed" "202: User aborted menu in create_lxc.sh" ;; - 203) post_update_to_api "failed" "203: CTID not set in create_lxc.sh" ;; - 204) post_update_to_api "failed" "204: PCT_OSTYPE not set in create_lxc.sh" ;; - 205) post_update_to_api "failed" "205: CTID cannot be less than 100 in create_lxc.sh" ;; - 206) post_update_to_api "failed" "206: CTID already in use in create_lxc.sh" ;; - 207) post_update_to_api "failed" "207: Template not found in create_lxc.sh" ;; - 208) post_update_to_api "failed" "208: Error downloading template in create_lxc.sh" ;; - 209) post_update_to_api "failed" "209: Container creation failed, but template is intact in create_lxc.sh" ;; - *) post_update_to_api "failed" "Unknown error, exit code: $exit_code in create_lxc.sh" ;; - esac - fi + if [ $exit_code -ne 0 ]; then + case $exit_code in + 100) post_update_to_api "failed" "100: Unexpected error in create_lxc.sh" ;; + 101) post_update_to_api "failed" "101: No network connection detected in create_lxc.sh" ;; + 200) post_update_to_api "failed" "200: LXC creation failed in create_lxc.sh" ;; + 201) post_update_to_api "failed" "201: Invalid Storage class in create_lxc.sh" ;; + 202) post_update_to_api "failed" "202: User aborted menu in create_lxc.sh" ;; + 203) post_update_to_api "failed" "203: CTID not set in create_lxc.sh" ;; + 204) post_update_to_api "failed" "204: PCT_OSTYPE not set in create_lxc.sh" ;; + 205) post_update_to_api "failed" "205: CTID cannot be less than 100 in create_lxc.sh" ;; + 206) post_update_to_api "failed" "206: CTID already in use in create_lxc.sh" ;; + 207) post_update_to_api "failed" "207: Template not found in create_lxc.sh" ;; + 208) post_update_to_api "failed" "208: Error downloading template in create_lxc.sh" ;; + 209) post_update_to_api "failed" "209: Container creation failed, but template is intact in create_lxc.sh" ;; + *) post_update_to_api "failed" "Unknown error, exit code: $exit_code in create_lxc.sh" ;; + esac + fi } trap 'exit_script' EXIT From cb1676f95fe1c6e982a98dd0cd6b8becedfbc652 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Mon, 28 Apr 2025 10:11:17 +0200 Subject: [PATCH 0664/1614] Add Random-Script Site --- frontend/src/app/random-script/page.tsx | 68 +++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 frontend/src/app/random-script/page.tsx diff --git a/frontend/src/app/random-script/page.tsx b/frontend/src/app/random-script/page.tsx new file mode 100644 index 0000000..8118b29 --- /dev/null +++ b/frontend/src/app/random-script/page.tsx @@ -0,0 +1,68 @@ +"use client"; + +import { useEffect, useState } from "react"; +import { fetchCategories } from "@/lib/data"; +import { Category, Script } from "@/lib/types"; +import { ScriptItem } from "@/app/scripts/_components/ScriptItem"; +import { Loader2, RefreshCw } from "lucide-react"; + +function getRandomScript(categories: Category[]): Script | null { + const allScripts = categories.flatMap((cat) => cat.scripts || []); + if (allScripts.length === 0) return null; + const idx = Math.floor(Math.random() * allScripts.length); + return allScripts[idx]; +} + +export default function RandomScriptPage() { + const [categories, setCategories] = useState([]); + const [randomScript, setRandomScript] = useState