Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk 5773d74865 fix(ruby): refresh ruby-build when requested version is missing
Update ruby-build definitions before installing a new Ruby version so
upgrades like Dawarich 3.4.9 do not fail on stale rbenv definitions.
2026-06-22 21:39:19 +02:00
10 changed files with 59 additions and 124 deletions
-18
View File
@@ -496,9 +496,6 @@ 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))
@@ -508,31 +505,16 @@ 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
-2
View File
@@ -61,8 +61,6 @@ 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
+16 -20
View File
@@ -24,14 +24,13 @@ function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/esphome-device-builder.service && ! -f /etc/systemd/system/esphomeDashboard.service ]]; then
if [[ ! -f /etc/systemd/system/esphomeDashboard.service ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Stopping Service"
systemctl stop esphome-device-builder 2>/dev/null || true
systemctl stop esphomeDashboard 2>/dev/null || true
systemctl stop esphomeDashboard
msg_ok "Stopped Service"
VENV_PATH="/opt/esphome/.venv"
@@ -47,36 +46,33 @@ 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 esphome-device-builder esptool
$STD "$VENV_PATH/bin/python" -m pip install esphome tornado esptool
msg_ok "Migrated to uv/venv"
else
msg_info "Updating ESPHome Device Builder"
msg_info "Updating ESPHome"
PYTHON_VERSION="3.12" setup_uv
$STD "$VENV_PATH/bin/python" -m pip install --upgrade esphome esphome-device-builder esptool
msg_ok "Updated ESPHome Device Builder"
$STD "$VENV_PATH/bin/python" -m pip install --upgrade esphome tornado esptool
msg_ok "Updated ESPHome"
fi
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
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"
[Unit]
Description=ESPHome Device Builder
Description=ESPHome Dashboard
After=network.target
[Service]
ExecStart=${VENV_PATH}/bin/esphome-device-builder /root/config/
ExecStart=${VENV_PATH}/bin/esphome dashboard /root/config/
Restart=always
User=root
[Install]
WantedBy=multi-user.target
EOF
$STD systemctl daemon-reload
$STD systemctl enable esphome-device-builder
msg_ok "Migrated to ESPHome Device Builder service"
$STD systemctl daemon-reload
msg_ok "Updated systemd service"
fi
msg_info "Linking esphome to /usr/local/bin"
rm -f /usr/local/bin/esphome
@@ -84,7 +80,7 @@ EOF
msg_ok "Linked esphome binary"
msg_info "Starting Service"
systemctl start esphome-device-builder
systemctl start esphomeDashboard
msg_ok "Started Service"
msg_ok "Updated successfully!"
exit
+5 -4
View File
@@ -53,11 +53,12 @@ function update_script() {
cd /opt/invoiceshelf
$STD composer install --no-dev --optimize-autoloader
if command -v corepack >/dev/null 2>&1; then
$STD corepack pnpm install
$STD corepack pnpm run build
$STD corepack yarn install
$STD corepack yarn build
else
$STD pnpm install
$STD pnpm run build
$STD yarn install
$STD yarn build
fi
$STD php artisan migrate --force
$STD php artisan optimize:clear
-2
View File
@@ -81,8 +81,6 @@ 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 esphome-device-builder esptool
msg_ok "Setup and Installed ESPHome Device Builder"
$STD /opt/esphome/.venv/bin/python -m pip install esphome tornado esptool
msg_ok "Setup and Installed ESPHome"
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/esphome-device-builder.service
cat <<EOF >/etc/systemd/system/esphomeDashboard.service
[Unit]
Description=ESPHome Device Builder
Description=ESPHome Dashboard
After=network.target
[Service]
ExecStart=/opt/esphome/.venv/bin/esphome-device-builder /root/config/
ExecStart=/opt/esphome/.venv/bin/esphome dashboard /root/config/
Restart=always
User=root
@@ -50,7 +50,7 @@ User=root
WantedBy=multi-user.target
EOF
systemctl enable -q --now esphome-device-builder
systemctl enable -q --now esphomeDashboard
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
@@ -5722,11 +5722,6 @@ create_lxc_container() {
return 0
fi
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}"
echo " lxc-pve : installed=${_lxcp_i:-n/a} candidate=${_lxcp_c:-n/a}"
+15 -17
View File
@@ -8723,14 +8723,12 @@ setup_uv() {
ensure_dependencies jq
# 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
# 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
}
# Get currently installed version
local INSTALLED_VERSION=""
@@ -8738,9 +8736,9 @@ setup_uv() {
INSTALLED_VERSION=$("$UV_BIN" --version 2>/dev/null | awk '{print $2}')
fi
# Scenario 1: Already at target version
if [[ -n "$INSTALLED_VERSION" && "$INSTALLED_VERSION" == "$TARGET_VERSION" ]]; then
cache_installed_version "uv" "$TARGET_VERSION"
# Scenario 1: Already at latest version
if [[ -n "$INSTALLED_VERSION" && "$INSTALLED_VERSION" == "$LATEST_VERSION" ]]; then
cache_installed_version "uv" "$LATEST_VERSION"
# Check if uvx is needed and missing
if [[ "${USE_UVX:-NO}" == "YES" ]] && [[ ! -x "$UVX_BIN" ]]; then
@@ -8753,13 +8751,13 @@ setup_uv() {
fi
# Scenario 2: New install or upgrade
if [[ -n "$INSTALLED_VERSION" && "$INSTALLED_VERSION" != "$TARGET_VERSION" ]]; then
msg_info "Upgrade uv from $INSTALLED_VERSION to $TARGET_VERSION"
if [[ -n "$INSTALLED_VERSION" && "$INSTALLED_VERSION" != "$LATEST_VERSION" ]]; then
msg_info "Upgrade uv from $INSTALLED_VERSION to $LATEST_VERSION"
else
msg_info "Setup uv $TARGET_VERSION"
msg_info "Setup uv $LATEST_VERSION"
fi
local UV_URL="https://github.com/astral-sh/uv/releases/download/${TARGET_VERSION}/${UV_TAR}"
local UV_URL="https://github.com/astral-sh/uv/releases/download/${LATEST_VERSION}/${UV_TAR}"
if ! curl_with_retry "$UV_URL" "$TMP_DIR/uv.tar.gz"; then
msg_error "Failed to download uv from $UV_URL"
@@ -8814,8 +8812,8 @@ setup_uv() {
msg_ok "Python $PYTHON_VERSION installed"
fi
cache_installed_version "uv" "$TARGET_VERSION"
msg_ok "Setup uv $TARGET_VERSION"
cache_installed_version "uv" "$LATEST_VERSION"
msg_ok "Setup uv $LATEST_VERSION"
}
# Helper function to install uvx wrapper
+16 -49
View File
@@ -145,35 +145,11 @@ 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() {
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"
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
}
function dry_run_container() {
@@ -471,33 +447,24 @@ 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 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"
#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"
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 ] || [ -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
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."
fi
config=$(pct config "$container")