Allow setting environment variables for services (#312)
Setting environment variables for services running with systemd, OSx or windows
This commit is contained in:
@@ -318,6 +318,10 @@ StandardError=file:/var/log/{{.Name}}.err
|
||||
RestartSec=120
|
||||
EnvironmentFile=-/etc/sysconfig/{{.Name}}
|
||||
|
||||
{{range $k, $v := .EnvVars -}}
|
||||
Environment={{$k}}={{$v}}
|
||||
{{end -}}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user