Trigger action on CARP status change
-
Hi
I'm setting up 2 pfSense instances with HA in a cloud environment but I cannot link my public IP address to the CARP vIP.
I'm searching a way to execute a script when one of the pfSense became master to redirect my public IP to this instance trough my provider's API.I found this thread that I can add entry to /etc/devd.conf.
Is it a proper way to do that with actual version (2.4.2)? -
You can edit your changes into /etc/rc.carpbackup and /etc/rc.carpmaster, or if you want to get fancier there is a plugin infrastructure you could use to write your code into a simple package xml to have it triggered automatically.
-
Thanks for your answer.
I've added a line in /etc/rc.carpmaster to execute my script and it's working well but I notice that /etc/rc.carpmaster was overwritten during last update.
The second method could be more stable but I'm not familiar with pfSense package, is there any doc about package structure?