OPNsense Forum

English Forums => High availability => Topic started by: vielhak on August 04, 2022, 08:23:09 am

Title: CARP maintenance mode via command line / API
Post by: vielhak on August 04, 2022, 08:23:09 am
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
Title: Re: CARP maintenance mode via command line / API
Post by: ianf on July 16, 2023, 09:47:38 pm
Hi,

there is a way via CLI:
Code: [Select]
$ 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