CARP maintenance mode via command line / API

Started by vielhak, August 04, 2022, 08:23:09 AM

Previous topic - Next topic
Hi there,

is there a way to enter/leave the carp maintenance mode via command line or API? I would like to automate some things and did not find anything in the docs or the forum.

best regards,
Torsten

Hi,

there is a way via CLI:
$ configctl interface carp_set_status maintenance

This toggles the maintenance mode on / off, depending on the previous state.

If you want to find out more about the options of this command, look at /usr/local/opnsense/scripts/interfaces/carp_set_status.php .

Best regards,
Ian