From c9ad1da51c6b1aa7eb531a2f9951aa853bdea109 Mon Sep 17 00:00:00 2001 From: Ondra Machacek Date: Thu, 2 Dec 2021 13:44:35 +0100 Subject: Add restart-sec option to systemd generate Signed-off-by: Ondra Machacek --- pkg/api/handlers/libpod/generate.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/api/handlers/libpod/generate.go') diff --git a/pkg/api/handlers/libpod/generate.go b/pkg/api/handlers/libpod/generate.go index 1411c680e..88fd69d45 100644 --- a/pkg/api/handlers/libpod/generate.go +++ b/pkg/api/handlers/libpod/generate.go @@ -22,6 +22,7 @@ func GenerateSystemd(w http.ResponseWriter, r *http.Request) { NoHeader bool `schema:"noHeader"` TemplateUnitFile bool `schema:"templateUnitFile"` RestartPolicy *string `schema:"restartPolicy"` + RestartSec uint `schema:"restartSec"` StopTimeout uint `schema:"stopTimeout"` StartTimeout uint `schema:"startTimeout"` ContainerPrefix string `schema:"containerPrefix"` @@ -53,6 +54,7 @@ func GenerateSystemd(w http.ResponseWriter, r *http.Request) { ContainerPrefix: query.ContainerPrefix, PodPrefix: query.PodPrefix, Separator: query.Separator, + RestartSec: &query.RestartSec, } report, err := containerEngine.GenerateSystemd(r.Context(), utils.GetName(r), options) -- cgit v1.2.3-54-g00ecf