Compare commits

..

28 Commits

Author SHA1 Message Date
Sam Heinz 46b5dc4178 update jdk when updating crafty-controller 2026-06-23 19:39:06 +10:00
community-scripts-pr-app[bot] 13f348ce1b Update CHANGELOG.md (#15347)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-23 06:08:55 +00:00
Brad Baker 812200ccd6 termix - patch tmp nginx behaviour to match the install script (#15283)
* Update Nginx configuration and service files to deal with /tmp update issues

Create necessary directories and configuration files for Nginx service.

* Refactor pidfile.conf creation in termix.sh

Reformatted the creation of pidfile.conf for consistency.

* Clean up old nginx configuration files

Remove old nginx configuration files before creating new ones.

* Update ct/termix.sh

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>

* Update ct/termix.sh

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>

* Update ct/termix.sh

only create if it doesn't exist

* Update termix.sh

* Fix heredoc syntax

---------

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Sam Heinz <sam@samheinz.com>
2026-06-23 08:08:27 +02:00
community-scripts-pr-app[bot] 5fe4c20ccc Update CHANGELOG.md (#15346)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-23 05:49:14 +00:00
CanbiZ (MickLesk) 33a18190fc fix(librenms): run daily.sh as librenms user with git available (#15314) 2026-06-23 07:48:52 +02:00
community-scripts-pr-app[bot] eabfaf25dc Update CHANGELOG.md (#15345)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-23 05:39:57 +00:00
Luna e076322c0f fix: close lxc build function (#15343) 2026-06-23 07:39:36 +02:00
community-scripts-pr-app[bot] f7dff0a642 Update CHANGELOG.md (#15341)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-23 05:29:32 +00:00
Copilot 52e4e5ff39 fix(build.func): remove duplicate if statement causing syntax error on container creation (#15338)
* Initial plan

* fix(build.func): remove duplicate if statement causing syntax error

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-06-23 07:29:05 +02:00
community-scripts-pr-app[bot] 23ee4c3722 Update CHANGELOG.md (#15339)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-23 05:26:16 +00:00
l0caldadmin 89b6678d1f Fix syntax error in build function (#15337) 2026-06-23 07:25:51 +02:00
community-scripts-pr-app[bot] aab46b25e3 Update CHANGELOG.md (#15330)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-23 04:32:10 +00:00
CanbiZ (MickLesk) b18e9298b1 Implement local _disable_update for conditional upgrade handling
Add a local variable to manage update disabling based on environment settings.
2026-06-23 06:31:44 +02:00
community-scripts-pr-app[bot] a96402797e Update CHANGELOG.md (#15327)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-22 20:07:11 +00:00
Jesse Hills 9b619969ad update: esphome to install and run ESPHome Device Builder (#15195) 2026-06-22 22:06:36 +02:00
community-scripts-pr-app[bot] 70e14ef238 Update CHANGELOG.md (#15326)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-22 20:02:47 +00:00
community-scripts-pr-app[bot] 7ac60ac88e Update CHANGELOG.md (#15325)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-22 20:02:33 +00:00
CanbiZ (MickLesk) cfb5114d8b invoiceshelf: use pnpm instead of yarn for frontend build (#15312) 2026-06-22 22:02:17 +02:00
community-scripts-pr-app[bot] d879050293 Update CHANGELOG.md (#15324)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-22 20:02:04 +00:00
CanbiZ (MickLesk) bd228edb21 tools.func: refresh ruby-build when requested version is missing (#15315) 2026-06-22 22:01:40 +02:00
community-scripts-pr-app[bot] fdd6704b3c Update CHANGELOG.md (#15323)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-22 20:00:49 +00:00
CanbiZ (MickLesk) 084993ba60 VictoriaMetrics: resolve architecture before jq asset filter (#15316) 2026-06-22 22:00:23 +02:00
community-scripts-pr-app[bot] f8ae0738c9 Update CHANGELOG.md (#15322)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-22 20:00:07 +00:00
community-scripts-pr-app[bot] f1321ce38b Update CHANGELOG.md (#15321)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-22 19:59:57 +00:00
CanbiZ (MickLesk) 1cdf74dd41 update-apps: sanitize service detection and fail on invalid names (#15318) 2026-06-22 21:59:43 +02:00
CanbiZ (MickLesk) fd1dbf2ba1 core:: skip LXC stack upgrade prompt in unattended mode (#15319) 2026-06-22 21:59:27 +02:00
community-scripts-pr-app[bot] 68bf362a9d Update CHANGELOG.md (#15320)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-22 19:47:16 +00:00
CanbiZ (MickLesk) edbd570adf Endurain: pin uv to the version required by the project (#15313) 2026-06-22 21:46:52 +02:00
12 changed files with 188 additions and 64 deletions
+42
View File
@@ -486,6 +486,30 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-06-23
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- LibreNMS: run daily.sh as librenms user with git available [@MickLesk](https://github.com/MickLesk) ([#15314](https://github.com/community-scripts/ProxmoxVE/pull/15314))
- #### ✨ New Features
- termix - patch tmp nginx behaviour to match the install script [@xyzulu](https://github.com/xyzulu) ([#15283](https://github.com/community-scripts/ProxmoxVE/pull/15283))
### 💾 Core
- Fix syntax error in build function [@l0caldadmin](https://github.com/l0caldadmin) ([#15337](https://github.com/community-scripts/ProxmoxVE/pull/15337))
- #### 🐞 Bug Fixes
- fix: close lxc build function [@ServerBP](https://github.com/ServerBP) ([#15343](https://github.com/community-scripts/ProxmoxVE/pull/15343))
### ❔ Uncategorized
- fix(build.func): remove duplicate if statement causing syntax error on container creation [@Copilot](https://github.com/Copilot) ([#15338](https://github.com/community-scripts/ProxmoxVE/pull/15338))
## 2026-06-22
### 🆕 New Scripts
@@ -496,6 +520,9 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- invoiceshelf: use pnpm instead of yarn for frontend build [@MickLesk](https://github.com/MickLesk) ([#15312](https://github.com/community-scripts/ProxmoxVE/pull/15312))
- VictoriaMetrics: resolve architecture before jq asset filter [@MickLesk](https://github.com/MickLesk) ([#15316](https://github.com/community-scripts/ProxmoxVE/pull/15316))
- Endurain: pin uv to the version required by the project [@MickLesk](https://github.com/MickLesk) ([#15313](https://github.com/community-scripts/ProxmoxVE/pull/15313))
- add proxy headers to dispatcharr from #15143 [@asylumexp](https://github.com/asylumexp) ([#15293](https://github.com/community-scripts/ProxmoxVE/pull/15293))
- Fix-15015: check correct path for certbot [@galz55](https://github.com/galz55) ([#15034](https://github.com/community-scripts/ProxmoxVE/pull/15034))
- fix(romm): resolve 403 Forbidden error on nginx mod_zip installation [@hug-efrei](https://github.com/hug-efrei) ([#15134](https://github.com/community-scripts/ProxmoxVE/pull/15134))
@@ -505,16 +532,31 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### ✨ New Features
- update: esphome to install and run ESPHome Device Builder [@jesserockz](https://github.com/jesserockz) ([#15195](https://github.com/community-scripts/ProxmoxVE/pull/15195))
- [arm64] Port scripts between warracker-zwavejsui to support arm64 [@asylumexp](https://github.com/asylumexp) ([#15291](https://github.com/community-scripts/ProxmoxVE/pull/15291))
- [arm64] Port scripts between thingsboard & wanderer to support arm64 [@asylumexp](https://github.com/asylumexp) ([#15286](https://github.com/community-scripts/ProxmoxVE/pull/15286))
- [arm64] Port scripts between snowshare & thelounge to support arm64 [@asylumexp](https://github.com/asylumexp) ([#15280](https://github.com/community-scripts/ProxmoxVE/pull/15280))
### 💾 Core
- #### 🐞 Bug Fixes
- tools.func: refresh ruby-build when requested version is missing [@MickLesk](https://github.com/MickLesk) ([#15315](https://github.com/community-scripts/ProxmoxVE/pull/15315))
- #### ✨ New Features
- core: add pre-install storage health checks [@MickLesk](https://github.com/MickLesk) ([#15226](https://github.com/community-scripts/ProxmoxVE/pull/15226))
- #### 🔧 Refactor
- core:: skip LXC stack upgrade prompt in unattended mode [@MickLesk](https://github.com/MickLesk) ([#15319](https://github.com/community-scripts/ProxmoxVE/pull/15319))
### 🧰 Tools
- #### 🔧 Refactor
- update-apps: sanitize service detection and fail on invalid names [@MickLesk](https://github.com/MickLesk) ([#15318](https://github.com/community-scripts/ProxmoxVE/pull/15318))
## 2026-06-21
### 🚀 Updated Scripts
+6
View File
@@ -46,6 +46,12 @@ function update_script() {
restore_backup
msg_info "Updating TemurinJDK"
setup_java
$STD apt install -y temurin-{8,11,17,21,25}-jre
$STD update-alternatives --set java /usr/lib/jvm/temurin-25-jre-$(arch_resolve)/bin/java
msg_ok "Updated TemurinJDK"
msg_info "Updating Python dependencies"
chown -R crafty:crafty /opt/crafty-controller
cd /opt/crafty-controller/crafty/crafty-4
+2
View File
@@ -61,6 +61,8 @@ function update_script() {
msg_info "Updating Backend"
cd /opt/endurain/backend
UV_VERSION=$(grep -Po 'required-version\s*=\s*"\K[^"]+' pyproject.toml 2>/dev/null || echo "0.11.18")
UV_VERSION="$UV_VERSION" setup_uv
$STD poetry export -f requirements.txt --output requirements.txt --without-hashes
$STD uv venv --clear
$STD uv pip install -r requirements.txt
+20 -16
View File
@@ -24,13 +24,14 @@ function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/esphomeDashboard.service ]]; then
if [[ ! -f /etc/systemd/system/esphome-device-builder.service && ! -f /etc/systemd/system/esphomeDashboard.service ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Stopping Service"
systemctl stop esphomeDashboard
systemctl stop esphome-device-builder 2>/dev/null || true
systemctl stop esphomeDashboard 2>/dev/null || true
msg_ok "Stopped Service"
VENV_PATH="/opt/esphome/.venv"
@@ -46,33 +47,36 @@ function update_script() {
$STD uv venv --clear "$VENV_PATH"
$STD "$VENV_PATH/bin/python" -m ensurepip --upgrade
$STD "$VENV_PATH/bin/python" -m pip install --upgrade pip
$STD "$VENV_PATH/bin/python" -m pip install esphome tornado esptool
$STD "$VENV_PATH/bin/python" -m pip install esphome esphome-device-builder esptool
msg_ok "Migrated to uv/venv"
else
msg_info "Updating ESPHome"
msg_info "Updating ESPHome Device Builder"
PYTHON_VERSION="3.12" setup_uv
$STD "$VENV_PATH/bin/python" -m pip install --upgrade esphome tornado esptool
msg_ok "Updated ESPHome"
$STD "$VENV_PATH/bin/python" -m pip install --upgrade esphome esphome-device-builder esptool
msg_ok "Updated ESPHome Device Builder"
fi
SERVICE_FILE="/etc/systemd/system/esphomeDashboard.service"
if ! grep -q "${VENV_PATH}/bin/esphome" "$SERVICE_FILE"; then
msg_info "Updating systemd service"
cat <<EOF >"$SERVICE_FILE"
msg_info "Migrating to ESPHome Device Builder service"
if [[ -f /etc/systemd/system/esphomeDashboard.service ]]; then
systemctl disable -q esphomeDashboard 2>/dev/null || true
rm -f /etc/systemd/system/esphomeDashboard.service
fi
cat <<EOF >/etc/systemd/system/esphome-device-builder.service
[Unit]
Description=ESPHome Dashboard
Description=ESPHome Device Builder
After=network.target
[Service]
ExecStart=${VENV_PATH}/bin/esphome dashboard /root/config/
ExecStart=${VENV_PATH}/bin/esphome-device-builder /root/config/
Restart=always
User=root
[Install]
WantedBy=multi-user.target
EOF
$STD systemctl daemon-reload
msg_ok "Updated systemd service"
fi
$STD systemctl daemon-reload
$STD systemctl enable esphome-device-builder
msg_ok "Migrated to ESPHome Device Builder service"
msg_info "Linking esphome to /usr/local/bin"
rm -f /usr/local/bin/esphome
@@ -80,7 +84,7 @@ EOF
msg_ok "Linked esphome binary"
msg_info "Starting Service"
systemctl start esphomeDashboard
systemctl start esphome-device-builder
msg_ok "Started Service"
msg_ok "Updated successfully!"
exit
+4 -5
View File
@@ -53,12 +53,11 @@ function update_script() {
cd /opt/invoiceshelf
$STD composer install --no-dev --optimize-autoloader
if command -v corepack >/dev/null 2>&1; then
$STD corepack yarn install
$STD corepack yarn build
$STD corepack pnpm install
$STD corepack pnpm run build
else
$STD yarn install
$STD yarn build
$STD pnpm install
$STD pnpm run build
fi
$STD php artisan migrate --force
$STD php artisan optimize:clear
+17 -1
View File
@@ -206,9 +206,25 @@ EOF
sed -i 's|/app/html|/opt/termix/html|g' /etc/nginx/nginx.conf
sed -i 's|/app/nginx|/opt/termix/nginx|g' /etc/nginx/nginx.conf
sed -i 's|listen ${PORT};|listen 80;|g' /etc/nginx/nginx.conf
rm -f /etc/systemd/system/nginx.service.d/pidfile.conf
rm -f /etc/tmpfiles.d/nginx-termix.conf
if [ ! -d /tmp/nginx ]; then
mkdir -p /tmp/nginx
fi
if [ ! -f /etc/tmpfiles.d/nginx-termix.conf ]; then
echo "d /tmp/nginx 0755 nobody nogroup -" >/etc/tmpfiles.d/nginx-termix.conf
fi
if [ ! -f /etc/systemd/system/nginx.service.d/pidfile.conf ]; then
mkdir -p /etc/systemd/system/nginx.service.d/
cat <<'EOF' >/etc/systemd/system/nginx.service.d/pidfile.conf
[Service]
PIDFile=/tmp/nginx/nginx.pid
EOF
fi
systemctl daemon-reload
nginx -t && systemctl restart nginx
msg_ok "Updated Nginx Configuration"
+2
View File
@@ -81,6 +81,8 @@ msg_ok "Built Frontend"
msg_info "Setting up Backend"
cd /opt/endurain/backend
UV_VERSION=$(grep -Po 'required-version\s*=\s*"\K[^"]+' pyproject.toml 2>/dev/null || echo "0.11.18")
UV_VERSION="$UV_VERSION" setup_uv
$STD uv tool install poetry
$STD uv tool update-shell
export PATH="/root/.local/bin:$PATH"
+6 -6
View File
@@ -26,8 +26,8 @@ cd /opt/esphome
$STD uv venv --clear /opt/esphome/.venv
$STD /opt/esphome/.venv/bin/python -m ensurepip --upgrade
$STD /opt/esphome/.venv/bin/python -m pip install --upgrade pip
$STD /opt/esphome/.venv/bin/python -m pip install esphome tornado esptool
msg_ok "Setup and Installed ESPHome"
$STD /opt/esphome/.venv/bin/python -m pip install esphome esphome-device-builder esptool
msg_ok "Setup and Installed ESPHome Device Builder"
msg_info "Linking esphome to /usr/local/bin"
rm -f /usr/local/bin/esphome
@@ -36,13 +36,13 @@ msg_ok "Linked esphome binary"
msg_info "Creating Service"
mkdir -p /root/config
cat <<EOF >/etc/systemd/system/esphomeDashboard.service
cat <<EOF >/etc/systemd/system/esphome-device-builder.service
[Unit]
Description=ESPHome Dashboard
Description=ESPHome Device Builder
After=network.target
[Service]
ExecStart=/opt/esphome/.venv/bin/esphome dashboard /root/config/
ExecStart=/opt/esphome/.venv/bin/esphome-device-builder /root/config/
Restart=always
User=root
@@ -50,7 +50,7 @@ User=root
WantedBy=multi-user.target
EOF
systemctl enable -q --now esphomeDashboard
systemctl enable -q --now esphome-device-builder
msg_ok "Created Service"
motd_ssh
+1 -1
View File
@@ -16,7 +16,7 @@ update_os
msg_info "Getting latest version of VictoriaMetrics"
victoriametrics_release=$(curl -fsSL "https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases" |
jq -r --arg a "$arch_resolve" '.[] | select(.assets[].name | match("^victoria-metrics-linux-" + $a + "-v[0-9.]+.tar.gz$")) | .tag_name' |
jq -r --arg a "$(arch_resolve)" '.[] | select(.assets[].name | match("^victoria-metrics-linux-" + $a + "-v[0-9.]+.tar.gz$")) | .tag_name' |
head -n 1)
victoriametrics_filename="victoria-metrics-linux-$(arch_resolve)-${victoriametrics_release}.tar.gz"
vmutils_filename="vmutils-linux-$(arch_resolve)-${victoriametrics_release}.tar.gz"
+5
View File
@@ -5721,6 +5721,11 @@ create_lxc_container() {
msg_debug "No newer candidate for pve-container/lxc-pve (installed=$_pvec_i/$_lxcp_i, cand=$_pvec_c/$_lxcp_c)"
return 0
fi
local _disable_update="${DISABLE_UPDATE:-no}"
if [[ "${PHS_SILENT:-0}" == "1" || "${_disable_update,,}" == "yes" ]]; then
msg_info "Skipping host LXC stack upgrade prompt (unattended mode)"
return 2
fi
msg_warn "An update for the Proxmox LXC stack is available"
echo " pve-container: installed=${_pvec_i:-n/a} candidate=${_pvec_c:-n/a}"
+34 -19
View File
@@ -8452,29 +8452,34 @@ setup_ruby() {
fi
# Install ruby-build plugin
if [[ ! -d "$RBENV_DIR/plugins/ruby-build" ]]; then
_install_ruby_build_plugin() {
local RUBY_BUILD_RELEASE
RUBY_BUILD_RELEASE=$(get_latest_github_release "rbenv/ruby-build") || {
msg_error "Failed to fetch latest ruby-build version from GitHub"
rm -rf "$TMP_DIR"
return 7
}
if ! curl_with_retry "https://github.com/rbenv/ruby-build/archive/refs/tags/v${RUBY_BUILD_RELEASE}.tar.gz" "$TMP_DIR/ruby-build.tar.gz"; then
msg_error "Failed to download ruby-build"
msg_error "Hint: Check connectivity to github.com/rbenv/ruby-build"
rm -rf "$TMP_DIR"
return 7
fi
tar -xzf "$TMP_DIR/ruby-build.tar.gz" -C "$TMP_DIR" || {
msg_error "Failed to extract ruby-build"
rm -rf "$TMP_DIR"
return 251
}
mkdir -p "$RBENV_DIR/plugins/ruby-build"
cp -r "$TMP_DIR/ruby-build-${RUBY_BUILD_RELEASE}/." "$RBENV_DIR/plugins/ruby-build/"
return 0
}
if [[ ! -d "$RBENV_DIR/plugins/ruby-build" ]]; then
_install_ruby_build_plugin || {
rm -rf "$TMP_DIR"
return 7
}
fi
# Setup PATH and install Ruby version
@@ -8482,6 +8487,14 @@ setup_ruby() {
eval "$("$RBENV_BIN" init - bash)" 2>/dev/null || true
if ! "$RBENV_BIN" versions --bare 2>/dev/null | grep -qx "$RUBY_VERSION"; then
if [[ ! -f "$RBENV_DIR/plugins/ruby-build/share/ruby-build/$RUBY_VERSION" ]]; then
msg_info "Updating ruby-build definitions"
_install_ruby_build_plugin || {
rm -rf "$TMP_DIR"
return 7
}
msg_ok "Updated ruby-build definitions"
fi
$STD "$RBENV_BIN" install "$RUBY_VERSION" || {
msg_error "Failed to install Ruby $RUBY_VERSION"
rm -rf "$TMP_DIR"
@@ -8710,12 +8723,14 @@ setup_uv() {
ensure_dependencies jq
# Fetch latest version
local LATEST_VERSION
LATEST_VERSION=$(get_latest_github_release "astral-sh/uv") || {
msg_error "Could not fetch latest uv version from GitHub API"
return 7
}
# Fetch target version (pinned via UV_VERSION or latest release)
local TARGET_VERSION="${UV_VERSION:-}"
if [[ -z "$TARGET_VERSION" ]]; then
TARGET_VERSION=$(get_latest_github_release "astral-sh/uv") || {
msg_error "Could not fetch latest uv version from GitHub API"
return 7
}
fi
# Get currently installed version
local INSTALLED_VERSION=""
@@ -8723,9 +8738,9 @@ setup_uv() {
INSTALLED_VERSION=$("$UV_BIN" --version 2>/dev/null | awk '{print $2}')
fi
# Scenario 1: Already at latest version
if [[ -n "$INSTALLED_VERSION" && "$INSTALLED_VERSION" == "$LATEST_VERSION" ]]; then
cache_installed_version "uv" "$LATEST_VERSION"
# Scenario 1: Already at target version
if [[ -n "$INSTALLED_VERSION" && "$INSTALLED_VERSION" == "$TARGET_VERSION" ]]; then
cache_installed_version "uv" "$TARGET_VERSION"
# Check if uvx is needed and missing
if [[ "${USE_UVX:-NO}" == "YES" ]] && [[ ! -x "$UVX_BIN" ]]; then
@@ -8738,13 +8753,13 @@ setup_uv() {
fi
# Scenario 2: New install or upgrade
if [[ -n "$INSTALLED_VERSION" && "$INSTALLED_VERSION" != "$LATEST_VERSION" ]]; then
msg_info "Upgrade uv from $INSTALLED_VERSION to $LATEST_VERSION"
if [[ -n "$INSTALLED_VERSION" && "$INSTALLED_VERSION" != "$TARGET_VERSION" ]]; then
msg_info "Upgrade uv from $INSTALLED_VERSION to $TARGET_VERSION"
else
msg_info "Setup uv $LATEST_VERSION"
msg_info "Setup uv $TARGET_VERSION"
fi
local UV_URL="https://github.com/astral-sh/uv/releases/download/${LATEST_VERSION}/${UV_TAR}"
local UV_URL="https://github.com/astral-sh/uv/releases/download/${TARGET_VERSION}/${UV_TAR}"
if ! curl_with_retry "$UV_URL" "$TMP_DIR/uv.tar.gz"; then
msg_error "Failed to download uv from $UV_URL"
@@ -8799,8 +8814,8 @@ setup_uv() {
msg_ok "Python $PYTHON_VERSION installed"
fi
cache_installed_version "uv" "$LATEST_VERSION"
msg_ok "Setup uv $LATEST_VERSION"
cache_installed_version "uv" "$TARGET_VERSION"
msg_ok "Setup uv $TARGET_VERSION"
}
# Helper function to install uvx wrapper
+49 -16
View File
@@ -145,11 +145,35 @@ function header_info {
EOF
}
function sanitize_service_name() {
local name="${1//$'\r'/}"
name="${name//$'\n'/}"
[[ -z "$name" ]] && return 1
[[ "$name" == *'#!'* ]] && return 1
[[ ! "$name" =~ ^[a-zA-Z0-9._-]+$ ]] && return 1
return 0
}
function validate_service_script() {
local name="$1"
sanitize_service_name "$name" || return 1
curl -fsSL --max-time 10 -o /dev/null \
"https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${name}.sh" 2>/dev/null
}
function detect_service() {
pushd $(mktemp -d) >/dev/null
pct pull "$1" /usr/bin/update update 2>/dev/null
service=$(cat update | sed 's|.*/ct/||g' | sed 's|\.sh).*||g')
popd >/dev/null
local container="$1"
local tmpdir update_file
service=""
tmpdir=$(mktemp -d)
update_file="$tmpdir/update"
pct pull "$container" /usr/bin/update "$update_file" 2>/dev/null || true
if [[ ! -s "$update_file" ]]; then
rm -rf "$tmpdir"
return 1
fi
service=$(grep -oE '/ct/[a-zA-Z0-9._-]+\.sh' "$update_file" 2>/dev/null | head -n1 | sed 's|.*/ct/||; s|\.sh$||')
rm -rf "$tmpdir"
}
function dry_run_container() {
@@ -447,24 +471,33 @@ for container in $CHOICE; do
#1) Detect service using the service name in the update command
detect_service $container
#1.1) If update script not detected, return
if [ -z "${service}" ]; then
echo -e "${YW}[WARN]${CL} Update script not found. Skipping to next container"
log_result "$container" "(unknown)" "SKIPPED" "No update script found in container"
log_write "Container $container: SKIPPED — no update script found"
#1.1) If update script not detected or service name is invalid, skip
if [ -z "${service}" ] || ! sanitize_service_name "${service}"; then
echo -e "${RD}[ERROR]${CL} Could not detect a valid service name for container $container"
log_result "$container" "(unknown)" "ERROR" "Invalid or missing service name in /usr/bin/update"
log_write "Container $container: ERROR — invalid or missing service name"
continue
else
echo -e "${BL}[INFO]${CL} Detected service: ${GN}${service}${CL}"
log_write "Container $container: detected service '$service'"
fi
if ! validate_service_script "${service}"; then
echo -e "${RD}[ERROR]${CL} Service '${service}' does not resolve to ct/${service}.sh"
log_result "$container" "${service}" "ERROR" "No matching ct/${service}.sh script found"
log_write "Container $container: ERROR — ct/${service}.sh not found"
continue
fi
echo -e "${BL}[INFO]${CL} Detected service: ${GN}${service}${CL}"
log_write "Container $container: detected service '${service}'"
#2) Extract service build/update resource requirements from config/installation file
script=$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${service}.sh)
script=$(curl -fsSL "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${service}.sh")
#2.1) Check if the script downloaded successfully
if [ $? -ne 0 ]; then
echo -e "${RD}[ERROR]${CL} Issue while downloading install script."
echo -e "${YW}[WARN]${CL} Unable to assess build resource requirements. Proceeding with current resources."
if [ $? -ne 0 ] || [ -z "${script}" ]; then
echo -e "${RD}[ERROR]${CL} Failed to download ct/${service}.sh"
log_result "$container" "${service}" "ERROR" "Failed to download ct/${service}.sh"
log_write "Container $container (${service}): ERROR — failed to download install script"
continue
fi
config=$(pct config "$container")