Compare commits

..

5 Commits

Author SHA1 Message Date
CanbiZ (MickLesk) 66de1b07b4 Merge branch 'main' into core_fix_osFallback 2026-07-27 10:55:17 +02:00
MickLesk 81717dee48 shorten comment 2026-07-27 10:47:13 +02:00
MickLesk 8f4e9ccb1c shorten some comments 2026-07-27 10:46:02 +02:00
MickLesk 61d739d191 Add resolve_os_version() and refactor template handling
- Add `resolve_os_version()` to validate `var_version` against the host's pveam catalog before the settings summary, picking the nearest available version with interactive or unattended fallback
- Extract `_list_os_versions()` and `_list_templates()` helpers to reduce duplication
- Remove the inline version-picker dialogs from `create_lxc_container()`; version mismatches are now handled upfront
- Change default Debian version from 12 to 13
- Fix implicit cancel on invalid/empty input in the LXC stack upgrade menu (return 2 instead of 4)
- Fix cancel option handling: only explicit option 3/4 cancels, unknown input is treated as ignore
- Honour return code 4 (cancel) from `offer_lxc_stack_upgrade_and_maybe_retry`
- Redirect error_handler log dump to stderr to prevent data corruption when the trap fires inside command substitutions
2026-07-27 10:45:17 +02:00
MickLesk c342181908 Fix pveam template version parsing
pveam available outputs "<section>\t<template>", so the template name is field 2, not field 1. Switch both version-listing pipelines from `awk -F'\t' '{print $1}'` to `awk '{print $2}'` and anchor the grep/sed patterns to the start of the template name.

