

10·
1 year agoYou can use RequiresMountsFor=
(eg RequiresMountsFor=/media/storage-volume1
) instead of manually adding .mount
to After
/Requires
- you can then use .mount
files or fstab as you're stipulating the path rather than a potentially changeable systemd unit name.
The systemd.mount manpage also strongly recommends using fstab for human added mount points over .mount
files.
Be aware you need to enable and start
podman-auto-update.timer
for this to work automatically (iesystemctl enable --now podman-auto-update.timer
), this command will just update the images once only.I don't think this works for non-system podman images, so you'd have to do
systemctl --user enable --now podman-auto-update.timer
for each user.