I am setting up a new Opnsense box I want Monit to monitor Unbound DNS and automatically restart it if needed.
I went round and round with Gemini AI on how to get this working. We ended up with:
Service Settings:
PID file: /var/run/unbound.pid
Start: /usr/sbin/daemon -f /usr/local/sbin/pluginctl -s unbound start
Stop: /usr/local/sbin/pluginctl -s unbound stop
Which seems to work when paired with a Service Test Setting condition of "not exist".
Can I get a sanity check? Is this the standard way of restarting unbound if needed or did Gemini AI lead me into the weeds?
Source: r/opnsense · by /u/Scamp3D0g