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.
This script manages the Gitea Mirror application, including installation, updates, and environment configuration. It handles version checks, service management, and data backup/restoration.
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.
Updated awk and grep patterns in create_lxc_container to match non-digit characters after TEMPLATE_SEARCH, instead of only dashes or underscores. This improves accuracy when filtering available and local LXC templates.
Adds a fallback to construct the template path if it is still unset but a valid template name exists. Refines template search patterns for both local and online templates, and removes redundant error handling for unresolved template paths.
Removes redundant success messages for storage selection, improves template filtering with stricter matching, and refactors LXC stack upgrade retry logic for better error handling and code clarity during container creation.
Added a grep to ensure only valid version numbers are listed and improved the display of available versions with formatting. This enhances clarity and prevents non-version strings from appearing in the version selection.
Enhanced the LXC container creation process to prompt for available template versions if the requested template is missing, allowing users to select from available options interactively. Also refactored the hardware acceleration setup function for better readability and consistency, and made minor whitespace and formatting adjustments.
Refactored MySQL installation logic to use Bookworm packages for Debian testing/unstable (Trixie, Forky, Sid) instead of blocking installation. Added conditional purge of MySQL packages only if installed and improved messaging for unsupported distributions.
Updated the setup_postgresql function to use runuser instead of su for executing pg_dumpall and psql as the postgres user. This improves compatibility and security when running these commands.
Bumps Node.js version from 22 to 24 in ente-install.sh. Enhances MySQL setup in tools.func to explicitly block installation on Debian Trixie/forky/sid due to incompatibility, providing alternative solutions and clearer messaging.