[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: override logrotate.timer from another package?



On Tue, 4 Jul 2023 11:09:18 +0200
Harald Dunkel <harald.dunkel@aixigo.com> wrote:

> I had added
> 
> 	etc/systemd/system/logrotate.timer.d/hourly.conf
> 
> to the package install file, but at upgrade time it complained
> that nobody ran systemctl daemon-reload. Ain't this the job of
> the DEBHELPER macro in the postinst script?

No, it is not. You must do it manually, once you've made all the
changes you plan to make. Systemd is pretty powerful, but it doesn't
read your mind.

> 
> Should this file be installed in /lib/systemd/system/logrotate.timer.d
> instead, using dh_installsystemd ?

No. All changes the local administrator makes should go under
/etc/systemd because you risk updates over-writing things in
/lib/systemd and elsewhere.

As for dh_installsystemd, the first paragraph of the man page for it
says,

       dh_installsystemd is a debhelper program that is responsible for
       installing package maintainer supplied systemd unit files.

Are you doing this as a package maintainer?

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/


Reply to: