Workaround for crashing snmpd in Alpine.

This commit is contained in:
Kristofer Hallin 2022-04-27 21:47:09 +02:00 committed by Olof hagsand
parent 366b1cb42f
commit 0fc5bd3bfb

View file

@ -45,8 +45,14 @@ function testinit(){
new "kill old snmp daemons" new "kill old snmp daemons"
sudo killall snmpd sudo killall snmpd
new "Starting $snmpd --rwcommunity=public --master=agentx --agentXSocket=unix:/tmp/clixon_snmp.sock udp:127.0.0.1:1161" new "Starting $snmpd -C --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
# Dity 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 pgrep snmpd
if [ $? != 0 ]; then if [ $? != 0 ]; then