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/pods.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/pods.go')
-rw-r--r-- | pkg/systemd/generate/pods.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go index 367b8381f..1bd0c7bce 100644 --- a/pkg/systemd/generate/pods.go +++ b/pkg/systemd/generate/pods.go @@ -82,9 +82,7 @@ ExecStartPre={{.ExecStartPre2}} {{- end}} ExecStart={{.ExecStart}} ExecStop={{.ExecStop}} -{{- if .ExecStopPost}} ExecStopPost={{.ExecStopPost}} -{{- end}} PIDFile={{.PIDFile}} KillMode=none Type=forking @@ -236,6 +234,7 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions) info.EnvVariable = EnvVariable info.ExecStart = "{{.Executable}} start {{.InfraNameOrID}}" info.ExecStop = "{{.Executable}} stop {{if (ge .StopTimeout 0)}}-t {{.StopTimeout}}{{end}} {{.InfraNameOrID}}" + info.ExecStopPost = "{{.Executable}} stop {{if (ge .StopTimeout 0)}}-t {{.StopTimeout}}{{end}} {{.InfraNameOrID}}" // Assemble the ExecStart command when creating a new pod. // |