From b7541e7698479311e7b22b7d7bbb5a3d144e6785 Mon Sep 17 00:00:00 2001 From: Michele Degges Date: Fri, 21 Jan 2022 13:43:21 -0800 Subject: [PATCH 1/3] Add missing consul.env file for linux packaging --- .release/linux/package/etc/consul.d/consul.env | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .release/linux/package/etc/consul.d/consul.env diff --git a/.release/linux/package/etc/consul.d/consul.env b/.release/linux/package/etc/consul.d/consul.env new file mode 100644 index 000000000..e69de29bb From bc776aa258ad99a6e69dc4bc5b28663254908b40 Mon Sep 17 00:00:00 2001 From: Michele Degges Date: Mon, 24 Jan 2022 12:13:14 -0800 Subject: [PATCH 2/3] Don't kill service if envfile isn't present --- .release/linux/package/usr/lib/systemd/system/consul.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.release/linux/package/usr/lib/systemd/system/consul.service b/.release/linux/package/usr/lib/systemd/system/consul.service index bde1210aa..1bbf51a7a 100644 --- a/.release/linux/package/usr/lib/systemd/system/consul.service +++ b/.release/linux/package/usr/lib/systemd/system/consul.service @@ -6,7 +6,7 @@ After=network-online.target ConditionFileNotEmpty=/etc/consul.d/consul.hcl [Service] -EnvironmentFile=/etc/consul.d/consul.env +EnvironmentFile=-/etc/consul.d/consul.env User=consul Group=consul ExecStart=/usr/bin/consul agent -config-dir=/etc/consul.d/ From 300ce7b8e7cf5fea9209a47a59884ae2ab6c8285 Mon Sep 17 00:00:00 2001 From: Michele Degges Date: Mon, 24 Jan 2022 12:32:22 -0800 Subject: [PATCH 3/3] Adding changelog entry --- .changelog/12176.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/12176.txt diff --git a/.changelog/12176.txt b/.changelog/12176.txt new file mode 100644 index 000000000..81e7f669d --- /dev/null +++ b/.changelog/12176.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +systemd: Support starting/stopping the systemd service for linux packages when the optional EnvironmentFile does not exist. +``` \ No newline at end of file