From 05a0bf7c07e53a3142fb4e6d1bb71e60ee16e5c9 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Tue, 3 Mar 2020 17:39:53 +0100 Subject: generate systemd: add network dependencies Add network dependencies to generated systemd services to allow for enabling them at system startup and have a working network if needed. Fixes: #4130 Signed-off-by: Valentin Rothberg --- pkg/systemd/generate/systemdgen.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/systemd/generate/systemdgen.go') diff --git a/pkg/systemd/generate/systemdgen.go b/pkg/systemd/generate/systemdgen.go index 404347828..999a65126 100644 --- a/pkg/systemd/generate/systemdgen.go +++ b/pkg/systemd/generate/systemdgen.go @@ -80,6 +80,8 @@ const containerTemplate = `# {{.ServiceName}}.service [Unit] Description=Podman {{.ServiceName}}.service Documentation=man:podman-generate-systemd(1) +Wants=network.target +After=network-online.target {{- if .BoundToServices}} RefuseManualStart=yes RefuseManualStop=yes -- cgit v1.2.3-54-g00ecf