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"
This commit is contained in:
Pierre Fersing 2016-07-14 23:53:05 +02:00 committed by Cameron Sparr
parent d5e7439343
commit 207c5498e7
2 changed files with 4 additions and 1 deletions

View File

@ -37,6 +37,10 @@ chmod 755 $LOG_DIR
if [[ -L /etc/init.d/telegraf ]]; then if [[ -L /etc/init.d/telegraf ]]; then
rm -f /etc/init.d/telegraf rm -f /etc/init.d/telegraf
fi 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 # Add defaults file, if it doesn't exist
if [[ ! -f /etc/default/telegraf ]]; then if [[ ! -f /etc/default/telegraf ]]; then

View File

@ -15,4 +15,3 @@ KillMode=control-group
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
Alias=telegraf.service