mirror of
https://github.com/containers/podman.git
synced 2025-08-02 01:09:21 +08:00

Handle custom restart policies of containers when generating the unit files; those should be set on the unit level and removed from ExecStart flags. Fixes: #11438 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
15 lines
477 B
Go
15 lines
477 B
Go
package define
|
|
|
|
const (
|
|
// Default restart policy for generated unit files.
|
|
DefaultRestartPolicy = "on-failure"
|
|
|
|
// EnvVariable "PODMAN_SYSTEMD_UNIT" is set in all generated systemd units and
|
|
// is set to the unit's (unique) name.
|
|
EnvVariable = "PODMAN_SYSTEMD_UNIT"
|
|
)
|
|
|
|
// RestartPolicies includes all valid restart policies to be used in a unit
|
|
// file.
|
|
var RestartPolicies = []string{"no", "on-success", "on-failure", "on-abnormal", "on-watchdog", "on-abort", "always"}
|