Gentoo Archives: gentoo-user

From: antlists <antlists@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: [gentoo-user] systemd boot timer
Date: Fri, 01 Oct 2021 20:37:08
1 I'm trying to get a systemd unit to fire on boot once a week. Reading up
2 on timer units, I can't work out how to get it to work.
4 This is tied up with my earlier systemd mount post - I've now got that
5 sorted - I've got dm-integrity to fire before fstab.
7 I now want to run lvm snapshot on the first boot of the weekend. Writing
8 a unit to do the snapshot seems pretty easy, but obviously I don't want
9 it firing every boot, if I stick the date in the volume name I don't
10 want it colliding with an earlier run the same day, etc etc.
12 The question really is - if I have a weekly timer fire and activate the
13 unit, is the activation going to survive the reboot to run on the next boot?
15 The problem I'm having is that all the stuff I've seen about timers says
16 you have two lines - activate on Saturdays, and activate on boot. Snag
17 is, they seem to be independent such that EITHER condition will activate
18 the service. As I say, I want BOTH. I don't want the service running
19 while the system is up and running.
21 Cheers,
22 Wol


Subject Author
Re: [gentoo-user] systemd boot timer "Canek Peláez Valdés" <caneko@×××××.com>
Re: [gentoo-user] systemd boot timer Rich Freeman <rich0@g.o>