mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-23 13:35:56 +01:00
Compare commits
5 Commits
fix/error-
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a13caec262 | ||
|
|
df80c849f2 | ||
|
|
69de9fa57e | ||
|
|
695a6ce29b | ||
|
|
1976a1715c |
@@ -413,6 +413,12 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
- Frigate v16.4 [@MickLesk](https://github.com/MickLesk) ([#11887](https://github.com/community-scripts/ProxmoxVE/pull/11887))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- core: Improve error handling and logging for LXC builds [@MickLesk](https://github.com/MickLesk) ([#12208](https://github.com/community-scripts/ProxmoxVE/pull/12208))
|
||||
|
||||
## 2026-02-22
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated": "2026-02-23T06:26:10Z",
|
||||
"generated": "2026-02-23T12:14:19Z",
|
||||
"versions": [
|
||||
{
|
||||
"slug": "2fauth",
|
||||
@@ -200,9 +200,9 @@
|
||||
{
|
||||
"slug": "cleanuparr",
|
||||
"repo": "Cleanuparr/Cleanuparr",
|
||||
"version": "v2.7.0",
|
||||
"version": "v2.7.1",
|
||||
"pinned": false,
|
||||
"date": "2026-02-22T18:17:27Z"
|
||||
"date": "2026-02-23T09:58:13Z"
|
||||
},
|
||||
{
|
||||
"slug": "cloudreve",
|
||||
@@ -421,6 +421,13 @@
|
||||
"pinned": false,
|
||||
"date": "2026-01-25T18:20:14Z"
|
||||
},
|
||||
{
|
||||
"slug": "frigate",
|
||||
"repo": "blakeblackshear/frigate",
|
||||
"version": "v0.16.4",
|
||||
"pinned": true,
|
||||
"date": "2026-01-29T00:42:14Z"
|
||||
},
|
||||
{
|
||||
"slug": "gatus",
|
||||
"repo": "TwiN/gatus",
|
||||
@@ -578,9 +585,9 @@
|
||||
{
|
||||
"slug": "huntarr",
|
||||
"repo": "plexguide/Huntarr.io",
|
||||
"version": "9.3.7",
|
||||
"version": "9.4.1",
|
||||
"pinned": false,
|
||||
"date": "2026-02-19T01:03:53Z"
|
||||
"date": "2026-02-23T08:46:37Z"
|
||||
},
|
||||
{
|
||||
"slug": "immich-public-proxy",
|
||||
@@ -1663,9 +1670,9 @@
|
||||
{
|
||||
"slug": "wanderer",
|
||||
"repo": "meilisearch/meilisearch",
|
||||
"version": "v1.35.1",
|
||||
"version": "v1.36.0",
|
||||
"pinned": false,
|
||||
"date": "2026-02-16T17:01:17Z"
|
||||
"date": "2026-02-23T08:13:32Z"
|
||||
},
|
||||
{
|
||||
"slug": "warracker",
|
||||
|
||||
@@ -175,7 +175,10 @@ cp -a /opt/frigate/docker/main/rootfs/. /
|
||||
sed -i '/^.*unset DEBIAN_FRONTEND.*$/d' /opt/frigate/docker/main/install_deps.sh
|
||||
echo "libedgetpu1-max libedgetpu/accepted-eula boolean true" | debconf-set-selections
|
||||
echo "libedgetpu1-max libedgetpu/install-confirm-max boolean true" | debconf-set-selections
|
||||
# Allow Frigate's Intel media packages to overwrite files from system GPU driver packages
|
||||
echo 'force-overwrite' >/etc/dpkg/dpkg.cfg.d/force-overwrite
|
||||
$STD bash /opt/frigate/docker/main/install_deps.sh
|
||||
rm -f /etc/dpkg/dpkg.cfg.d/force-overwrite
|
||||
$STD pip3 install -U /wheels/*.whl
|
||||
ldconfig
|
||||
msg_ok "Installed HailoRT Runtime"
|
||||
|
||||
@@ -4055,8 +4055,9 @@ EOF'
|
||||
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/${var_install}.sh)"
|
||||
local lxc_exit=$?
|
||||
|
||||
set -Eeuo pipefail # Re-enable error handling
|
||||
trap 'error_handler' ERR # Restore ERR trap
|
||||
# Keep error handling DISABLED during failure detection and recovery
|
||||
# Re-enabling it here would cause any pct exec/pull failure to trigger
|
||||
# error_handler() on the host, bypassing the recovery menu entirely
|
||||
|
||||
# Check for error flag file in container (more reliable than lxc-attach exit code)
|
||||
local install_exit_code=0
|
||||
@@ -4484,6 +4485,10 @@ EOF'
|
||||
|
||||
exit $install_exit_code
|
||||
fi
|
||||
|
||||
# Re-enable error handling after successful install or recovery menu completion
|
||||
set -Eeuo pipefail
|
||||
trap 'error_handler' ERR
|
||||
}
|
||||
|
||||
destroy_lxc() {
|
||||
|
||||
@@ -524,7 +524,8 @@ silent() {
|
||||
if [[ -s "$logfile" ]]; then
|
||||
echo -e "\n${TAB}--- Last 10 lines of log ---"
|
||||
tail -n 10 "$logfile"
|
||||
echo -e "${TAB}-----------------------------------\n"
|
||||
echo -e "${TAB}-----------------------------------"
|
||||
echo -e "${TAB}📋 Full log: ${logfile}\n"
|
||||
fi
|
||||
|
||||
exit "$rc"
|
||||
|
||||
@@ -236,67 +236,54 @@ error_handler() {
|
||||
active_log="$SILENT_LOGFILE"
|
||||
fi
|
||||
|
||||
# If active_log points to a container-internal path that doesn't exist on host,
|
||||
# fall back to BUILD_LOG (host-side log)
|
||||
if [[ -n "$active_log" && ! -s "$active_log" && -n "${BUILD_LOG:-}" && -s "${BUILD_LOG}" ]]; then
|
||||
active_log="$BUILD_LOG"
|
||||
fi
|
||||
|
||||
# Show last log lines if available
|
||||
if [[ -n "$active_log" && -s "$active_log" ]]; then
|
||||
echo -e "\n${TAB}--- Last 20 lines of log ---"
|
||||
tail -n 20 "$active_log"
|
||||
echo -e "${TAB}-----------------------------------\n"
|
||||
fi
|
||||
|
||||
# Detect context: Container (INSTALL_LOG set + /root exists) vs Host (BUILD_LOG)
|
||||
if [[ -n "${INSTALL_LOG:-}" && -d /root ]]; then
|
||||
# CONTAINER CONTEXT: Copy log and create flag file for host
|
||||
local container_log="/root/.install-${SESSION_ID:-error}.log"
|
||||
cp "$active_log" "$container_log" 2>/dev/null || true
|
||||
# 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
|
||||
local container_log="/root/.install-${SESSION_ID:-error}.log"
|
||||
cp "${INSTALL_LOG}" "$container_log" 2>/dev/null || true
|
||||
|
||||
# Create error flag file with exit code for host detection
|
||||
echo "$exit_code" >"/root/.install-${SESSION_ID:-error}.failed" 2>/dev/null || true
|
||||
# Log path is shown by host as combined log - no need to show container path
|
||||
else
|
||||
# HOST CONTEXT: Show local log path and offer container cleanup
|
||||
# Create error flag file with exit code for host detection
|
||||
echo "$exit_code" >"/root/.install-${SESSION_ID:-error}.failed" 2>/dev/null || true
|
||||
# Log path is shown by host as combined log - no need to show container path
|
||||
else
|
||||
# HOST CONTEXT: Show local log path and offer container cleanup
|
||||
if [[ -n "$active_log" && -s "$active_log" ]]; then
|
||||
if declare -f msg_custom >/dev/null 2>&1; then
|
||||
msg_custom "📋" "${YW}" "Full log: ${active_log}"
|
||||
else
|
||||
echo -e "${YW}Full log:${CL} ${BL}${active_log}${CL}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Offer to remove container if it exists (build errors after container creation)
|
||||
if [[ -n "${CTID:-}" ]] && command -v pct &>/dev/null && pct status "$CTID" &>/dev/null; then
|
||||
echo ""
|
||||
if declare -f msg_custom >/dev/null 2>&1; then
|
||||
echo -en "${TAB}❓${TAB}${YW}Remove broken container ${CTID}? (Y/n) [auto-remove in 60s]: ${CL}"
|
||||
else
|
||||
echo -en "${YW}Remove broken container ${CTID}? (Y/n) [auto-remove in 60s]: ${CL}"
|
||||
fi
|
||||
# Offer to remove container if it exists (build errors after container creation)
|
||||
if [[ -n "${CTID:-}" ]] && command -v pct &>/dev/null && pct status "$CTID" &>/dev/null; then
|
||||
echo ""
|
||||
if declare -f msg_custom >/dev/null 2>&1; then
|
||||
echo -en "${TAB}❓${TAB}${YW}Remove broken container ${CTID}? (Y/n) [auto-remove in 60s]: ${CL}"
|
||||
else
|
||||
echo -en "${YW}Remove broken container ${CTID}? (Y/n) [auto-remove in 60s]: ${CL}"
|
||||
fi
|
||||
|
||||
if read -t 60 -r response; then
|
||||
if [[ -z "$response" || "$response" =~ ^[Yy]$ ]]; then
|
||||
echo ""
|
||||
if declare -f msg_info >/dev/null 2>&1; then
|
||||
msg_info "Removing container ${CTID}"
|
||||
else
|
||||
echo -e "${YW}Removing container ${CTID}${CL}"
|
||||
fi
|
||||
pct stop "$CTID" &>/dev/null || true
|
||||
pct destroy "$CTID" &>/dev/null || true
|
||||
if declare -f msg_ok >/dev/null 2>&1; then
|
||||
msg_ok "Container ${CTID} removed"
|
||||
else
|
||||
echo -e "${GN}✔${CL} Container ${CTID} removed"
|
||||
fi
|
||||
elif [[ "$response" =~ ^[Nn]$ ]]; then
|
||||
echo ""
|
||||
if declare -f msg_warn >/dev/null 2>&1; then
|
||||
msg_warn "Container ${CTID} kept for debugging"
|
||||
else
|
||||
echo -e "${YW}Container ${CTID} kept for debugging${CL}"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# Timeout - auto-remove
|
||||
if read -t 60 -r response; then
|
||||
if [[ -z "$response" || "$response" =~ ^[Yy]$ ]]; then
|
||||
echo ""
|
||||
if declare -f msg_info >/dev/null 2>&1; then
|
||||
msg_info "No response - removing container ${CTID}"
|
||||
msg_info "Removing container ${CTID}"
|
||||
else
|
||||
echo -e "${YW}No response - removing container ${CTID}${CL}"
|
||||
echo -e "${YW}Removing container ${CTID}${CL}"
|
||||
fi
|
||||
pct stop "$CTID" &>/dev/null || true
|
||||
pct destroy "$CTID" &>/dev/null || true
|
||||
@@ -305,13 +292,35 @@ error_handler() {
|
||||
else
|
||||
echo -e "${GN}✔${CL} Container ${CTID} removed"
|
||||
fi
|
||||
elif [[ "$response" =~ ^[Nn]$ ]]; then
|
||||
echo ""
|
||||
if declare -f msg_warn >/dev/null 2>&1; then
|
||||
msg_warn "Container ${CTID} kept for debugging"
|
||||
else
|
||||
echo -e "${YW}Container ${CTID} kept for debugging${CL}"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# Timeout - auto-remove
|
||||
echo ""
|
||||
if declare -f msg_info >/dev/null 2>&1; then
|
||||
msg_info "No response - removing container ${CTID}"
|
||||
else
|
||||
echo -e "${YW}No response - removing container ${CTID}${CL}"
|
||||
fi
|
||||
pct stop "$CTID" &>/dev/null || true
|
||||
pct destroy "$CTID" &>/dev/null || true
|
||||
if declare -f msg_ok >/dev/null 2>&1; then
|
||||
msg_ok "Container ${CTID} removed"
|
||||
else
|
||||
echo -e "${GN}✔${CL} Container ${CTID} removed"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Force one final status update attempt after cleanup
|
||||
# This ensures status is updated even if the first attempt failed (e.g., HTTP 400)
|
||||
if declare -f post_update_to_api &>/dev/null; then
|
||||
post_update_to_api "failed" "$exit_code" "force"
|
||||
fi
|
||||
# Force one final status update attempt after cleanup
|
||||
# This ensures status is updated even if the first attempt failed (e.g., HTTP 400)
|
||||
if declare -f post_update_to_api &>/dev/null; then
|
||||
post_update_to_api "failed" "$exit_code" "force"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user