updated to work with rhel 8/9
This commit is contained in:
4
snmp.sh
4
snmp.sh
@@ -16,12 +16,12 @@ if [ -f /etc/debian_version ]; then
|
|||||||
apt update
|
apt update
|
||||||
apt install -y snmpd curl
|
apt install -y snmpd curl
|
||||||
elif [ -f /etc/redhat-release ]; then
|
elif [ -f /etc/redhat-release ]; then
|
||||||
yum install -y net-snmp net-snmp-utils
|
dnf install -y net-snmp net-snmp-utils
|
||||||
firewall-cmd --zone=public --add-service=snmp --permanent
|
firewall-cmd --zone=public --add-service=snmp --permanent
|
||||||
firewall-cmd --reload
|
firewall-cmd --reload
|
||||||
else
|
else
|
||||||
echo "You are running an unsupported OS"
|
echo "You are running an unsupported OS"
|
||||||
echo "Support OSes: Debian, Ubuntu, CentOS"
|
echo "Support OSes: Debian, Ubuntu, CentOS/Rocky 8/9"
|
||||||
echo "Your OS: ${OS} ${OS_VER}"
|
echo "Your OS: ${OS} ${OS_VER}"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user