Add support for multiple env files for systemd unit

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/3282/head
Brad Davidson 2021-05-14 13:51:15 -07:00 committed by Brad Davidson
parent fd4d226e3d
commit c824c3bcc1
2 changed files with 5 additions and 1 deletions

View File

@ -728,7 +728,9 @@ WantedBy=multi-user.target
[Service]
Type=${SYSTEMD_TYPE}
EnvironmentFile=${FILE_K3S_ENV}
EnvironmentFile=-/etc/default/%N
EnvironmentFile=-/etc/sysconfig/%N
EnvironmentFile=-${FILE_K3S_ENV}
KillMode=process
Delegate=yes
# Having non-zero Limit*s causes performance problems due to accounting overhead

View File

@ -6,6 +6,8 @@ Wants=network-online.target
[Service]
Type=notify
EnvironmentFile=-/etc/default/%N
EnvironmentFile=-/etc/sysconfig/%N
EnvironmentFile=-/etc/systemd/system/k3s.service.env
ExecStart=/usr/local/bin/k3s server
KillMode=process