OPNsense Forum
English Forums => Development and Code Review => Topic started by: SimpleRezo on November 26, 2019, 01:47:45 am
-
Hi
I working on an internal plugin for OPNSense (using MVC).
I have a small question: how can I run some code from my plugin everytime configd is started/restarted?
Thanks for your help!
-
Template generation runs everytime it starts. What exactly do you want to achieve?
-
I need to do some different "auto-init" of the plugin (after installation), and also, I want to notify a webhook of that event.
In brief, i need to run some code when configd is started/restarted :)
And with template generation, I don't see how I can do that since it's only producing files ...
-
https://github.com/opnsense/plugins/blob/master/sysutils/apuled/+POST_INSTALL
-
Q2: notifications on service starts are AFAIK not possible.
-
https://github.com/opnsense/plugins/blob/master/sysutils/apuled/+POST_INSTALL
Oh yeah, i didn't think about that option. Of course, it's not enough for what I want, but it helps, thank you.
(I will also use a basic rc.d script also for OS reboot)