Compare commits

..

9 Commits

Author SHA1 Message Date
MickLesk 68571bde78 Fix clean-lxcs exclude matching and set -e cancel handling
- Replace the array-style exclude check (`${excluded_containers[@]}` on a
  plain string) with an explicit per-VMID loop, resolving the ShellCheck
  SC2199/SC2076 errors and avoiding accidental substring matches.
- Abort cleanly when the checklist dialog is cancelled instead of relying
  on an unreachable `$?` test under `set -eEuo pipefail`.
- Exit gracefully on a declined confirmation prompt.
- Use `pct exec ... -- hostname` for consistent argument handling.
2026-06-26 21:25:19 +02:00
community-scripts-pr-app[bot] dc26b8358e Update CHANGELOG.md (#15405)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-26 12:58:13 +00:00
Sam Heinz 01a6c1ddec fix databasus update/install errors (#15403) 2026-06-26 14:57:46 +02:00
community-scripts-pr-app[bot] 3e544b750d Update CHANGELOG.md (#15404)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-26 12:06:53 +00:00
Jamie 681924cb1a fix(build.func): set /dev/kfd GID in fix_gpu_gids for AMD ROCm (#15401)
Update LXC config and privileged-container permissions for /dev/kfd
to use the render group, matching renderD* handling and tools.func.
2026-06-26 22:06:27 +10:00
community-scripts-pr-app[bot] 6ea04b7602 Update CHANGELOG.md (#15400)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-26 05:48:13 +00:00
Sam Heinz b2d20799d8 fix alpine mktmp error (#15398) 2026-06-26 07:47:48 +02:00
community-scripts-pr-app[bot] 324fa33d8c Update CHANGELOG.md (#15399)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-26 05:25:59 +00:00
Brad Baker 5aed3bdde5 Update Nginx configuration file paths (#15397)
fix(termix): remove legacy /app/nginx pid directive in nginx.conf update
2026-06-26 07:25:38 +02:00
7 changed files with 49 additions and 20 deletions
+17
View File
@@ -486,6 +486,23 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-06-26
### 🚀 Updated Scripts
- Termix: Update Nginx configuration file paths [@xyzulu](https://github.com/xyzulu) ([#15397](https://github.com/community-scripts/ProxmoxVE/pull/15397))
- #### 🐞 Bug Fixes
- fix databasus update/install errors [@asylumexp](https://github.com/asylumexp) ([#15403](https://github.com/community-scripts/ProxmoxVE/pull/15403))
### 💾 Core
- #### 🐞 Bug Fixes
- fix(build.func): set /dev/kfd GID in fix_gpu_gids for AMD ROCm [@jamiej](https://github.com/jamiej) ([#15401](https://github.com/community-scripts/ProxmoxVE/pull/15401))
- fix alpine mktmp error [@asylumexp](https://github.com/asylumexp) ([#15398](https://github.com/community-scripts/ProxmoxVE/pull/15398))
## 2026-06-25
### 🆕 New Scripts
+3 -3
View File
@@ -52,11 +52,11 @@ function update_script() {
[[ "$MONGO_ARCH" == "arm64" ]] && MONGO_DIST="ubuntu2204"
fetch_and_deploy_from_url "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-${MONGO_DIST}-${MONGO_ARCH}-100.16.1.deb"
fi
ensure_dependencies mariadb-client
mkdir -p /usr/local/mariadb-{10.6,12.1}/bin /usr/local/mysql-{5.7,8.0,8.4,9}/bin /usr/local/mongodb-database-tools/bin
[[ -f /usr/bin/mongodump ]] && ln -sf /usr/bin/mongodump /usr/local/mongodb-database-tools/bin/mongodump
[[ -f /usr/bin/mongorestore ]] && ln -sf /usr/bin/mongorestore /usr/local/mongodb-database-tools/bin/mongorestore
# Create MariaDB and MySQL client symlinks for compatibility
ensure_dependencies mariadb-client
mkdir -p /usr/local/mariadb-{10.6,12.1}/bin /usr/local/mysql-{5.7,8.0,8.4,9}/bin /usr/local/mongodb-database-tools/bin
for dir in /usr/local/mariadb-{10.6,12.1}/bin; do
ln -sf /usr/bin/mariadb-dump "$dir/mariadb-dump"
ln -sf /usr/bin/mariadb "$dir/mariadb"
@@ -79,7 +79,7 @@ function update_script() {
cd /opt/databasus/backend
$STD go mod download
$STD /root/go/bin/swag init -g cmd/main.go -o swagger
$STD env CGO_ENABLED=0 GOOS=linux GOARCH=$(arch_resolve) go build -o databasus ./cmd/main.go
$STD env CGO_ENABLED=0 GOOS=linux GOARCH=$(arch_resolve) go build -o databasus ./cmd
mv /opt/databasus/backend/databasus /opt/databasus/databasus
mkdir -p /opt/databasus/ui/build
cp -r /opt/databasus/frontend/dist/* /opt/databasus/ui/build/
+1 -1
View File
@@ -200,7 +200,7 @@ EOF
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
curl -fsSL "https://raw.githubusercontent.com/Termix-SSH/Termix/main/docker/nginx.conf" -o /etc/nginx/nginx.conf
sed -i '/^master_process/d' /etc/nginx/nginx.conf
sed -i 's|pid /tmp/nginx/nginx.pid;|pid /run/nginx.pid;|' /etc/nginx/nginx.conf
sed -i '/^pid \/app\/nginx/d' /etc/nginx/nginx.conf
sed -i 's|error_log /tmp/nginx/error.log|error_log /var/log/nginx/error.log|' /etc/nginx/nginx.conf
sed -i 's|access_log /tmp/nginx/access.log|access_log /var/log/nginx/access.log|' /etc/nginx/nginx.conf
sed -i 's|/app/html|/opt/termix/html|g' /etc/nginx/nginx.conf
+2 -2
View File
@@ -33,7 +33,7 @@ done
# Install MongoDB Database Tools via direct .deb (no APT repo for Debian 13)
[[ "$(get_os_info id)" == "ubuntu" ]] && MONGO_DIST="ubuntu2204" || MONGO_DIST="debian12"
# MongoDB only publishes arm64 builds for Ubuntu
[[ "$MONGO_ARCH" == "arm64" ]] && MONGO_DIST="ubuntu2204"
[[ "$(arch_resolve "x86_64" "arm64")" == "arm64" ]] && MONGO_DIST="ubuntu2204"
MONGO_VERSION=$(get_latest_gh_tag "mongodb/mongo-tools" "100." || echo "100.16.1")
fetch_and_deploy_from_url "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-${MONGO_DIST}-$(arch_resolve "x86_64" "arm64")-${MONGO_VERSION}.deb" ""
mkdir -p /usr/local/mongodb-database-tools/bin
@@ -65,7 +65,7 @@ $STD go mod tidy
$STD go mod download
$STD go install github.com/swaggo/swag/cmd/swag@latest
$STD /root/go/bin/swag init -g cmd/main.go -o swagger
$STD env CGO_ENABLED=0 GOOS=linux GOARCH=$(arch_resolve) go build -o databasus ./cmd/main.go
$STD env CGO_ENABLED=0 GOOS=linux GOARCH=$(arch_resolve) go build -o databasus ./cmd
mv /opt/databasus/backend/databasus /opt/databasus/databasus
mkdir -p /databasus-data/{pgdata,temp,backups,data,logs}
mkdir -p /opt/databasus/ui/build
+5
View File
@@ -5430,6 +5430,7 @@ fix_gpu_gids() {
# Update dev entries with correct GIDs
sed -i.bak -E "s|(dev[0-9]+: /dev/dri/renderD[0-9]+),gid=[0-9]+|\1,gid=${render_gid}|g" "$LXC_CONFIG"
sed -i -E "s|(dev[0-9]+: /dev/dri/card[0-9]+),gid=[0-9]+|\1,gid=${video_gid}|g" "$LXC_CONFIG"
sed -i -E "s|(dev[0-9]+: /dev/kfd),gid=[0-9]+|\1,gid=${render_gid}|g" "$LXC_CONFIG"
# Restart container
pct start "$CTID" >/dev/null 2>&1
@@ -5451,6 +5452,10 @@ fix_gpu_gids() {
fi
done
fi
if [ -e /dev/kfd ]; then
chgrp ${render_gid} /dev/kfd 2>/dev/null || true
chmod 660 /dev/kfd 2>/dev/null || true
fi
" >/dev/null 2>&1
fi
}
+6 -6
View File
@@ -2607,7 +2607,7 @@ check_for_gh_release() {
ensure_dependencies jq
local gh_check_json
gh_check_json=$(mktemp /tmp/tools-gh-check-XXXXXX.json) || return 7
gh_check_json=$(mktemp /tmp/tools-gh-check-XXXXXX) || return 73
trap 'rm -f "$gh_check_json"' RETURN
# Build auth header if token is available
@@ -3257,7 +3257,7 @@ fetch_and_deploy_codeberg_release() {
fi
local codeberg_rel_json
codeberg_rel_json=$(mktemp /tmp/tools-codeberg-rel-XXXXXX.json) || return 7
codeberg_rel_json=$(mktemp /tmp/tools-codeberg-rel-XXXXXX) || return 73
trap 'rm -f "$codeberg_rel_json"' RETURN
local attempt=0 success=false resp http_code
@@ -3744,7 +3744,7 @@ fetch_and_deploy_gh_release() {
rm -f "$TOOLS_GH_REL_JSON"
fi
local gh_rel_json
gh_rel_json=$(mktemp /tmp/tools-gh-rel-XXXXXX.json) || return 7
gh_rel_json=$(mktemp /tmp/tools-gh-rel-XXXXXX) || return 73
TOOLS_GH_REL_JSON="$gh_rel_json"
local api_url="https://api.github.com/repos/$repo/releases"
@@ -9172,7 +9172,7 @@ check_for_gl_release() {
ensure_dependencies jq
local gl_check_json
gl_check_json=$(mktemp /tmp/tools-gl-check-XXXXXX.json) || return 7
gl_check_json=$(mktemp /tmp/tools-gl-check-XXXXXX) || return 73
trap 'rm -f "$gl_check_json"' RETURN
local repo_encoded
@@ -9452,7 +9452,7 @@ fetch_and_deploy_gl_release() {
ensure_dependencies jq
local gl_rel_json
gl_rel_json=$(mktemp /tmp/tools-gl-rel-XXXXXX.json) || return 7
gl_rel_json=$(mktemp /tmp/tools-gl-rel-XXXXXX) || return 73
trap 'rm -f "$gl_rel_json"' RETURN
local repo_encoded
@@ -9902,7 +9902,7 @@ setup_nltk() {
fi
mkdir -p "${target_dir}/${subdir}"
tmp_zip=$(mktemp --suffix=.zip)
tmp_zip=$(mktemp)
if CURL_TIMEOUT=120 curl_with_retry "$pkg_url" "$tmp_zip"; then
if [[ "$do_unzip" == "1" ]]; then
+15 -8
View File
@@ -30,7 +30,7 @@ declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "clean-lxcs" "
header_info
echo "Loading..."
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This will clean logs, cache and update package lists on selected LXC Containers. Proceed?" 10 58
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This will clean logs, cache and update package lists on selected LXC Containers. Proceed?" 10 58 || exit 0
NODE=$(hostname)
EXCLUDE_MENU=()
@@ -42,17 +42,17 @@ while read -r TAG ITEM; do
EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF")
done < <(pct list | awk 'NR>1')
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from cleaning:\n" \
16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
if [ $? -ne 0 ]; then
exit
# Capture the selection; abort cleanly if the user cancels the dialog
# (set -e would otherwise terminate on the failing command substitution).
if ! excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from cleaning:\n" \
16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"'); then
exit 0
fi
function run_lxc_clean() {
local container=$1
header_info
name=$(pct exec "$container" hostname)
name=$(pct exec "$container" -- hostname)
pct exec "$container" -- bash -c '
BL="\033[36m"; GN="\033[1;92m"; CL="\033[m"
@@ -84,7 +84,14 @@ function run_lxc_clean() {
}
for container in $(pct list | awk '{if(NR>1) print $1}'); do
if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then
excluded=0
for ex in $excluded_containers; do
if [[ "$ex" == "$container" ]]; then
excluded=1
break
fi
done
if [[ "$excluded" -eq 1 ]]; then
header_info
echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}"
sleep 1