From 732228fd159acbe9db2af849df24699317fee7d6 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Tue, 2 Feb 2021 17:18:38 +0900 Subject: [PATCH] systemd unit: make EnvironmentFile optional Previously, k3s.service was failing when the EnvironmentFile does not exist: ``` Feb 02 17:17:30 suda-ws01 systemd[1]: k3s.service: Failed to load environment files: No such file or directory Feb 02 17:17:30 suda-ws01 systemd[1]: k3s.service: Failed to run 'start' task: No such file or directory Feb 02 17:17:30 suda-ws01 systemd[1]: k3s.service: Failed with result 'resources'. Feb 02 17:17:30 suda-ws01 systemd[1]: Failed to start Lightweight Kubernetes. ``` ref: https://unix.stackexchange.com/questions/404199/documentation-of-equals-minus-in-systemd-unit-files Signed-off-by: Akihiro Suda --- k3s.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k3s.service b/k3s.service index 377e40560c8..fba6c190461 100644 --- a/k3s.service +++ b/k3s.service @@ -6,7 +6,7 @@ Wants=network-online.target [Service] Type=notify -EnvironmentFile=/etc/systemd/system/k3s.service.env +EnvironmentFile=-/etc/systemd/system/k3s.service.env ExecStart=/usr/local/bin/k3s server KillMode=process Delegate=yes