Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Plugin developpement - Question
« previous
next »
Print
Pages: [
1
]
Author
Topic: Plugin developpement - Question (Read 3443 times)
SimpleRezo
Newbie
Posts: 37
Karma: 1
Plugin developpement - Question
«
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!
Logged
Clément - SimpleRezo
RMM for OPNsense:
https://srbox.simplerezo.com/
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: Plugin developpement - Question
«
Reply #1 on:
November 26, 2019, 05:46:24 am »
Template generation runs everytime it starts. What exactly do you want to achieve?
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
SimpleRezo
Newbie
Posts: 37
Karma: 1
Re: Plugin developpement - Question
«
Reply #2 on:
November 29, 2019, 12:05:10 am »
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 ...
«
Last Edit: November 29, 2019, 12:07:16 am by SimpleRezo
»
Logged
Clément - SimpleRezo
RMM for OPNsense:
https://srbox.simplerezo.com/
fabian
Moderator
Hero Member
Posts: 2769
Karma: 200
OPNsense Contributor (Language, VPN, Proxy, etc.)
Re: Plugin developpement - Question
«
Reply #3 on:
November 29, 2019, 06:41:44 am »
https://github.com/opnsense/plugins/blob/master/sysutils/apuled/+POST_INSTALL
Logged
fabian
Moderator
Hero Member
Posts: 2769
Karma: 200
OPNsense Contributor (Language, VPN, Proxy, etc.)
Re: Plugin developpement - Question
«
Reply #4 on:
November 29, 2019, 06:43:20 am »
Q2: notifications on service starts are AFAIK not possible.
Logged
SimpleRezo
Newbie
Posts: 37
Karma: 1
Re: Plugin developpement - Question
«
Reply #5 on:
November 29, 2019, 11:20:04 am »
Quote from: fabian on November 29, 2019, 06:41:44 am
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)
Logged
Clément - SimpleRezo
RMM for OPNsense:
https://srbox.simplerezo.com/
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Plugin developpement - Question