mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-26 02:14:58 +02:00
Compare commits
16 Commits
2026-05-23
...
fix/tools-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f97cd03eba | ||
|
|
33a3c49350 | ||
|
|
37581c05ed | ||
|
|
62a6122fa6 | ||
|
|
45953e857a | ||
|
|
d984a5828d | ||
|
|
8492ca5805 | ||
|
|
9ec0864d32 | ||
|
|
6a9081726f | ||
|
|
514fece0df | ||
|
|
9c1f80e3c9 | ||
|
|
4dc5dfb366 | ||
|
|
4b2cacf78f | ||
|
|
e5c66aa4d2 | ||
|
|
b00ae8c350 | ||
|
|
7cfa47d138 |
31
CHANGELOG.md
31
CHANGELOG.md
@@ -467,8 +467,39 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-05-25
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- karakeep: fix: pip config [@CrazyWolf13](https://github.com/CrazyWolf13) ([#14703](https://github.com/community-scripts/ProxmoxVE/pull/14703))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- tools.func: replace raw GitHub API curl calls with get_latest_github_release [@MickLesk](https://github.com/MickLesk) ([#14690](https://github.com/community-scripts/ProxmoxVE/pull/14690))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Kernel-Clean: detect meta-packages and fix silent removal failures [@MickLesk](https://github.com/MickLesk) ([#14674](https://github.com/community-scripts/ProxmoxVE/pull/14674))
|
||||
|
||||
## 2026-05-24
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- RomM: add installation steps for Nginx mod_zip module [@MickLesk](https://github.com/MickLesk) ([#14678](https://github.com/community-scripts/ProxmoxVE/pull/14678))
|
||||
- ISponsorblockTV: detect CPU capabilities to select compatible binary [@MickLesk](https://github.com/MickLesk) ([#14677](https://github.com/community-scripts/ProxmoxVE/pull/14677))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: MQTT [@tremor021](https://github.com/tremor021) ([#14673](https://github.com/community-scripts/ProxmoxVE/pull/14673))
|
||||
|
||||
## 2026-05-23
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
@@ -36,7 +36,11 @@ function update_script() {
|
||||
systemctl stop isponsorblocktv
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-x86_64-linux"
|
||||
ISBTV_BINARY="iSponsorBlockTV-x86_64-linux-v1"
|
||||
if grep -q ' avx ' /proc/cpuinfo 2>/dev/null && grep -q ' avx2 ' /proc/cpuinfo 2>/dev/null && grep -q ' movbe ' /proc/cpuinfo 2>/dev/null; then
|
||||
ISBTV_BINARY="iSponsorBlockTV-x86_64-linux"
|
||||
fi
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "${ISBTV_BINARY}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start isponsorblocktv
|
||||
|
||||
@@ -46,6 +46,14 @@ function update_script() {
|
||||
fi
|
||||
msg_ok "Update prepared"
|
||||
|
||||
if [ ! -f ~/.config/pip/pip.conf ]; then
|
||||
mkdir -p ~/.config/pip
|
||||
cat <<EOF >~/.config/pip/pip.conf
|
||||
[global]
|
||||
break-system-packages = true
|
||||
EOF
|
||||
fi
|
||||
|
||||
if grep -q "start:prod" /etc/systemd/system/karakeep-workers.service; then
|
||||
sed -i 's|^ExecStart=.*$|ExecStart=/usr/bin/node dist/index.mjs|' /etc/systemd/system/karakeep-workers.service
|
||||
systemctl daemon-reload
|
||||
|
||||
32
ct/mqtt.sh
32
ct/mqtt.sh
@@ -21,18 +21,28 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /etc/mosquitto/conf.d/default.conf ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating ${APP} LXC"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated successfully!"
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /etc/mosquitto/conf.d/default.conf ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ ! -f /etc/apt/sources.list.d/mqtt.sources ]]; then
|
||||
setup_deb822_repo \
|
||||
"mqtt" \
|
||||
"https://repo.mosquitto.org/debian/mosquitto-repo.gpg" \
|
||||
"https://repo.mosquitto.org/debian" \
|
||||
"trixie"
|
||||
fi
|
||||
|
||||
msg_info "Updating MQTT"
|
||||
$STD apt update
|
||||
$STD apt upgrade -y
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
||||
@@ -13,12 +13,12 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
if ! grep -q ' avx ' /proc/cpuinfo 2>/dev/null; then
|
||||
msg_error "CPU does not support AVX instructions (required by iSponsorBlockTV/PyApp)"
|
||||
exit 106
|
||||
ISBTV_BINARY="iSponsorBlockTV-x86_64-linux-v1"
|
||||
if grep -q ' avx ' /proc/cpuinfo 2>/dev/null && grep -q ' avx2 ' /proc/cpuinfo 2>/dev/null && grep -q ' movbe ' /proc/cpuinfo 2>/dev/null; then
|
||||
ISBTV_BINARY="iSponsorBlockTV-x86_64-linux"
|
||||
fi
|
||||
|
||||
fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-x86_64-linux"
|
||||
fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "${ISBTV_BINARY}"
|
||||
|
||||
msg_info "Setting up iSponsorBlockTV"
|
||||
install -d /var/lib/isponsorblocktv
|
||||
|
||||
@@ -36,6 +36,11 @@ NODE_VERSION="24" NODE_MODULE="pnpm@${MODULE_VERSION}" setup_nodejs
|
||||
|
||||
msg_info "Installing external JavaScript Extension for yt-dlp"
|
||||
$STD pip install -U yt-dlp-ejs
|
||||
mkdir -p ~/.config/pip
|
||||
cat <<EOF >~/.config/pip/pip.conf
|
||||
[global]
|
||||
break-system-packages = true
|
||||
EOF
|
||||
msg_ok "Installed external JavaScript Extension for yt-dlp"
|
||||
|
||||
msg_info "Installing karakeep"
|
||||
|
||||
@@ -13,18 +13,26 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Mosquitto MQTT Broker"
|
||||
source /etc/os-release
|
||||
$STD apt update
|
||||
$STD apt -y install mosquitto mosquitto-clients
|
||||
setup_deb822_repo \
|
||||
"mqtt" \
|
||||
"https://repo.mosquitto.org/debian/mosquitto-repo.gpg" \
|
||||
"https://repo.mosquitto.org/debian" \
|
||||
"trixie"
|
||||
|
||||
msg_info "Installing Mosquitto MQTT Broker"
|
||||
$STD apt install -y \
|
||||
mosquitto \
|
||||
mosquitto-clients
|
||||
msg_ok "Installed Mosquitto MQTT Broker"
|
||||
|
||||
msg_info "Configuring Mosquitto MQTT Broker"
|
||||
cat <<EOF >/etc/mosquitto/conf.d/default.conf
|
||||
allow_anonymous false
|
||||
persistence true
|
||||
password_file /etc/mosquitto/passwd
|
||||
listener 1883
|
||||
EOF
|
||||
msg_ok "Installed Mosquitto MQTT Broker"
|
||||
msg_ok "Configured Mosquitto MQTT Broker"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
@@ -41,6 +41,16 @@ $STD apt install -y \
|
||||
nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Nginx mod_zip module"
|
||||
setup_deb822_repo \
|
||||
"getpagespeed-extras" \
|
||||
"https://extras.getpagespeed.com/deb-archive-keyring.gpg" \
|
||||
"https://extras.getpagespeed.com/debian" \
|
||||
"$(get_os_info codename)" \
|
||||
"main"
|
||||
$STD apt-get install -y nginx nginx-module-zip
|
||||
msg_ok "Installed Nginx mod_zip module"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
setup_mariadb
|
||||
|
||||
@@ -358,6 +358,55 @@ error_handler() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# ── Log-pattern analysis: detect common failure causes and emit actionable hints ──
|
||||
if [[ -n "$active_log" && -s "$active_log" ]]; then
|
||||
local _log_tail
|
||||
_log_tail=$(tail -n 60 "$active_log" 2>/dev/null || true)
|
||||
|
||||
# 1. APT/dpkg dependency conflict
|
||||
if echo "$_log_tail" | grep -qE "Depends:|depends on.*but.*not installed|broken packages|unmet dep|dependency problems"; then
|
||||
# Check for PostgreSQL-specific version mismatch (most actionable)
|
||||
local _pg_conflict
|
||||
_pg_conflict=$(echo "$_log_tail" | grep -oE 'postgresql-[0-9]+ but.*installed' | head -1 || true)
|
||||
if [[ -n "$_pg_conflict" ]]; then
|
||||
if declare -f msg_warn >/dev/null 2>&1; then
|
||||
msg_warn "PostgreSQL version conflict: ${_pg_conflict}"
|
||||
msg_warn "Hint: A package requires a specific PostgreSQL version that is not installed. Your distribution may have installed a different PG version than expected."
|
||||
fi
|
||||
else
|
||||
if declare -f msg_warn >/dev/null 2>&1; then
|
||||
msg_warn "APT dependency conflict detected. A required package is not available or is the wrong version for this system."
|
||||
msg_warn "Hint: Run 'apt-get install -f' inside the container or check that all required repositories are configured for your distribution."
|
||||
fi
|
||||
fi
|
||||
# 2. APT/GPG signature verification failure
|
||||
elif echo "$_log_tail" | grep -qE "sqv|KEYEXPIRED|NO_PUBKEY|key is not certified|signature verification failed|is not signed|Sub-process.*sqv"; then
|
||||
if declare -f msg_warn >/dev/null 2>&1; then
|
||||
msg_warn "APT repository signature error detected."
|
||||
msg_warn "Hint: A repository GPG key may be missing, expired, or the keyring file is not yet present (/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc etc.)."
|
||||
msg_warn "Hint: Install the 'postgresql-common' package first, or re-add the repository with its correct signing key."
|
||||
fi
|
||||
# 3. Network / DNS failure during apt-get or curl
|
||||
elif echo "$_log_tail" | grep -qE "Could not resolve|Failed to fetch|Unable to connect|Name or service not known|Network is unreachable|curl.*resolve"; then
|
||||
if declare -f msg_warn >/dev/null 2>&1; then
|
||||
msg_warn "Network or DNS failure detected."
|
||||
msg_warn "Hint: Check the container's network connectivity, DNS settings, and whether any firewall or ad-blocker is intercepting traffic."
|
||||
fi
|
||||
# 4. APT lock held by another process
|
||||
elif echo "$_log_tail" | grep -qE "Could not get lock|dpkg frontend lock|waiting for it to exit|E: Unable to lock"; then
|
||||
if declare -f msg_warn >/dev/null 2>&1; then
|
||||
msg_warn "APT or dpkg lock conflict detected."
|
||||
msg_warn "Hint: Another package manager process may be running. Try 'rm /var/lib/dpkg/lock-frontend && dpkg --configure -a' inside the container."
|
||||
fi
|
||||
# 5. Disk space exhaustion
|
||||
elif echo "$_log_tail" | grep -qE "No space left on device|disk quota exceeded|ENOSPC"; then
|
||||
if declare -f msg_warn >/dev/null 2>&1; then
|
||||
msg_warn "Disk space exhausted during installation."
|
||||
msg_warn "Hint: Increase the container's disk size (pct resize <ctid> rootfs +2G) or clean up space first."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Detect context: Container (INSTALL_LOG set + inside container /root) vs Host
|
||||
if [[ -n "${INSTALL_LOG:-}" && -f "${INSTALL_LOG:-}" && -d /root ]]; then
|
||||
# CONTAINER CONTEXT: Copy log and create flag file for host
|
||||
|
||||
1671
misc/tools.func
1671
misc/tools.func
File diff suppressed because it is too large
Load Diff
@@ -28,7 +28,14 @@ declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "kernel-clean"
|
||||
|
||||
# Detect current kernel
|
||||
current_kernel=$(uname -r)
|
||||
available_kernels=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print $2}' | grep -v "$current_kernel" | sort -V)
|
||||
# Only list fully-installed (ii) versioned kernel packages; the pattern
|
||||
# proxmox-kernel-X.Y.Z matches versioned kernels while excluding the
|
||||
# two-segment meta-packages (proxmox-kernel-X.Y) and proxmox-kernel-helper.
|
||||
available_kernels=$(dpkg --list |
|
||||
awk '/^ii/ {print $2}' |
|
||||
grep -E '^proxmox-kernel-[0-9]+\.[0-9]+\.[0-9]' |
|
||||
grep -v "$current_kernel" |
|
||||
sort -V)
|
||||
|
||||
header_info
|
||||
|
||||
@@ -82,10 +89,28 @@ fi
|
||||
# Remove kernels
|
||||
for kernel in "${kernels_to_remove[@]}"; do
|
||||
echo -e "${YW}Removing $kernel...${CL}"
|
||||
if apt-get purge -y "$kernel" >/dev/null 2>&1; then
|
||||
echo -e "${GN}Successfully removed: $kernel${CL}"
|
||||
# Derive the major.minor meta-package name (e.g. proxmox-kernel-6.14)
|
||||
# from a versioned name like proxmox-kernel-6.14.11-9-pve-signed.
|
||||
minor_version=$(echo "$kernel" | sed -E 's/^proxmox-kernel-([0-9]+\.[0-9]+)\..*/\1/')
|
||||
meta="proxmox-kernel-${minor_version}"
|
||||
pkgs_to_remove=("$kernel")
|
||||
# Include the meta-package in the purge when it is installed and when
|
||||
# no other versioned kernel of the same minor version will remain
|
||||
# (the running kernel keeps it alive if it shares the same minor).
|
||||
if dpkg -l "$meta" 2>/dev/null | grep -q '^ii'; then
|
||||
remaining=$(dpkg --list |
|
||||
awk '/^ii/ {print $2}' |
|
||||
grep -E "^proxmox-kernel-${minor_version}\." |
|
||||
grep -v "^${kernel}$" |
|
||||
wc -l)
|
||||
if [ "$remaining" -eq 0 ]; then
|
||||
pkgs_to_remove+=("$meta")
|
||||
fi
|
||||
fi
|
||||
if apt-get purge -y "${pkgs_to_remove[@]}" >/dev/null 2>&1; then
|
||||
echo -e "${GN}Successfully removed: ${pkgs_to_remove[*]}${CL}"
|
||||
else
|
||||
echo -e "${RD}Failed to remove: $kernel. Check dependencies.${CL}"
|
||||
echo -e "${RD}Failed to remove: ${pkgs_to_remove[*]}. Check dependencies.${CL}"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user