diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-06-15 16:12:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-15 16:12:13 -0400 |
commit | b422a4eb49182f6b90dae9ed041546cc46cc59db (patch) | |
tree | c4dacae909dd97b1477a0e58ceec2913df3e585c /contrib | |
parent | 463a5a7db5b096f225324d9c2c40e40a47f6e7c2 (diff) | |
parent | 302b3084ebadb13a0b203eac63e24b0e5d3535a0 (diff) | |
download | podman-b422a4eb49182f6b90dae9ed041546cc46cc59db.tar.gz podman-b422a4eb49182f6b90dae9ed041546cc46cc59db.tar.bz2 podman-b422a4eb49182f6b90dae9ed041546cc46cc59db.zip |
Merge pull request #10595 from boaz0/closes_10539
Add podman-restart systemd unit file
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/spec/podman.spec.in | 2 | ||||
-rw-r--r-- | contrib/systemd/system/podman-restart.service | 12 | ||||
-rw-r--r-- | contrib/systemd/system/podman.service | 3 |
3 files changed, 17 insertions, 0 deletions
diff --git a/contrib/spec/podman.spec.in b/contrib/spec/podman.spec.in index 6146a2c0e..ef8523f8c 100644 --- a/contrib/spec/podman.spec.in +++ b/contrib/spec/podman.spec.in @@ -531,10 +531,12 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %{_unitdir}/podman-auto-update.timer %{_unitdir}/podman.service %{_unitdir}/podman.socket +%{_unitdir}/podman-restart.service %{_usr}/lib/systemd/user/podman.service %{_usr}/lib/systemd/user/podman.socket %{_usr}/lib/systemd/user/podman-auto-update.service %{_usr}/lib/systemd/user/podman-auto-update.timer +%{_usr}/lib/systemd/user/podman-restart.service %{_usr}/lib/tmpfiles.d/podman.conf %if 0%{?with_devel} diff --git a/contrib/systemd/system/podman-restart.service b/contrib/systemd/system/podman-restart.service new file mode 100644 index 000000000..baf12b3ae --- /dev/null +++ b/contrib/systemd/system/podman-restart.service @@ -0,0 +1,12 @@ +[Unit] +Description=Podman Start All Containers With Restart Policy Set To Always +Documentation=man:podman-start(1) +StartLimitIntervalSec=0 + +[Service] +Type=oneshot +Environment=LOGGING="--log-level=info" +ExecStart=/usr/bin/podman $LOGGING start --all --filter restart-policy=always + +[Install] +WantedBy=multi-user.target diff --git a/contrib/systemd/system/podman.service b/contrib/systemd/system/podman.service index 7e5195e7a..cefb13ae3 100644 --- a/contrib/systemd/system/podman.service +++ b/contrib/systemd/system/podman.service @@ -10,3 +10,6 @@ Type=exec KillMode=process Environment=LOGGING="--log-level=info" ExecStart=/usr/bin/podman $LOGGING system service + +[Install] +WantedBy=multi-user.target |