You are not logged in.
Pages: 1
Dear users,
I noticed that multiple convensions are used for timer targets. For example, the Logrotate, shadow and pkgstats timers are placed into multi-user.target, whereas systemd uses timers.target for timers such as systemd-tmpfiles-clean.timer. Which of the two targets should be used for custom timers? Shouldn't all timers be set to timers.target?
Kind regards,
Leonard
Offline
I've used timers.target for my custom timers, as that seemed to make sense. The various tutorials I've seen seem split between that and other targets. I also use calibre-installer from the AUR, which uses multi-user.target: https://aur.archlinux.org/packages/calibre-installer.
Offline
Not a Sysadmin issue, moving to NC...
Offline
I also use calibre-installer from the AUR, which uses multi-user.target: https://aur.archlinux.org/packages/calibre-installer.
I probably saw one of those other tutorials, then.
AFAIK it shouldn't really make a difference, multi-user.target is activated whenever the system is ready to accept logins and timers.target is pulled in by basic.target which means it starts slightly... before?
Unless you are doing something important while setting up the system, I don't *think* it matters, though given that I simply copy-pasted what I saw other people doing, I wouldn't take my words as gospel truth...
EDIT: And obviously, it is terribly unclean to do the wrong thing just because "it doesn't really make a difference".
Last edited by eschwartz (2016-05-19 19:38:33)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
I would simply follow the upstream recommendation to use timers.target unless you have a good reason not to. The use of multi-user.target probably persists/spreads through copy-paste.
And the man page says that unless DefaultDependencies= is set to false, a timer unit will implicitly have a dependency Before=timers.target.
Offline
I probably saw one of those other tutorials, then.
A much appreciated script, regardless of target.
Offline
Expanding on Eschwartz' answer, see here for an overview of what gets started when.
Upstream recommends using timer.target. As for Arch, there has been some discussion on the mailing list a while back on whether or not to follow that recommendation (I don't know if a decision has been made).
I'd say, if you think your timed service should only be available on a fully booted system, use multi-user.target (you probably have to mess with DefaultDependencies). If you want it to be started as soon as the basic boot process is finished, use timers.target. if you don't care, follow upstream (i.e. use timers.target).
My ship don't crash! She crashes, you crashed her!
Offline
Pages: 1