Hi!
How possible to schedule the service (suricata) to be shutdown at certain time then restart it back at certain time?
Managed to update the drop-down option from "update IDS rules" to "reload IDS rules" which before this both showing "update IDS rules".
But, how to add another option in that drop-down menu such as start and stop function of suricata. Any idea?
Hi interkrome,
You can build your own configd actions to do so, development documentation is available here https://docs.opnsense.org/development/examples/helloworld.html?highlight=configd (https://docs.opnsense.org/development/examples/helloworld.html?highlight=configd)
For example, create a file here:
/usr/local/opnsense/service/conf/actions.d/actions_myactions.conf
Containing something like this:
[stop]
command:/usr/local/etc/rc.d/suricata stop
parameters:
type:script
message:reload suricata rules
description: stop suri
(when a description is available, you should be able to schedule the item from https://<your address>/ui/cron/ (https://<your%20address>/ui/cron/) )
Don't forget to restart configd after adding new templates:
service configd restart
Next test your action, using:
configctl myactions stop
Regards,
Ad
It works!
Thanks Ad!