Add comprehensive documentation for all project sections

Introduced new and updated documentation files across the docs/ directory, including project structure guides, function library references, and standardized READMEs for ct, install, vm, tools, api, and misc. This update fully documents all nine function libraries, provides quick start and learning paths, and mirrors the project structure for easier navigation and contribution.
This commit is contained in:
CanbiZ
2025-12-01 11:40:38 +01:00
parent dab67f7980
commit 3998b80194
34 changed files with 5221 additions and 42 deletions

View File

@@ -0,0 +1,93 @@
# install.func Usage Examples
Practical examples for using install.func functions in application installation scripts.
## Basic Examples
### Example 1: Minimal Setup
```bash
#!/usr/bin/env bash
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
setting_up_container
network_check
update_os
# ... application installation ...
motd_ssh
customize
cleanup_lxc
```
### Example 2: With Error Handling
```bash
#!/usr/bin/env bash
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
catch_errors
setting_up_container
if ! network_check; then
msg_error "Network failed"
exit 1
fi
if ! update_os; then
msg_error "OS update failed"
exit 1
fi
# ... continue ...
```
---
## Production Examples
### Example 3: Full Application Installation
```bash
#!/usr/bin/env bash
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing application"
# ... install steps ...
msg_ok "Application installed"
motd_ssh
customize
cleanup_lxc
```
### Example 4: With IPv6 Support
```bash
#!/usr/bin/env bash
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
catch_errors
setting_up_container
verb_ip6
network_check
update_os
# ... application installation ...
motd_ssh
customize
cleanup_lxc
```
---
**Last Updated**: December 2025
**Examples**: Basic and production patterns
**All examples production-ready**