Fix for snmpd in Alpine, snmpd crashes with the default configuration.

This commit is contained in:
Kristofer Hallin 2022-05-01 12:34:34 -07:00 committed by Olof hagsand
parent 168598168f
commit 0ada609d2f

View file

@ -51,7 +51,13 @@ function testinit(){
sudo killall snmpd
new "Starting $snmpd --rwcommunity=public --master=agentx --agentXSocket=unix:/tmp/clixon_snmp.sock udp:127.0.0.1:1161"
$snmpd --rwcommunity=public --master=agentx --agentXSocket=unix:$SOCK udp:127.0.0.1:1161
# Dirty workaround for snmpd in Alpine
if [ -f /.dockerenv ]; then
$snmpd -C --rwcommunity=public --master=agentx --agentXSocket=unix:$SOCK udp:127.0.0.1:1161
else
$snmpd --rwcommunity=public --master=agentx --agentXSocket=unix:$SOCK udp:127.0.0.1:1161
fi
pgrep snmpd
if [ $? != 0 ]; then
@ -78,7 +84,7 @@ function testinit(){
start_snmp $cfg &
# Wait for things to settle
sleep 10
sleep 3
}
function testexit(){