From 207c5498e718af25768f5de0655cb786c45e9fc0 Mon Sep 17 00:00:00 2001 From: Pierre Fersing Date: Thu, 14 Jul 2016 23:53:05 +0200 Subject: [PATCH] Remove systemd Install alias (#1470) Alias is a list of additional names. Adding it's cannonical name cause systemctl enable telegraf to show a warning "Too many levels of symbolic links" --- scripts/post-install.sh | 4 ++++ scripts/telegraf.service | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/post-install.sh b/scripts/post-install.sh index fb0b441e8..95045be1f 100644 --- a/scripts/post-install.sh +++ b/scripts/post-install.sh @@ -37,6 +37,10 @@ chmod 755 $LOG_DIR if [[ -L /etc/init.d/telegraf ]]; then rm -f /etc/init.d/telegraf fi +# Remove legacy symlink, if it exists +if [[ -L /etc/systemd/system/telegraf.service ]]; then + rm -f /etc/systemd/system/telegraf.service +fi # Add defaults file, if it doesn't exist if [[ ! -f /etc/default/telegraf ]]; then diff --git a/scripts/telegraf.service b/scripts/telegraf.service index a7824c9a7..81c9b5408 100644 --- a/scripts/telegraf.service +++ b/scripts/telegraf.service @@ -15,4 +15,3 @@ KillMode=control-group [Install] WantedBy=multi-user.target -Alias=telegraf.service