diff options
Diffstat (limited to 'pkg/systemd/generate/pods.go')
-rw-r--r-- | pkg/systemd/generate/pods.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go index ff8ce3a03..14b1b7a89 100644 --- a/pkg/systemd/generate/pods.go +++ b/pkg/systemd/generate/pods.go @@ -70,6 +70,8 @@ type podInfo struct { ExecStop string // ExecStopPost of the unit. ExecStopPost string + // Removes autogenerated by Podman and timestamp if set to true + GenerateNoHeader bool } const podTemplate = headerTemplate + `Requires={{{{- range $index, $value := .RequiredServices -}}}}{{{{if $index}}}} {{{{end}}}}{{{{ $value }}}}.service{{{{end}}}} @@ -319,6 +321,12 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions) if info.PodmanVersion == "" { info.PodmanVersion = version.Version.String() } + + if options.NoHeader { + info.GenerateNoHeader = true + info.GenerateTimestamp = false + } + if info.GenerateTimestamp { info.TimeStamp = fmt.Sprintf("%v", time.Now().Format(time.UnixDate)) } |