Fix Netdata repository for openSUSE Leap and use systemd backend for Fail2ban

This commit is contained in:
Mărcziem ™
2025-10-06 11:34:36 +02:00
parent edf70990ca
commit 8b0f8b3e96
3 changed files with 24 additions and 3 deletions

View File

@@ -292,7 +292,27 @@ perform_health_check() {
echo
echo "=== Service Status ==="
for service in ssh sshd smb nmb docker netdata; do
# Check services based on distribution
case $DISTRO in
opensuse)
services_to_check="sshd smb nmb fail2ban"
;;
*)
services_to_check="ssh sshd smb nmb fail2ban"
;;
esac
# Always check docker if installed
if [[ "${INSTALL_DOCKER:-false}" == "true" ]]; then
services_to_check="$services_to_check docker"
fi
# Check netdata if installed
if [[ "${INSTALL_NETDATA:-false}" == "true" ]]; then
services_to_check="$services_to_check netdata"
fi
for service in $services_to_check; do
if systemctl is-active --quiet "$service" 2>/dev/null; then
echo "$service: Active"
else