Fix Netdata repository for openSUSE Leap and use systemd backend for Fail2ban
This commit is contained in:
@@ -49,8 +49,8 @@ install_netdata() {
|
|||||||
handle_error sudo pacman -S --noconfirm netdata
|
handle_error sudo pacman -S --noconfirm netdata
|
||||||
;;
|
;;
|
||||||
opensuse)
|
opensuse)
|
||||||
# Add Netdata repository
|
# Add Netdata repository (use generic Leap repo)
|
||||||
handle_error sudo zypper addrepo -f https://packagecloud.io/netdata/netdata/opensuse/15.6 netdata
|
handle_error sudo zypper addrepo -f https://packagecloud.io/netdata/netdata/opensuse/leap netdata
|
||||||
handle_error sudo zypper --gpg-auto-import-keys refresh
|
handle_error sudo zypper --gpg-auto-import-keys refresh
|
||||||
handle_error sudo zypper install -y netdata
|
handle_error sudo zypper install -y netdata
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -292,7 +292,27 @@ perform_health_check() {
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
echo "=== Service Status ==="
|
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
|
if systemctl is-active --quiet "$service" 2>/dev/null; then
|
||||||
echo "✅ $service: Active"
|
echo "✅ $service: Active"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ maxretry = 3
|
|||||||
[sshd]
|
[sshd]
|
||||||
enabled = true
|
enabled = true
|
||||||
port = ${DEFAULT_SSH_PORT:-22}
|
port = ${DEFAULT_SSH_PORT:-22}
|
||||||
|
backend = systemd
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Add distribution-specific log path for SSH
|
# Add distribution-specific log path for SSH
|
||||||
|
|||||||
Reference in New Issue
Block a user