Fix for snmpd in Alpine, snmpd crashes with the default configuration.
This commit is contained in:
parent
0ec26df953
commit
4c3bbcc0ed
1 changed files with 8 additions and 2 deletions
|
|
@ -51,7 +51,13 @@ function testinit(){
|
||||||
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 --rwcommunity=public --master=agentx --agentXSocket=unix:/tmp/clixon_snmp.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
|
$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
|
||||||
|
|
@ -78,7 +84,7 @@ function testinit(){
|
||||||
start_snmp $cfg &
|
start_snmp $cfg &
|
||||||
|
|
||||||
# Wait for things to settle
|
# Wait for things to settle
|
||||||
sleep 10
|
sleep 3
|
||||||
}
|
}
|
||||||
|
|
||||||
function testexit(){
|
function testexit(){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue