From a4fe5362edff8d225c6c2752a7da86103587c5a3 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 0000000000..e69de29bb2 From 282b662641ec74bd40e667ff63938c3e82c07618 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 bde1210aae..1bbf51a7a1 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 81a79a3595ec0569afe0704223c7585241aee08a 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 0000000000..81e7f669d3 --- /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