29 Commits

Author SHA1 Message Date
CanbiZ (MickLesk) 81e39c0680 merge error_handler 2026-02-24 09:36:33 +01:00
CanbiZ (MickLesk) d773b939f7 noHup /SIGHUP Tweak 2026-02-17 13:46:03 +01:00
CanbiZ (MickLesk) 82de09f19f fix: remove debug output, add duration tracking, cleanup duplicate log messages 2026-02-10 14:29:28 +01:00
CanbiZ (MickLesk) 820d4551a1 Replace Go API with PocketBase; update docs
Remove the old Go/Mongo API (api/main.go, go.mod, go.sum, .env.example) and switch telemetry backend to PocketBase (http://db.community-scripts.org). Update documentation and flowcharts to reflect the PocketBase collection (_dev_telemetry_data), new REST endpoints (POST/PATCH/GET), field schema, and revised api.func integration (LXC/VM reporting and status updates). Misc scripts and helpers were adjusted (misc/api.func, misc/build.func, misc/error_handler.func) and a new misc/ingest.go was added. This consolidates telemetry to a hosted PocketBase instance and updates docs and integration points accordingly.
2026-02-09 15:34:17 +01:00
Tobias c5786b9210 happ new year - well a bit late :D 2026-01-06 12:36:02 +01:00
CanbiZ 4076b7e632 autologin 2025-12-08 15:15:42 +01:00
CanbiZ 9e4d367415 Report container build failures to API before cleanup
Adds calls to post_update_to_api to notify the API of container build failures before prompting for container cleanup in both build and error handler scripts.
2025-12-08 15:12:31 +01:00
CanbiZ d677488b29 Refactor storage validation and error codes for containers
Simplifies and streamlines storage validation logic in create_lxc_container, removing redundant content checks and using direct exit codes for unsupported storage types. Updates error_handler.func with clearer, more specific Proxmox exit code explanations and improves code consistency and readability throughout error handling functions.
2025-12-04 14:06:16 +01:00
CanbiZ 9607c83465 Compact network check output: combine IPv4/IPv6 status into single line 2025-11-17 16:11:14 +01:00
CanbiZ 1c80a22685 Add container cleanup prompt to error_handler for build failures (e.g. GPU passthrough errors) 2025-11-17 16:02:29 +01:00
CanbiZ c2b7f4e298 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.
2025-11-17 12:45:24 +01:00
CanbiZ 06a4091019 Improve container install error handling and logging
Enhances reliability of application installation error detection in containers by using an error flag file, improves log copying and user prompts, and updates error handler to create a flag file with the exit code for host-side detection.
2025-11-17 12:23:51 +01:00
CanbiZ 5386da93e8 Handle failed LXC install and cleanup in build.func
Moved failed LXC installation cleanup logic from error_handler.func to build.func. Now, if installation fails, the user is prompted to remove the broken container with a 60s timeout, and the installation log is copied for debugging. Removed the cleanup_failed_lxc function and related trap from error_handler.func for better encapsulation.
2025-11-17 12:11:09 +01:00
CanbiZ 70a72f1356 Add cleanup handler for failed LXC installations
Introduces the cleanup_failed_lxc function to prompt for and remove broken containers after failed LXC installs. Updates catch_errors to invoke this cleanup on EXIT, ensuring failed containers are handled automatically or with user confirmation.
2025-11-17 11:46:51 +01:00
CanbiZ ee5fe3439d extend error messages 206,207,208,209 / 215, 216, 217, 218 / 222, 223, 231 2025-11-17 11:36:00 +01:00
CanbiZ c0fc74bc9c Add detailed documentation and refactor core functions
Expanded inline documentation and section headers across misc/api.func, misc/build.func, misc/core.func, misc/error_handler.func, and misc/install.func for improved maintainability and clarity. Refactored error handling to use centralized explain_exit_code and updated API telemetry/reporting logic. Enhanced modularity and structure of utility, validation, and setup functions, and improved comments for user guidance and developer onboarding.
2025-11-17 11:17:04 +01:00
CanbiZ 27bb9e5192 Improve install log handling for containers
Enhances the build and error handler scripts to better manage installation logs. On install failure, the log is now copied from the container to the host for easier debugging. The error handler now saves the log inside the container's /root directory for later retrieval, improving traceability and support.
2025-11-04 17:10:28 +01:00
CanbiZ b55e8f5f34 Improve logging and error handling with session IDs
Introduces a SESSION_ID variable for log file naming and tracking, updates log file paths to include timestamps and session IDs, and enhances error handling output to use custom message functions when available. Also improves log file management and user guidance for viewing logs, and refactors error handler to better support containerized environments.
2025-11-04 16:59:02 +01:00
CanbiZ b840a8aa32 Replace init_error_traps with catch_errors in scripts
Replaces all occurrences of the 'init_error_traps' function with 'catch_errors' across container and install scripts for consistency in error handling. Also adjusts indentation and formatting in some scripts for improved readability.
2025-09-19 08:53:49 +02:00
CanbiZ adf51e7086 Update error_handler.func 2025-09-16 16:02:19 +02:00
CanbiZ d89e19db74 testing error 2025-09-16 10:56:56 +02:00
CanbiZ cb29e50080 testing 2025-09-16 10:49:47 +02:00
CanbiZ ba51df5bb1 testing 2025-09-16 10:41:55 +02:00
CanbiZ 67ebb3782c fixes 2025-09-16 10:26:00 +02:00
CanbiZ 61c9c5ce80 Update error_handler.func 2025-09-16 10:20:47 +02:00
CanbiZ 0e66031e3c error-handler 2025-09-16 09:59:06 +02:00
CanbiZ 5c750affa5 error-log 2025-09-16 08:58:01 +02:00
CanbiZ a5a58d87b4 Improve error handling and silent logging
Expanded explain_exit_code with more exit codes for various tools (APT, Node.js, Python, databases) for better diagnostics. Updated silent() to set BASH_COMMAND on failure for improved error context.
2025-09-15 15:43:58 +02:00
CanbiZ c3fd7ea4e4 rename 2025-09-15 15:27:49 +02:00