#! /bin/sh # Rocky9 compatible # Author: Nerijus # Company: Kolmisoft # Year: 2014 # About: This script installs fail2ban . /usr/src/m2/framework/bash_functions.sh VERSION="1.1.0" SCRIPT_NAME="Fail2Ban Install" k_start #script requires epel repos yum -y install epel-release . /usr/src/m2/framework/bash_functions.sh if (( centos_version == 6 )); then yum -y install fail2ban elif (( centos_version == 7 )); then yum -y install fail2ban-server elif [ $ROCKY9 == 1 ]; then yum -y install fail2ban-server else report "OS version is not supported" 1 fi if [ ! -d "/etc/fail2ban" ]; then report "Failed to install Fail2ban" 1 k_exit 1 fi /usr/src/m2/helpers/fail2ban/fail2ban_update.sh k_exit $EXIT_CODE