OPNsense Forum

English Forums => Development and Code Review => Topic started by: marcri on August 31, 2019, 09:32:16 am

Title: some questions about plugins
Post by: marcri on August 31, 2019, 09:32:16 am
Hi,

I try to create a package for check-mk-agent and need to create an inetd-service. How can I add the inetd-config to the system without interfering in any way with other inetd-configs? And how can I start inetd at boot? I don't want to break NAT reflection setups, NAT reflection rules seem to use inetd :-(

Is there a (correct) way to modify /etc/services and /etc/hosts.allow during installation of my plugin?

Thanks
Marc
Title: Re: some questions about plugins
Post by: mimugmail on September 01, 2019, 07:44:05 am
Are you really sure you need to edit files in /etc/? In BSD you normally edit them in /usr/local/etc/
Also there should be an include folder to drop configs for inetd .. but also there I'm unsure if this is really needed.

Do you use mk-livestatus package included or do you take one from the ports?
Title: Re: some questions about plugins
Post by: marcri on September 01, 2019, 08:54:15 am
I don't use any packages from cmk, I just took the agent (bash, freebsd) and modified it a little bit. One way to access the agent is by running it via inetd. On my linux servers I am accessing the agent via ssh-key, but I thing this is harder to implement of opnsense because opnsense has own mechanisms to modify authorized_keys, isn't it?

I will test now if creating these files under /usr/local/etc is enough...
Title: Re: some questions about plugins
Post by: mimugmail on September 01, 2019, 08:57:06 am
Did you try https://forum.opnsense.org/index.php?topic=11828.0
Title: Re: some questions about plugins
Post by: marcri on September 01, 2019, 09:20:28 am
I don't know what to try, I understand what they are doing, but I don't want to do all these steps after every opnsense update. I want to create a plugin which does all these steps for me.

btw, placing services, hosts.allow and inetd.conf in /usr/local/etc didn't work