Add template support for generated unit files #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Allow users to provide their own
.servicefile template to override the built-in one.Use cases
[Unit]dependencies (Requires=,After=docker.service, etc.)Environment=,EnvironmentFile=)ExecStartPre/ExecStartPosthooksProposed config
Template uses Go
text/templatewith the sametemplateDatastruct already insystemd/generator.go. Built-in template is used as fallback if no custom template is set.Per-unit override
Also consider allowing per-unit template overrides:
With this feature we must have the ability to get all the variables we can use. maybe a list-variables command that lists the [variable name] and what it does and is for.