mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 05:57:26 +00:00
Improve container build/install logging and error handling
Introduces distinct BUILD_LOG and INSTALL_LOG variables for host and container operations, ensuring logs are properly captured and retrievable. Refactors silent execution and error handling to use the active log file, improves log copying after failures, and enhances context detection for log management. Also adds fallback logic for INSTALL_LOG initialization in install.func.
This commit is contained in:
@@ -28,6 +28,11 @@
|
||||
# SECTION 1: INITIALIZATION
|
||||
# ==============================================================================
|
||||
|
||||
# Ensure INSTALL_LOG is set (exported from build.func, but fallback if missing)
|
||||
if [[ -z "${INSTALL_LOG:-}" ]]; then
|
||||
INSTALL_LOG="/root/.install-${SESSION_ID:-unknown}.log"
|
||||
fi
|
||||
|
||||
if ! command -v curl >/dev/null 2>&1; then
|
||||
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
||||
apt-get update >/dev/null 2>&1
|
||||
|
||||
Reference in New Issue
Block a user