naemon / naemon-core

Networks, Applications and Event Monitor
http://www.naemon.io/
GNU General Public License v2.0
154 stars 63 forks source link

systemd-tmpfiles-clean.service reports legacy directory /var/run/naemon #409

Closed midnight-run closed 1 year ago

midnight-run commented 1 year ago

Hello

this should be changed in a future version of naemon-core: systemd-tmpfiles[2111098]: [/usr/lib/tmpfiles.d/naemon.conf:1] Line references path below legacy directory /var/run/, updating /var/run/naemon → /run/naemon; please update the tmpfiles.d/ drop-in file accordingly.

naemon-core version 1.4 on Red Hat Enterprise Linux 8/(9) (Systemd version systemd-239 and above)

$ systemctl restart systemd-tmpfiles-clean.service $ tail messages daemon.info systemd[1]: Stopped User Manager for UID 0. daemon.info systemd[1]: Stopping User runtime directory /run/user/0... daemon.info systemd[1]: run-user-0.mount: Succeeded. daemon.info systemd[1]: user-runtime-dir@0.service: Succeeded. daemon.info systemd[1]: Stopped User runtime directory /run/user/0. daemon.info systemd[1]: Removed slice User Slice of UID 0. daemon.info systemd[1]: Starting Cleanup of Temporary Directories... daemon.notice systemd-tmpfiles[2111098]: [/usr/lib/tmpfiles.d/naemon.conf:1] Line references path below legacy directory /var/run/, updating /var/run/naemon → /run/naemon; please update the tmpfiles.d/ drop-in file accordingly. daemon.info systemd[1]: systemd-tmpfiles-clean.service: Succeeded. daemon.info systemd[1]: Started Cleanup of Temporary Directories.

$ cat /usr/lib/tmpfiles.d/naemon.conf D /var/run/naemon 0755 naemon naemon - r /var/cache/naemon/checkresults/* 0644 naemon naemon 1d

sni commented 1 year ago

thanks for the report. I'd like to avoid having separate packaging configuration for each rhel release. Do you know if this change would be backwards compatible with rhel7?

midnight-run commented 1 year ago

yes it works for rhel7 as well.

midnight-run commented 1 year ago

and set pidfile lockfile to /run/naemon/naemon.pid instead of /var/run/naemon/naemon.pid (definition for @lockfile@)

sni commented 1 year ago

That's great. Could you put that into a PR request please?

midnight-run commented 1 year ago

410 @sni

midnight-run commented 1 year ago

thanks for this fast merge of my #410 - great job