1401 Commits

Author SHA1 Message Date
CanbiZ
fc59aaede6 fix fi 2025-11-17 11:20:48 +01:00
CanbiZ
432fc70e6e switch funcs 2025-11-17 10:45:28 +01:00
Tobias
b101b5b56b
Fix typo in PostgreSQL setup message 2025-11-14 13:58:18 +01:00
CanbiZ
f9a5ea27f3 Update tools.func 2025-11-12 15:18:18 +01:00
CanbiZ
5ade2b2237 Refactor Docker-VM 2025-11-11 13:45:03 +01:00
CanbiZ
59d684731d fixing outputs 2025-11-11 11:16:03 +01:00
CanbiZ
97f63f5189 Add Cloud-Init helper and refactor Docker VM script
Introduces misc/cloud-init.sh, a universal Cloud-Init helper library for Proxmox VM scripts. Refactors vm/docker-vm.sh to source the new Cloud-Init library, reorganizes variable initialization, improves OS and configuration selection logic, and enhances user interaction for VM creation. Also adds a backup of the previous docker-vm.sh as docker-vm.sh.bak.
2025-11-11 09:55:05 +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
9c0ea4e658 Refactor DB setup functions to use explicit variable names
Updated setup_mariadb_db and setup_postgresql_db to use more descriptive and explicit environment variable names (e.g., MARIADB_DB_NAME, PG_DB_NAME) instead of generic DB_NAME and DB_USER. This improves clarity, reduces risk of variable collision, and makes usage more consistent across scripts.
2025-11-10 15:32:04 +01:00
CanbiZ
51e5512790 Update tools.func 2025-11-10 14:38:35 +01:00
CanbiZ
9f0ec6e75a
Update credentials file path in tools.func 2025-11-10 14:25:56 +01:00
CanbiZ
fd739ee60a Improve env var handling in DB setup functions
Refactored MariaDB and PostgreSQL setup functions to use safer parameter expansion for environment variables, preventing unset variable errors. Updated credential file naming and improved comments for clarity.
2025-11-10 13:33:26 +01:00
CanbiZ
13af901bca Improve error message and variable check in DB setup
Updated the error message in setup_mariadb_db to English for clarity. Improved the DB_PASS variable check in setup_postgresql_db to handle unset variables more robustly.
2025-11-10 13:23:36 +01:00
CanbiZ
b8c35bfb9f Remove container and install scripts for multiple apps
Deleted setup and install scripts for donetick, infisical, nginxproxymanager, openwebui, pangolin, and tracktor from ct/ and install/ directories. Also fixed unbound variable error in setup_mariadb_db by using '${DB_PASS:-}' in misc/tools.func.
2025-11-10 13:21:53 +01:00
CanbiZ
d3f9c7326e Update tools.func 2025-11-10 13:05:56 +01:00
CanbiZ
e46a32968a Update tools.func 2025-11-10 13:05:04 +01:00
CanbiZ
8f72839259 Update tools.func 2025-11-10 13:00:45 +01:00
CanbiZ
2d42c0b2be Improve Docker AppArmor workaround for LXC
Moves AppArmor workaround to run before Docker installation and enhances the workaround in tools.func by adding an unmount step, updating the systemd service to use sysinit.target, and adding verification of the mount. Provides clearer feedback if the workaround is not active.
2025-11-07 13:44:57 +01:00
CanbiZ
a3c2b3c00f Update tools.func 2025-11-07 13:22:56 +01:00
CanbiZ
5aac68de8a
Implement AppArmor workaround for Docker in LXC
Added a workaround for Docker in LXC AppArmor issues to prevent permission denied errors. The workaround is made persistent across reboots by updating /etc/rc.local.
2025-11-07 12:24:25 +01:00
CanbiZ
53a92b2e53 Update tools.func 2025-11-07 10:37:23 +01:00
CanbiZ
a03867de69 Add setup_postgresql_db function for database creation
Introduces setup_postgresql_db to automate PostgreSQL database and user creation, extension installation, role configuration, and credential management. Supports options for superuser privileges, schema permissions, and compatibility settings for frameworks like Django and Rails.
2025-11-07 10:35:57 +01:00
CanbiZ
e6b42a2b86 Update tools.func 2025-11-06 10:07:10 +01:00
CanbiZ
5552a2beb4 Refactor Omada install and improve repo suite mapping
Refactored omada-install.sh to use setup_java and setup_mongodb functions, simplifying Java and MongoDB installation logic. Improved manage_tool_repository in tools.func to provide explicit suite mapping and fallbacks for newer or unknown Debian and Ubuntu releases, enhancing compatibility with future distributions. Minor comment translations and cleanups included.
2025-11-06 09:29:37 +01:00
CanbiZ
dec609fb6a Add success messages to legacy cleanup steps
Added explicit success messages after removing legacy installations for nvm, rbenv, rustup, and Go workspace in the cleanup_legacy_install function. Also updated ensure_apt_working to use the $STD variable for apt update commands for consistency.
2025-11-05 10:57:41 +01:00
CanbiZ
b0610bd8a8 Update tools.func 2025-11-05 10:34:21 +01:00
CanbiZ
b429113018 Update tools.func 2025-11-04 18:10:52 +01:00
CanbiZ
96339e216a fix typo 2025-11-04 17:52:53 +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
dd34f2d8b3 Fix npm global module version detection in setup_nodejs
Replaces direct npm list checks with STD-prefixed commands and output parsing to improve reliability when detecting installed global module versions in the setup_nodejs function.
2025-11-04 17:03:02 +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
a6cdb474a1 Update build.func 2025-11-04 16:52:12 +01:00
CanbiZ
60ddf3af72 Refactor and enhance setup_uv function
Improves architecture and OS detection, adds support for i686, and streamlines version fetching and installation logic. Introduces uvx wrapper installation when requested, generates shell completions, and optionally installs a specific Python version via uv. Cleans up temporary directory handling and error management for robustness.
2025-11-04 16:44:21 +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
2ff12b1f01 Update build.func 2025-11-04 16:30:23 +01:00
CanbiZ
4577271e7d Prioritize app resource defaults and silence storage messages
App-declared CPU, RAM, and disk defaults now take precedence over default.vars only if they are higher, ensuring resource allocations favor app requirements. Additionally, informational output for storage configuration and default.vars creation has been silenced for less verbose operation.
2025-11-04 16:24:37 +01:00
CanbiZ
be47e96028 remove debug 2025-11-04 16:16:38 +01:00
CanbiZ
cf885419ea Update tools.func 2025-11-04 16:09:56 +01:00
CanbiZ
1925c1cd5f Update tools.func 2025-11-04 16:01:24 +01:00
CanbiZ
b159d519b2 Update tools.func 2025-11-04 15:49:26 +01:00
CanbiZ
c8a299e401 Improve Node.js setup to prevent Debian package conflicts
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
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.
2025-11-04 15:36:01 +01:00
CanbiZ
5ebd30abfd Update tools.func
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
2025-11-04 15:31:02 +01:00
CanbiZ
000492671c Improve Node.js setup for Debian systems
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
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.
2025-11-04 15:23:01 +01:00
CanbiZ
03fb8e2da3 Add usage and feature documentation to tools.func
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
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.
2025-11-04 13:54:43 +01:00
CanbiZ
175df9e847 Add retry logic for package upgrades and refactor installs
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
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.
2025-11-04 13:52:58 +01:00
CanbiZ
3f7f39abe2 Refactor tool setup: unify cleanup, retries, and validation
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.
2025-11-04 13:49:51 +01:00
CanbiZ
03bf6dadf1 Enhance cleanup of keyrings and repo configs for tools
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
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.
2025-11-04 13:24:44 +01:00
CanbiZ
f55fa4f60e Reformat misc/tools.func with consistent indentation
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
Updated the entire misc/tools.func script to use consistent 2-space indentation for improved readability and maintainability. No functional changes were made.
2025-11-04 13:18:36 +01:00
CanbiZ
5ae38e84c8 Fix LibreNMS release name and improve Node.js install logs
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
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.
2025-11-04 13:13:08 +01:00