SNMPD delayed start possible?

Hello,

Is it possible to have a delayed start of the snmpd.service ?
Although this service is enabled at startup, on some of my servers this service does not start after a reboot.
I think it’s a timing issue, because if I start the service manually after I logged on, no problem.

journalctl -b |grep snmpd.service

Nov 16 15:49:45 rpi-87 systemd[1]: snmpd.service: Main process exited, code=exited, status=1/FAILURE
Nov 16 15:49:45 rpi-87 systemd[1]: snmpd.service: Failed with result 'exit-code'.

config:

# --------------------------------------------------------
[Unit]
Description=Simple Network Management Protocol (SNMP) Daemon.
After=network.target
ConditionPathExists=/etc/snmp/snmpd.conf

[Service]
Type=simple
ExecStartPre=/bin/mkdir -p /var/run/agentx
ExecStart=/usr/sbin/snmpd -LOw -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target
# --------------------------------------------------------

How can I autmatically start my snmpd.service ?

kind regards,
Bart

You can add something like this to service definition to delay service start by 30 second.

ExecStartPre=/bin/sleep 30

Btw you con use following to check the journalctl

journalctl -u snmpd

Is snmpd bound on a specific address or interface? Normally it should listen to udp:161 and udp6:161

Thanx!
That did the trick.

Changed

# agentaddress  127.0.0.1,192.168.4.86
agentaddress  udp:161

grtz
Bart Plessers