Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
19.7 Legacy Series
»
Adding arbitrary actions to CARP scripting
« previous
next »
Print
Pages: [
1
]
Author
Topic: Adding arbitrary actions to CARP scripting (Read 2453 times)
whit
Newbie
Posts: 35
Karma: 1
Adding arbitrary actions to CARP scripting
«
on:
September 20, 2019, 07:57:04 pm »
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?
Logged
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: Adding arbitrary actions to CARP scripting
«
Reply #1 on:
September 21, 2019, 07:22:49 am »
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
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
franco
Administrator
Hero Member
Posts: 17660
Karma: 1611
Re: Adding arbitrary actions to CARP scripting
«
Reply #2 on:
September 23, 2019, 10:11:58 am »
> 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
Logged
whit
Newbie
Posts: 35
Karma: 1
Re: Adding arbitrary actions to CARP scripting
«
Reply #3 on:
September 23, 2019, 04:21:13 pm »
Thanks Franco,
Exactly what I need to know.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
19.7 Legacy Series
»
Adding arbitrary actions to CARP scripting