Files
nas/lib/netdata.sh
Mărcziem ™ a7fd5f806b feat: Enhance distribution detection with robust 5-method fallback system
- Add lib/detection.sh with advanced distribution and container detection
- Implement 5-method fallback detection (/etc/os-release, redhat-release, debian_version, lsb_release, manual)
- Add container environment detection (Docker, Podman, LXC, WSL) with user warnings
- Enhance version normalization with regex parsing and bc calculator
- Add comprehensive unit tests (66 test cases, 98.5% success rate)
- Update documentation (README, CHANGELOG, SECURITY, CONTRIBUTING)
- Improve enterprise-grade error handling and logging
- Add IPv6 and security considerations for 2025 compatibility
2025-10-01 23:44:48 +02:00

40 lines
1.1 KiB
Bash

#!/bin/bash
# Netdata installation and configuration script
install_netdata() {
log_info "Installing Netdata..."
case $DISTRO in
ubuntu|debian)
# Install dependencies
handle_error sudo apt-get update
handle_error sudo apt-get install -y curl git
;;
fedora)
# Install dependencies
handle_error sudo dnf install -y curl git
;;
arch)
# Install dependencies
handle_error sudo pacman -S --noconfirm curl git
;;
opensuse)
# Install dependencies
handle_error sudo zypper install -y curl git
;;
*)
log_error "Unsupported Linux distribution: $DISTRO"
exit 1
;;
esac
# Install Netdata from GitHub (works across distributions)
handle_error bash <(curl -Ss https://my-netdata.io/kickstart.sh) --stable-channel --disable-telemetry
handle_error sudo systemctl enable netdata
handle_error sudo systemctl start netdata
log_info "Netdata installation completed."
}