Also add `|| true` to each pipeline to prevent a non-zero exit (no matches) from triggering the ERR trap under pipefail inside process substitutions, and fix a missing `-e` flag on an echo with escape sequences.
2026-07-27 10:16:38 +02:00
13 changed files with 6 additions and 290 deletions
+1 -13
View File
@@ -512,9 +512,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
### 🆕 New Scripts
- Unpackerr ([#16034](https://github.com/community-scripts/ProxmoxVE/pull/16034))
- CookCLI ([#16028](https://github.com/community-scripts/ProxmoxVE/pull/16028))
- Discourse ([#16024](https://github.com/community-scripts/ProxmoxVE/pull/16024))
- Discourse ([#16024](https://github.com/community-scripts/ProxmoxVE/pull/16024))
- Mastodon ([#16029](https://github.com/community-scripts/ProxmoxVE/pull/16029))
- Docspell ([#16033](https://github.com/community-scripts/ProxmoxVE/pull/16033))
- Poznote ([#16030](https://github.com/community-scripts/ProxmoxVE/pull/16030))
@@ -526,24 +524,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- Update MeiliSearch command for database upgrade [@Isnubi](https://github.com/Isnubi) ([#16081](https://github.com/community-scripts/ProxmoxVE/pull/16081))
- Mylar3 & Medusa: use trixie non-free for unrar, not bookworm [@angusmaul](https://github.com/angusmaul) ([#16072](https://github.com/community-scripts/ProxmoxVE/pull/16072))
- Vikunja: pin install/update to v2.3.0 due upstream issues [@MickLesk](https://github.com/MickLesk) ([#16059](https://github.com/community-scripts/ProxmoxVE/pull/16059))
- #### ✨ New Features
- OpenThread-BR: Add runtime configuration options [@tomfrenzel](https://github.com/tomfrenzel) ([#16038](https://github.com/community-scripts/ProxmoxVE/pull/16038))
### 💾 Core
- #### 🐞 Bug Fixes
- core: Handle LXC upgrade prompt cancellation [@MickLesk](https://github.com/MickLesk) ([#16058](https://github.com/community-scripts/ProxmoxVE/pull/16058))
- #### ✨ New Features
- core: fix OS version fallback when the host catalog lacks the requested version & harden template validation [@MickLesk](https://github.com/MickLesk) ([#16068](https://github.com/community-scripts/ProxmoxVE/pull/16068))
## 2026-07-26
### 🆕 New Scripts
-60
View File
@@ -1,60 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/cooklang/cookcli
APP="CookCLI"
var_tags="${var_tags:-recipes;cooking;food}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
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/cookcli/cook ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "cook" "cooklang/cookcli"; then
msg_info "Stopping Service"
systemctl stop cookcli
msg_ok "Stopped Service"
create_backup /opt/cookcli/recipes
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cook" "cooklang/cookcli" "prebuild" "latest" "/opt/cookcli" "cook-$(arch_resolve "x86_64-unknown-linux-gnu" "aarch64-unknown-linux-musl").tar.gz"
chmod +x /opt/cookcli/cook
restore_backup
msg_info "Starting Service"
systemctl start cookcli
msg_ok "Started Service"
msg_ok "Updated successfully!"
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 "${GATEWAY}${BGN}http://${IP}:9080${CL}"
-6
View File
@@ -1,6 +0,0 @@
______ __ ________ ____
/ ____/___ ____ / /__/ ____/ / / _/
/ / / __ \/ __ \/ //_/ / / / / /
/ /___/ /_/ / /_/ / ,< / /___/ /____/ /
\____/\____/\____/_/|_|\____/_____/___/
-6
View File
@@ -1,6 +0,0 @@
__ __ __
/ / / /___ ____ ____ ______/ /_____ __________
/ / / / __ \/ __ \/ __ `/ ___/ //_/ _ \/ ___/ ___/
/ /_/ / / / / /_/ / /_/ / /__/ ,< / __/ / / /
\____/_/ /_/ .___/\__,_/\___/_/|_|\___/_/ /_/
/_/
-27
View File
@@ -70,9 +70,7 @@ function update_script() {
-DOTBR_BACKBONE_ROUTER=ON \
-DOTBR_SYSTEMD_UNIT_DIR=/etc/systemd/system \
-DOT_FIREWALL=ON \
-DOTBR_NAT64=ON \
-DOT_POSIX_NAT64_CIDR="192.168.255.0/24" \
-DOTBR_DNS_UPSTREAM_QUERY=ON \
..
$STD ninja
$STD ninja install
@@ -103,31 +101,6 @@ EOF
mv /etc/default/otbr-agent.bak /etc/default/otbr-agent
msg_ok "Restored Configuration"
if [[ ! -f /etc/systemd/system/otbr-agent.service.d/10-otbr-post-start.conf ]]; then
msg_info "Configuring OpenThread Border Router post-start service"
cat <<'EOF' >/usr/local/bin/otbr-post-start.sh
#!/bin/sh
# OpenThread Border Router post-start script
# Run custom commands for runtime configuration options
# Wait for the otbr-agent service to be initialized
#sleep 3
# Configure routing and translation features
#ot-ctl nat64 enable
#ot-ctl dns server upstream enable
EOF
chmod +x /usr/local/bin/otbr-post-start.sh
mkdir -p /etc/systemd/system/otbr-agent.service.d
cat <<'EOF' >/etc/systemd/system/otbr-agent.service.d/10-otbr-post-start.conf
[Service]
ExecStartPost=/usr/local/bin/otbr-post-start.sh
EOF
systemctl daemon-reload
msg_ok "Configured OpenThread Border Router post-start service"
fi
msg_info "Starting Services"
systemctl start otbr-agent
systemctl start otbr-web
-59
View File
@@ -1,59 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://unpackerr.zip/
APP="Unpackerr"
var_tags="${var_tags:-downloads;arr;automation;extraction}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-2}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
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/unpackerr/unpackerr.conf ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "unpackerr" "Unpackerr/unpackerr"; then
msg_info "Stopping Service"
systemctl stop unpackerr
msg_ok "Stopped Service"
create_backup /etc/unpackerr/unpackerr.conf
DPKG_FORCE_CONFOLD=1 fetch_and_deploy_gh_release "unpackerr" "Unpackerr/unpackerr" "binary" "latest" "/opt/unpackerr" "unpackerr_*_$(arch_resolve).deb"
restore_backup
msg_info "Starting Service"
systemctl start unpackerr
msg_ok "Started Service"
msg_ok "Updated successfully!"
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}Configure integrations in:${CL}"
echo -e "${GATEWAY}${BGN}/etc/unpackerr/unpackerr.conf${CL}"
-47
View File
@@ -1,47 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/cooklang/cookcli
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
fetch_and_deploy_gh_release "cook" "cooklang/cookcli" "prebuild" "latest" "/opt/cookcli" "cook-$(arch_resolve "x86_64-unknown-linux-gnu" "aarch64-unknown-linux-musl").tar.gz"
msg_info "Configuring CookCLI"
chmod +x /opt/cookcli/cook
mkdir -p /opt/cookcli/recipes
cd /opt/cookcli/recipes
$STD /opt/cookcli/cook seed
msg_ok "Configured CookCLI"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/cookcli.service
[Unit]
Description=CookCLI Recipe Server
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/cookcli/recipes
ExecStart=/opt/cookcli/cook server --host 0.0.0.0 --port 9080
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now cookcli
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc
+1 -1
View File
@@ -20,7 +20,7 @@ $STD apt install -y \
mediainfo
cat <<EOF >/etc/apt/sources.list.d/non-free.list
deb https://deb.debian.org/debian trixie main contrib non-free non-free-firmware
deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
EOF
$STD apt update
$STD apt install -y unrar
+1 -2
View File
@@ -17,9 +17,8 @@ msg_info "Installing Dependencies"
cat <<EOF >/etc/apt/sources.list.d/non-free.sources
Types: deb
URIs: http://deb.debian.org/debian
Suites: trixie
Suites: bookworm
Components: non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
EOF
$STD apt update
$STD apt install -y unrar
-21
View File
@@ -66,9 +66,7 @@ $STD cmake -GNinja \
-DOTBR_BACKBONE_ROUTER=ON \
-DOTBR_SYSTEMD_UNIT_DIR=/etc/systemd/system \
-DOT_FIREWALL=ON \
-DOTBR_NAT64=ON \
-DOT_POSIX_NAT64_CIDR="192.168.255.0/24" \
-DOTBR_DNS_UPSTREAM_QUERY=ON \
..
$STD ninja
$STD ninja install
@@ -105,25 +103,6 @@ EOF
cat <<'EOF' >/etc/default/otbr-web
OTBR_WEB_OPTS="-I wpan0 -a 0.0.0.0 -p 80"
EOF
cat <<'EOF' >/usr/local/bin/otbr-post-start.sh
#!/bin/sh
# OpenThread Border Router post-start script
# Run custom commands for runtime configuration options
# Wait for the otbr-agent service to be initialized
#sleep 3
# Configure routing and translation features
#ot-ctl nat64 enable
#ot-ctl dns server upstream enable
EOF
chmod +x /usr/local/bin/otbr-post-start.sh
mkdir -p /etc/systemd/system/otbr-agent.service.d
cat <<'EOF' >/etc/systemd/system/otbr-agent.service.d/10-otbr-post-start.conf
[Service]
ExecStartPost=/usr/local/bin/otbr-post-start.sh
EOF
systemctl enable -q dbus rsyslog otbr-agent otbr-web
systemctl enable -q bind9 2>/dev/null || systemctl enable -q named 2>/dev/null || true
systemctl start -q dbus rsyslog bind9
-45
View File
@@ -1,45 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://unpackerr.zip/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
fetch_and_deploy_gh_release "unpackerr" "Unpackerr/unpackerr" "binary" "latest" "/opt/unpackerr" "unpackerr_*_$(arch_resolve).deb"
msg_info "Configuring Unpackerr"
mkdir -p /etc/unpackerr
cat <<EOF >/etc/unpackerr/unpackerr.conf
debug = false
quiet = false
activity = false
interval = "2m"
parallel = 1
file_mode = "0644"
dir_mode = "0755"
[webserver]
metrics = false
listen_addr = "0.0.0.0:5656"
[folders]
interval = "0s"
EOF
chmod 640 /etc/unpackerr/unpackerr.conf
msg_ok "Configured Unpackerr"
msg_info "Creating Service"
systemctl enable -q --now unpackerr
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc
+1 -1
View File
@@ -62,7 +62,7 @@ cat <<EOF >/opt/wanderer/start.sh
trap "kill 0" EXIT
cd /opt/wanderer/source/search && meilisearch --upgrade-db --master-key \$MEILI_MASTER_KEY &
cd /opt/wanderer/source/search && meilisearch --experimental-dumpless-upgrade --master-key \$MEILI_MASTER_KEY &
sleep 1
cd /opt/wanderer/source/db && ./pocketbase serve --http=\$PB_URL --dir=\$PB_DB_LOCATION &
cd /opt/wanderer/source/web && node build &
+2 -2
View File
@@ -7039,11 +7039,11 @@ setup_meilisearch() {
fi
if [[ "$NEEDS_MIGRATION" == "true" ]]; then
# One-time in-place migration via --experimental-dumpless-upgrade (replaced with --upgrade-db)
# One-time in-place migration via --experimental-dumpless-upgrade.
# Meilisearch migrates the on-disk DB during this startup; subsequent
# normal (systemd) starts run without the flag.
msg_info "Migrating data in place (dumpless upgrade ${CURRENT_VERSION}${NEW_VERSION})"
/usr/bin/meilisearch --config-file-path /etc/meilisearch.toml --upgrade-db >/dev/null 2>&1 &
/usr/bin/meilisearch --config-file-path /etc/meilisearch.toml --experimental-dumpless-upgrade >/dev/null 2>&1 &
local MEILI_PID=$!
local MAX_WAIT=300