225 Commits

Author SHA1 Message Date
CanbiZ
a7daaee5ae Refactor dev MOTD/SSH setup and journal cleanup
Moved MOTD/SSH setup for dev mode in LXC containers to run after installation and when containers are kept for debugging, improving reliability and clarity. Updated journalctl cleanup to avoid using $STD and suppress errors if systemd-journald is not initialized. Also refactored indentation in misc/api.func for consistency.
2025-11-17 15:09:36 +01:00
CanbiZ
82439d30cd Add msg_dev function for dev mode messaging
Introduces a new msg_dev function in core.func to standardize development/debugging messages. Updates build.func to use msg_dev for clearer dev mode output, replacing previous msg_custom and msg_info usages for MOTD/SSH setup and container debugging steps.
2025-11-17 14:22:22 +01:00
CanbiZ
916293d98d introduce dev_mode
Introduces granular dev_mode flags (motd, keep, trace, pause, breakpoint, logs, dryrun) with a parser and exports for container builds. Enables persistent log directories when logs mode is active, supports dryrun and trace modes, and adds MOTD/SSH setup and breakpoint shell for debugging. Refactors related logic in build.func, core.func, and install.func for improved developer experience and debugging.
2025-11-17 12:53:26 +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
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
432fc70e6e switch funcs 2025-11-17 10:45:28 +01:00
CanbiZ
59d684731d fixing outputs 2025-11-11 11:16:03 +01:00
CanbiZ
336d43ae58 Reindent all functions to 2-space style
Changed indentation from 4 spaces to 2 spaces for all functions in misc/core.func to improve consistency and readability. No functional changes were made.
2025-11-10 16:01:58 +01:00
CanbiZ
f96e1456e7 Update core.func 2025-11-10 15:53:56 +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
8ccd06b596 Refactor message output and improve SSH check logic
Replaces many msg_info calls with msg_custom for more consistent and expressive status messages in build.func. Refines SSH client detection in core.func to better distinguish local, subnet, and external connections, and adds additional warnings for external SSH usage.
2025-11-04 16:38:46 +01:00
CanbiZ
44eb138ed4 Update core.func
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
2025-10-30 13:45:13 +01:00
CanbiZ
d60c38a32d Add and use cleanup_lxc function for system cleanup
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
Introduced a new cleanup_lxc function in core.func to standardize and enhance system cleanup across scripts. Updated debian.sh and debian-install.sh to use this function instead of inline cleanup commands, improving maintainability and consistency. Also updated author and copyright information.
2025-10-30 12:21:58 +01:00
CanbiZ
6e43ed60eb Update core.func
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
2025-09-23 14:42:48 +02:00
CanbiZ
e5e7c5fa9f Update core.func
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
2025-09-23 14:41:58 +02:00
CanbiZ
d0f6818386 Move and improve ssh_check and shell_check functions
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
The ssh_check function was moved from build.func to core.func and enhanced to allow an override and to skip warnings for localhost connections. The shell_check function was simplified to directly check for Bash and provide clearer messaging. These changes centralize environment checks and improve user experience.
2025-09-23 14:39:39 +02:00
CanbiZ
435890eee2 Update core.func
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
2025-09-23 14:32:19 +02:00
CanbiZ
f333fc5db7 Improve shell detection in shell_check function
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
Enhanced the shell_check function to handle both 'bash' and '-bash' as valid shells, added a debug message to display the detected shell, and changed the exit code to 1 for clearer error signaling.
2025-09-23 14:29:44 +02:00
tremor021
923a24a1cc Update shell detection
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
2025-09-22 09:34:31 +02:00
CanbiZ
9a1f0de47e Refactor app defaults save logic and remove error handlers
Reworks the app defaults save/update logic in misc/build.func to support updating existing defaults with a diff and interactive menu, and adds robust var_* parsing and whitelisting. Removes legacy error and curl handler functions from misc/core.func, streamlining error handling and reducing code duplication.
2025-09-16 13:05:02 +02:00
CanbiZ
8aa95f9549 Update core.func 2025-09-16 11:44:24 +02:00
CanbiZ
7c0f758e2a Update core.func 2025-09-16 11:28:20 +02:00
CanbiZ
ca023e077e Update core.func 2025-09-16 11:19:19 +02:00
CanbiZ
773ae42241 test 2025-09-16 11:16:01 +02:00
CanbiZ
983ea68da6 Update core.func 2025-09-16 11:09:59 +02:00
CanbiZ
9d496e563b Update core.func 2025-09-16 11:02:21 +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
c24defefd8 Update core.func 2025-09-16 10:20:09 +02:00
CanbiZ
b9ce802c8f Update core.func 2025-09-16 10:07:28 +02:00
CanbiZ
2b22c47976 Update core.func 2025-09-16 10:04:37 +02:00
CanbiZ
0e66031e3c error-handler 2025-09-16 09:59:06 +02:00
CanbiZ
ce79bd0c08 outsource 2025-09-16 09:57:35 +02:00
CanbiZ
d078f1d158 Update core.func 2025-09-16 09:51:35 +02:00
CanbiZ
5c750affa5 error-log 2025-09-16 08:58:01 +02:00
CanbiZ
cde9ae6d4b Update core.func 2025-09-16 08:39:21 +02:00
CanbiZ
7ca4f0e9fb Update core.func 2025-09-15 16:00:06 +02:00
CanbiZ
f92479dfb0 Update core.func 2025-09-15 15:53:30 +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
8d687ba9ab test 2025-09-15 15:34:41 +02:00
CanbiZ
af46e22bd2
Revert "feat: add centralized logging utilities" 2025-08-25 14:30:28 +02:00
CanbiZ
3c3aabd21d feat: expand logger with subshell-safe error handling 2025-08-25 14:28:16 +02:00
CanbiZ
d9987442ae test 2025-08-04 11:13:19 +02:00
CanbiZ
b743b30b61 destroy_lxc 2025-08-04 10:45:33 +02:00
CanbiZ
f5b1cecef2 Update core.func 2025-07-28 14:40:36 +02:00
CanbiZ
76d540810c Update core.func 2025-07-28 14:33:15 +02:00
CanbiZ
b17ae237d7 msg_debug 2025-07-28 14:19:17 +02:00
CanbiZ
ba0a4197d9 shebang 2025-07-28 09:23:16 +02:00