Currently, omd.service is created in /etc/systemd/system/, which is being overwritten everytime Checkmk is updated. Instead, the package should create the service in /usr/lib/systemd/system/, which will work exactly the same, except that if a service with the same name exists in /etc/systemd/system/, it will use that configuration instead. This allows us to customize the omd.service file without risking it being overwritten every update.
There is already a good explanation about the difference here:
There is a workaround: create a directory /etc/systemd/system/omd.service.d/ with *.conf files. Any parameter in there will overwrite whatever is in /etc/systemd/system/omd.service.
I think it is the intention that the installed unit file should be this with the highest precedence. Especially if you use the enterprise edition with agent bakery.
I would also say your workaround with the “omd.service.d” folder is the safest way to modify the unit file.
I’m happy to see this stirred up some good debate regarding the omd.service file location and the same about the Linux agent. Not a big priority since there is a workaround and this isn’t breaking in any way but would appreciate feedback on what is decided in the future.
Please put the files into the right place when installing.
But for “editing” systemd-units installed by a package I really suggest using “systemctl edit $unit”
which will create a drop-in.
When the maintainers add new stuff in their unit-file which are necessary for something and you just copied over the original file and edit it, the chances are higher that it breaks with future updates.
Only put completely new stuff into /etc/systemd/system that you created.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.