Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
33
scripts/deb/post-remove.sh
Normal file
33
scripts/deb/post-remove.sh
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
function disable_systemd {
|
||||
systemctl disable telegraf
|
||||
rm -f $1
|
||||
}
|
||||
|
||||
function disable_update_rcd {
|
||||
update-rc.d -f telegraf remove
|
||||
rm -f /etc/init.d/telegraf
|
||||
}
|
||||
|
||||
function disable_chkconfig {
|
||||
chkconfig --del telegraf
|
||||
rm -f /etc/init.d/telegraf
|
||||
}
|
||||
|
||||
if [ "$1" == "remove" -o "$1" == "purge" ]; then
|
||||
# Remove/purge
|
||||
rm -f /etc/default/telegraf
|
||||
|
||||
if [[ "$(readlink /proc/1/exe)" == */systemd ]]; then
|
||||
disable_systemd /lib/systemd/system/telegraf.service
|
||||
else
|
||||
# Assuming sysv
|
||||
# Run update-rc.d or fallback to chkconfig if not available
|
||||
if which update-rc.d &>/dev/null; then
|
||||
disable_update_rcd
|
||||
else
|
||||
disable_chkconfig
|
||||
fi
|
||||
fi
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue