diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-17 20:19:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 20:19:33 +0200 |
commit | 96b4421723eb2db0f15680477eaa7ae5f588e4b9 (patch) | |
tree | 82da6186cf9bfa9e91e51f158668ba5698766932 /pkg/systemd/generate/containers.go | |
parent | 6645e0d6f376b0dbd2bf82b3c708ceb20a6ad920 (diff) | |
parent | e5c3432944245a740ed443803c654dcc9c3757f0 (diff) | |
download | podman-96b4421723eb2db0f15680477eaa7ae5f588e4b9.tar.gz podman-96b4421723eb2db0f15680477eaa7ae5f588e4b9.tar.bz2 podman-96b4421723eb2db0f15680477eaa7ae5f588e4b9.zip |
Merge pull request #6641 from vrothberg/harden-units
generate systemd: `ExecStopPost` for all units
Diffstat (limited to 'pkg/systemd/generate/containers.go')
-rw-r--r-- | pkg/systemd/generate/containers.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/systemd/generate/containers.go b/pkg/systemd/generate/containers.go index 4180022cb..16ff0b821 100644 --- a/pkg/systemd/generate/containers.go +++ b/pkg/systemd/generate/containers.go @@ -83,9 +83,7 @@ ExecStartPre={{.ExecStartPre}} {{- end}} ExecStart={{.ExecStart}} ExecStop={{.ExecStop}} -{{- if .ExecStopPost}} ExecStopPost={{.ExecStopPost}} -{{- end}} PIDFile={{.PIDFile}} KillMode=none Type=forking @@ -170,6 +168,7 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst info.EnvVariable = EnvVariable info.ExecStart = "{{.Executable}} start {{.ContainerNameOrID}}" info.ExecStop = "{{.Executable}} stop {{if (ge .StopTimeout 0)}}-t {{.StopTimeout}}{{end}} {{.ContainerNameOrID}}" + info.ExecStopPost = "{{.Executable}} stop {{if (ge .StopTimeout 0)}}-t {{.StopTimeout}}{{end}} {{.ContainerNameOrID}}" // Assemble the ExecStart command when creating a new container. // |