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
Message-Id: 38613997-f911-0c4d-7cd4-0b50bdb720e6@youngman.org.uk
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.
3
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.
6
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.
11
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?
14
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.
20
21 Cheers,
22 Wol

Replies

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>