diff --git a/Makefile b/Makefile index 83a91b201340e..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.conf.sample \ + --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 \ @@ -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