mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
systemd generate: allow manual restart of container units in pods
Allow manual restarts of container units that are part of a pod. This allows for configuring these containers for auto updates. Fixes: #6770 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
@ -69,8 +69,6 @@ type containerInfo struct {
|
|||||||
|
|
||||||
const containerTemplate = headerTemplate + `
|
const containerTemplate = headerTemplate + `
|
||||||
{{- if .BoundToServices}}
|
{{- if .BoundToServices}}
|
||||||
RefuseManualStart=yes
|
|
||||||
RefuseManualStop=yes
|
|
||||||
BindsTo={{- range $index, $value := .BoundToServices -}}{{if $index}} {{end}}{{ $value }}.service{{end}}
|
BindsTo={{- range $index, $value := .BoundToServices -}}{{if $index}} {{end}}{{ $value }}.service{{end}}
|
||||||
After={{- range $index, $value := .BoundToServices -}}{{if $index}} {{end}}{{ $value }}.service{{end}}
|
After={{- range $index, $value := .BoundToServices -}}{{if $index}} {{end}}{{ $value }}.service{{end}}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
@ -88,8 +88,6 @@ Description=Podman container-foobar.service
|
|||||||
Documentation=man:podman-generate-systemd(1)
|
Documentation=man:podman-generate-systemd(1)
|
||||||
Wants=network.target
|
Wants=network.target
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
RefuseManualStart=yes
|
|
||||||
RefuseManualStop=yes
|
|
||||||
BindsTo=a.service b.service c.service pod.service
|
BindsTo=a.service b.service c.service pod.service
|
||||||
After=a.service b.service c.service pod.service
|
After=a.service b.service c.service pod.service
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user