diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-07 15:51:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-07 15:51:41 +0200 |
commit | 8a55363b80a012b6c6e774957ac477d0fd540a5e (patch) | |
tree | 97baa90a5f4364ff6731921649441407625fecd7 /pkg/domain/infra/tunnel/generate.go | |
parent | c20227bd16cae98247955b14f6dfea33a26c6a0b (diff) | |
parent | d1573b95e3427efae21da784e3112c5fb3d463fb (diff) | |
download | podman-8a55363b80a012b6c6e774957ac477d0fd540a5e.tar.gz podman-8a55363b80a012b6c6e774957ac477d0fd540a5e.tar.bz2 podman-8a55363b80a012b6c6e774957ac477d0fd540a5e.zip |
Merge pull request #11459 from vrothberg/fix-11438
generate systemd: handle --restart
Diffstat (limited to 'pkg/domain/infra/tunnel/generate.go')
-rw-r--r-- | pkg/domain/infra/tunnel/generate.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/domain/infra/tunnel/generate.go b/pkg/domain/infra/tunnel/generate.go index 3d3cd52be..9f69abb1a 100644 --- a/pkg/domain/infra/tunnel/generate.go +++ b/pkg/domain/infra/tunnel/generate.go @@ -9,7 +9,10 @@ import ( func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string, opts entities.GenerateSystemdOptions) (*entities.GenerateSystemdReport, error) { options := new(generate.SystemdOptions).WithUseName(opts.Name).WithContainerPrefix(opts.ContainerPrefix).WithNew(opts.New).WithNoHeader(opts.NoHeader) - options.WithPodPrefix(opts.PodPrefix).WithRestartPolicy(opts.RestartPolicy).WithSeparator(opts.Separator) + options.WithPodPrefix(opts.PodPrefix).WithSeparator(opts.Separator) + if opts.RestartPolicy != nil { + options.WithRestartPolicy(*opts.RestartPolicy) + } if to := opts.StopTimeout; to != nil { options.WithStopTimeout(*opts.StopTimeout) } |