Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Writing custom daemon, where should it go?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Writing custom daemon, where should it go? (Read 2284 times)
ggoodrich
Newbie
Posts: 3
Karma: 0
Writing custom daemon, where should it go?
«
on:
February 23, 2021, 06:00:28 pm »
I am writing a custom daemon in C that will interact with specific hardware we are using to run OPNsense. I think I can figure out how to create a plugin to manage the daemon, but I'm not certain how to go about adding the daemon itself to OPNsense. Would this go into the ports area? How would I get the daemon installed? Can the plugin install it? Any guidance is greatly appreciated. I have the daemon written, and tested on the specific hardware, but am not sure how to maintain it within the OPNsense ecosystem. Thanks.
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Writing custom daemon, where should it go?
«
Reply #1 on:
February 24, 2021, 10:27:18 am »
The main questions are:
1. Is it useful for others
2. Is it open source
3. How much work are you willing to do if 1. and 2. are true
The answer depends on these
Cheers,
Franco
Logged
ggoodrich
Newbie
Posts: 3
Karma: 0
Re: Writing custom daemon, where should it go?
«
Reply #2 on:
February 24, 2021, 04:16:11 pm »
It is not likely to be useful to others, as it is for a very specific 1U device with a small LCD and some buttons and LEDs. The daemon is around controlling these in conjunction with the device running OPNsense. It also may not end up being open source, though I do not know that yet for certain.
It appears as if I can create a 'package' within the ports (maybe in a fork?) that will pull this in, assuming I have the code/app somewhere in an accessible location? I've really not dealt with things outside the plugins, to be honest. My supervisor is pushing me to commit the binary exe to the plugin repo, but I'd rather not do it that way unless I have no other good options.
Logged
ggoodrich
Newbie
Posts: 3
Karma: 0
Re: Writing custom daemon, where should it go?
«
Reply #3 on:
February 24, 2021, 05:02:52 pm »
After further investigation, maybe the correct path is to create a plugin that installs an extra repo, like the SunnyValley vendor plugin does. Then I can have another plugin within our repo that contains everything needed, including the binary for the daemon, as well as any UI/config code. Does this make sense?
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Writing custom daemon, where should it go?