From 41db060fc0e392287fa312ac6a7b181dcca8ed2d Mon Sep 17 00:00:00 2001 From: A1EF Date: Sat, 8 Jul 2023 13:17:12 +0300 Subject: [PATCH] Change `Environment` to `EnvironmentFile` in systemd unit file --- debian/Makefile | 2 +- debian/confluent-kafka-rest | 1 + debian/confluent-kafka-rest.service | 2 +- debian/confluent-kafka-rest.spec.in | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 debian/confluent-kafka-rest diff --git a/debian/Makefile b/debian/Makefile index 8077ca16f0..81d345faa2 100644 --- a/debian/Makefile +++ b/debian/Makefile @@ -144,7 +144,7 @@ RPM_BUILDING/SOURCES/$(FULL_PACKAGE_TITLE)-$(RPM_VERSION).tar.gz: rpm-build-area rm -rf $(FULL_PACKAGE_TITLE)-$(RPM_VERSION) mkdir $(FULL_PACKAGE_TITLE)-$(RPM_VERSION) cp -R $(DESTDIR)/* $(FULL_PACKAGE_TITLE)-$(RPM_VERSION) - sed "s@##RPMVERSION##@$(RPM_VERSION)@g; s@##RPMRELEASE##@$(RPM_RELEASE_ID)@g" < debian/$(FULL_PACKAGE_TITLE).spec.in > $(FULL_PACKAGE_TITLE)-$(RPM_VERSION)/$(FULL_PACKAGE_TITLE).spec + sed "s@##RPMVERSION##@$(RPM_VERSION)@g; s@##RPMRELEASE##@$(RPM_RELEASE_ID)@g" < debian/$(FULL_PACKAGE_TITLE).spec.in > $(FULL_PACKAGE_TITLE)-$(RPM_VERSION)/$(FULL_PACKAGE_TITLE).spec rm -f $@ && tar -czf $@ $(FULL_PACKAGE_TITLE)-$(RPM_VERSION) rm -rf $(FULL_PACKAGE_TITLE)-$(RPM_VERSION) diff --git a/debian/confluent-kafka-rest b/debian/confluent-kafka-rest new file mode 100644 index 0000000000..90c5b270b5 --- /dev/null +++ b/debian/confluent-kafka-rest @@ -0,0 +1 @@ +LOG_DIR=/var/log/confluent/kafka-rest diff --git a/debian/confluent-kafka-rest.service b/debian/confluent-kafka-rest.service index f589b91d19..872d536e27 100644 --- a/debian/confluent-kafka-rest.service +++ b/debian/confluent-kafka-rest.service @@ -7,7 +7,7 @@ After=network.target confluent-kafka.target Type=simple User=cp-kafka-rest Group=confluent -Environment="LOG_DIR=/var/log/confluent/kafka-rest" +EnvironmentFile=-/etc/sysconfig/confluent-kafka-rest ExecStart=/usr/bin/kafka-rest-start /etc/kafka-rest/kafka-rest.properties LimitNOFILE=100000 TimeoutStopSec=180 diff --git a/debian/confluent-kafka-rest.spec.in b/debian/confluent-kafka-rest.spec.in index a0698a5bea..de11fb8f5b 100644 --- a/debian/confluent-kafka-rest.spec.in +++ b/debian/confluent-kafka-rest.spec.in @@ -92,6 +92,7 @@ fi /usr/share/doc/kafka-rest %config(noreplace) /etc/kafka-rest/* +%config(noreplace) /etc/sysconfig/confluent-kafka-rest %clean #used to cleanup things outside the build area and possibly inside.