diff options
author | Ed Santiago <santiago@redhat.com> | 2021-10-07 08:10:41 -0600 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2021-10-12 07:57:26 -0600 |
commit | 69b66599609c6513de8d72c45fe327312b0b81ac (patch) | |
tree | 0b853ab073495cd8f779da80250cc716b90c54f4 /contrib/systemd/auto-update/podman-auto-update.service.in | |
parent | 2fcec59445267e8c8e06005539701a172d3db8a5 (diff) | |
download | podman-69b66599609c6513de8d72c45fe327312b0b81ac.tar.gz podman-69b66599609c6513de8d72c45fe327312b0b81ac.tar.bz2 podman-69b66599609c6513de8d72c45fe327312b0b81ac.zip |
Unit files: Use actual installed path for podman
Don't hardcode /usr/bin/podman in unit files: instead, use
template files with a path replaced at install time.
Because 'make' can be invoked repeatedly, with different
PREFIX, do not leave the generated files behind in our
work directory: wipe them immediately after install.
To get this to work, fix a longstanding bug in podman.spec.in,
a PREFIX that should've been DESTDIR.
Side note: #7023 made contrib/systemd/user a symlink
to .../system but did not update paths in Makefile.
The unrelated-looking path change you see here is
a belated correction for that.
Fixes: #10787
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'contrib/systemd/auto-update/podman-auto-update.service.in')
-rw-r--r-- | contrib/systemd/auto-update/podman-auto-update.service.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/systemd/auto-update/podman-auto-update.service.in b/contrib/systemd/auto-update/podman-auto-update.service.in new file mode 100644 index 000000000..de4460d60 --- /dev/null +++ b/contrib/systemd/auto-update/podman-auto-update.service.in @@ -0,0 +1,13 @@ +[Unit] +Description=Podman auto-update service +Documentation=man:podman-auto-update(1) +Wants=network-online.target +After=network-online.target + +[Service] +Type=oneshot +ExecStart=@@PODMAN@@ auto-update +ExecStartPost=@@PODMAN@@ image prune -f + +[Install] +WantedBy=multi-user.target default.target |