Moves APT pinning for NodeSource to occur before removing existing Debian nodejs packages, ensuring Debian's nodejs is not reinstalled. Cleans up logic for removing conflicting packages and clarifies the order of operations in setup_nodejs.
Enhances the setup_nodejs function to remove Debian-packaged Node.js if present, set APT preferences to prioritize NodeSource packages, and verify npm availability after installation. These changes help avoid conflicts between Debian and NodeSource Node.js versions and ensure npm is properly installed.
Added detailed comments at the top of misc/tools.func describing its purpose, key features, and usage examples. This improves clarity for maintainers and users of the helper functions.
Introduced upgrade_packages_with_retry to handle package upgrades with retry logic, similar to existing install_packages_with_retry. Refactored Java, MariaDB, and other install/upgrade flows to use the new retry functions and ensure_dependencies for more robust package management. Improved error handling and repository preparation steps.
Introduces unified helper functions for cleaning up keyrings, stopping services, verifying tool versions, and cleaning legacy installs. Adds a retry mechanism for package installation and a repository preparation function to streamline setup and error handling. Refactors all tool setup and removal logic to use these helpers, reducing code duplication and improving maintainability.
Expanded the removal of GPG keyrings and repository configuration files for MariaDB, MySQL, MongoDB, Node.js, PHP, PostgreSQL, Java (Adoptium), and ClickHouse in both removal and setup functions. This ensures all possible keyring locations are cleaned before new installations, reducing risk of conflicts and improving idempotency. Also improved PHP-FPM service cleanup and added version verification for MongoDB setup.
Updated the entire misc/tools.func script to use consistent 2-space indentation for improved readability and maintainability. No functional changes were made.
Corrects the case of the release name in the LibreNMS installer to 'librenms' and updates Node.js installation commands to use the $STD variable for consistent output and logging.
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.
Adds robust error handling and fallback logic for network operations in setup_ffmpeg, setup_gs, setup_hwaccel, setup_java, setup_mariadb, setup_ruby, setup_clickhouse, setup_uv, and setup_yq functions. Now uses timeouts, checks for empty responses, and provides alternative installation paths or informative warnings when API or mirror requests fail. This improves reliability in environments with intermittent or restricted network access.
Introduces functions for checking tool installation and version, removing old versions, determining if upgrades are needed, and managing repositories for major tools (MariaDB, MongoDB, Node.js, PHP, PostgreSQL, MySQL). Refactors setup functions for Composer, FFmpeg, Go, Ghostscript, ImageMagick, Java, local IP helper, MariaDB, MongoDB, MySQL, and Node.js to use these new utilities, improving idempotency, upgrade handling, and error reporting. Enhances repository setup with parameter validation and error handling.
Enhanced the setup_mariadb function to better handle MariaDB repository updates, version checks, and upgrade flows. The script now updates the repository if the version differs, provides clearer messaging, and ensures proper upgrade steps for both repository and package updates.
Disabled various debug echo and msg_debug statements in the create_lxc_container function to reduce console output during normal operation. This helps keep logs cleaner while retaining the code for future debugging if needed.
This commit adds error checking and user-friendly error messages to various package installation, archive extraction, and build steps throughout the script. It ensures that failures in commands such as apt, curl, tar, unzip, make, and others are detected, appropriate cleanup is performed, and informative error messages are displayed, improving robustness and debuggability.
Replaces various install/upgrade messages with standardized 'Setup <package> <version>' and 'msg_ok' calls for consistency. Removes redundant or verbose info/warning messages, simplifies dependency installation logic, and ensures error handling uses '|| true' where appropriate. This improves readability and reduces unnecessary output during package setup.
Refactors the logic for fetching available LXC templates and adds a fallback mechanism to prompt the user to select an alternative OS version if the desired template is not found. Enhances debugging output and improves robustness in template selection.