From f2d8e2e6a26ef9911f1d3dd454b1b00f07615901 Mon Sep 17 00:00:00 2001 From: Josh Powers Date: Tue, 12 Sep 2023 07:51:43 -0600 Subject: [PATCH 1/2] fix(packaging): Revert permission change on configs fixes: #13904 --- Makefile | 3 +-- scripts/deb/post-install.sh | 2 -- scripts/rpm/post-install.sh | 5 +---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 83a91b201340e..cf01a84a6954a 100644 --- a/Makefile +++ b/Makefile @@ -356,7 +356,7 @@ $(include_packages): --url https://github.com/influxdata/telegraf \ --license MIT \ --maintainer support@influxdb.com \ - --config-files /etc/telegraf/telegraf.conf.sample \ + --config-files /etc/telegraf/telegraf \ --config-files /etc/telegraf/telegraf.d/.ignore \ --config-files /etc/logrotate.d/telegraf \ --after-install scripts/rpm/post-install.sh \ @@ -472,7 +472,6 @@ windows_i386.zip windows_amd64.zip windows_arm64.zip: export EXEEXT := .exe %.deb: export localstatedir := /var %.rpm: export pkg := rpm %.rpm: export prefix := /usr -%.rpm: export conf_suffix := .sample %.rpm: export sysconfdir := /etc %.rpm: export localstatedir := /var %.tar.gz: export pkg := tar diff --git a/scripts/deb/post-install.sh b/scripts/deb/post-install.sh index 82134c7999a5f..544a726bd207f 100644 --- a/scripts/deb/post-install.sh +++ b/scripts/deb/post-install.sh @@ -44,8 +44,6 @@ fi # If 'telegraf.conf' is not present use package's sample (fresh install) if [[ ! -f /etc/telegraf/telegraf.conf ]] && [[ -f /etc/telegraf/telegraf.conf.sample ]]; then cp /etc/telegraf/telegraf.conf.sample /etc/telegraf/telegraf.conf - chmod 640 /etc/telegraf/telegraf.conf - chmod 750 /etc/telegraf/telegraf.d fi LOG_DIR=/var/log/telegraf diff --git a/scripts/rpm/post-install.sh b/scripts/rpm/post-install.sh index eef70044e5b6e..d26695863bc0b 100644 --- a/scripts/rpm/post-install.sh +++ b/scripts/rpm/post-install.sh @@ -20,11 +20,8 @@ if [[ ! -d /etc/telegraf/telegraf.d ]]; then fi # If 'telegraf.conf' is not present use package's sample (fresh install) -if [[ ! -f /etc/telegraf/telegraf.conf ]] && [[ ! -f /etc/telegraf/telegraf.conf.rpmnew ]] && - [[ ! -f /etc/telegraf/telegraf.conf.rpmsave ]] && [[ -f /etc/telegraf/telegraf.conf.sample ]]; then +if [[ ! -f /etc/telegraf/telegraf.conf ]] && [[ -f /etc/telegraf/telegraf.conf.sample ]]; then cp /etc/telegraf/telegraf.conf.sample /etc/telegraf/telegraf.conf - chmod 640 /etc/telegraf/telegraf.conf - chmod 750 /etc/telegraf/telegraf.d fi # Set up log directories From 0cded738b6c32d12e1f07a97bd7bad1ae5a860c4 Mon Sep 17 00:00:00 2001 From: Josh Powers Date: Tue, 12 Sep 2023 08:20:21 -0600 Subject: [PATCH 2/2] forgot extension --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cf01a84a6954a..7479404e27b1a 100644 --- a/Makefile +++ b/Makefile @@ -356,7 +356,7 @@ $(include_packages): --url https://github.com/influxdata/telegraf \ --license MIT \ --maintainer support@influxdb.com \ - --config-files /etc/telegraf/telegraf \ + --config-files /etc/telegraf/telegraf.conf \ --config-files /etc/telegraf/telegraf.d/.ignore \ --config-files /etc/logrotate.d/telegraf \ --after-install scripts/rpm/post-install.sh \