What is the most correct way to add arbitrary commands to start or stop services, or execute other actions, when there are CARP status changes? I'm used to doing this in Linux using UCARP, so have the general hang of it. But I'm unacquainted with how BSD, and particularly OPNsense, are set up for this. I'm especially interested in doing it so as to coordinate with, but not get clobbered by, configuration actions taken through the OPNsense web UI. There's likely to be a clean and proper way to do this. Has anyone explored it?
There is no clean and proper way, you have to script around. Just have a look at the FRR plugin, it has a mechanism like this https://github.com/opnsense/plugins/tree/master/net/frr/src/etc
> There is no clean and proper way
Well, the clean and proper way *is* https://docs.opnsense.org/development/backend/autorun.html#syshook although you will have to script your way through it according to existing scripts like with FRR or OpenVPN.
Cheers,
Franco
Thanks Franco,
Exactly what I need to know.