From c18ad2bfd9034fe6b80e3f33c076af731be6778b Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 18 Apr 2019 16:21:31 -0500 Subject: Generate systemd unit files for containers the podman generate systemd command will generate a systemd unit file based on the attributes of an existing container and user inputs. the command outputs the unit file to stdout for the user to copy or redirect. it is enabled for the remote client as well. users can set a restart policy as well as define a stop timeout override for the container. Signed-off-by: baude --- pkg/adapter/containers_remote.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg/adapter/containers_remote.go') diff --git a/pkg/adapter/containers_remote.go b/pkg/adapter/containers_remote.go index b7e353f71..201249fc3 100644 --- a/pkg/adapter/containers_remote.go +++ b/pkg/adapter/containers_remote.go @@ -956,3 +956,8 @@ func (r *LocalRuntime) Port(c *cliconfig.PortValues) ([]*Container, error) { } return containers, nil } + +// GenerateSystemd creates a systemd until for a container +func (r *LocalRuntime) GenerateSystemd(c *cliconfig.GenerateSystemdValues) (string, error) { + return iopodman.GenerateSystemd().Call(r.Conn, c.InputArgs[0], c.RestartPolicy, int64(c.StopTimeout), c.Name) +} -- cgit v1.2.3-54-g00ecf