Last active
June 19, 2020 13:54
-
-
Save binsky08/e2449ad9a5435f2758f2a65aff3d4211 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cp /opt/openitc/frontend-modules/SnmpTrapModule/src/nagios_plugin/check_snmptraps.pl /opt/openitc/nagios/libexec/ | |
chmod 755 /opt/openitc/nagios/libexec/check_snmptraps.pl | |
if [ -f "/usr/share/snmp/mibs/ietf/SNMPv2-PDU" ] ; then | |
cp /opt/openitc/frontend-modules/SnmpTrapModule/src/SNMPv2-PDU_fixed /usr/share/snmp/mibs/ietf/SNMPv2-PDU | |
fi | |
mkdir -p /opt/openitc/etc/SnmpTrapModule | |
if id -u snmptt > /dev/null 2>&1; then | |
if id -u snmp > /dev/null 2>&1; then | |
usermod -a -G snmptt snmp | |
usermod -a -G snmp snmptt | |
fi | |
if id -u "Debian-snmp" > /dev/null 2>&1; then | |
usermod -a -G snmptt Debian-snmp | |
usermod -a -G Debian-snmp snmptt | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment