Donimax / unraid-check-mk-agent

check-mk agent plugin for Unraid
12 stars 2 forks source link

xinet.d config for check mk #25

Closed ich777 closed 10 months ago

ich777 commented 10 months ago

Hi, can you please change how you create the config file for check mk?

I'm not a huge fan from this line in all your plugin files.

Maybe another idea would be to create a copy from the template that you ship with your packages and install it:

if [ ! -f "/etc/xinetd.d/check_mk" ]; then
  cp /etc/xinetd.d/xinetd-service-template.cfg /etc/xinetd.d/check_mk
fi

or even better include the correct named file in the package itself since this is a Unraid specific built package.

However have you already tested if you need the file at all that you pull down since you include xinetd-service-template.cfg in your package file and that should get read by xinetd anyways.

Cheers, Christoph

Donimax commented 10 months ago

Hey @ich777 I missed that during the installation of checkmk 2.1.0 and 2.2.0, the "xinetd-service-template" would be placed in the directory /etc/checkmk.

Is it alright if I change my pull down to this?

#Create check_mk xinetd file
if [ ! -f "/etc/xinetd.d/check_mk" ]; then
  cp /etc/check_mk/xinetd-service-template.cfg /etc/xinetd.d/check_mk
fi

Thanks Maximilian

ich777 commented 10 months ago

@Donimax no worries at all.

Is it alright if I change my pull down to this?

Sure thing. I just thought it would be better to copy or move the file instead of downloading it from GitHub since it's basically already built into the package.
However maybe it would be better to build the package with the correct file anyways since then this wouldn't be necessary at all.

Danke!

Donimax commented 10 months ago

I will include it in the package if I obsolete version 2.0.0. In version 2.0.0, the xinetd check_mk file is provided directly. Checkmk has modified it with 2.1.0 to offer solely the service template.