summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/entities/generate.go6
-rw-r--r--pkg/domain/infra/tunnel/generate.go12
2 files changed, 17 insertions, 1 deletions
diff --git a/pkg/domain/entities/generate.go b/pkg/domain/entities/generate.go
index e431a70af..73dd64ecd 100644
--- a/pkg/domain/entities/generate.go
+++ b/pkg/domain/entities/generate.go
@@ -26,6 +26,12 @@ type GenerateSystemdOptions struct {
NoHeader bool
// TemplateUnitFile - make use of %i and %I to differentiate between the different instances of the unit
TemplateUnitFile bool
+ // Wants - systemd wants list for the container or pods
+ Wants []string
+ // After - systemd after list for the container or pods
+ After []string
+ // Requires - systemd requires list for the container or pods
+ Requires []string
}
// GenerateSystemdReport
diff --git a/pkg/domain/infra/tunnel/generate.go b/pkg/domain/infra/tunnel/generate.go
index 49b66e908..235d478ec 100644
--- a/pkg/domain/infra/tunnel/generate.go
+++ b/pkg/domain/infra/tunnel/generate.go
@@ -8,7 +8,17 @@ 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).WithTemplateUnitFile(opts.TemplateUnitFile).WithPodPrefix(opts.PodPrefix).WithSeparator(opts.Separator)
+ options := new(
+ generate.SystemdOptions).
+ WithUseName(opts.Name).
+ WithContainerPrefix(opts.ContainerPrefix).
+ WithNew(opts.New).WithNoHeader(opts.NoHeader).
+ WithTemplateUnitFile(opts.TemplateUnitFile).
+ WithPodPrefix(opts.PodPrefix).
+ WithSeparator(opts.Separator).
+ WithWants(opts.Wants).
+ WithAfter(opts.After).
+ WithRequires(opts.Requires)
if opts.StartTimeout != nil {
options.WithStartTimeout(*opts.StartTimeout)