From 386ccdd61e8256c8b21ee27ee2fc12438fc5ca98 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 17 Oct 2023 11:30:20 +0200 Subject: Adding upstream version 1.43.0. Signed-off-by: Daniel Baumann --- packaging/installer/netdata-uninstaller.sh | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'packaging/installer/netdata-uninstaller.sh') diff --git a/packaging/installer/netdata-uninstaller.sh b/packaging/installer/netdata-uninstaller.sh index 419002e6a..2f9fc91f9 100755 --- a/packaging/installer/netdata-uninstaller.sh +++ b/packaging/installer/netdata-uninstaller.sh @@ -158,7 +158,7 @@ create_tmp_directory() { fi fi - mktemp -d -t netdata-kickstart-XXXXXXXXXX + mktemp -d -t netdata-uninstaller-XXXXXXXXXX } tmpdir="$(create_tmp_directory)" @@ -725,25 +725,32 @@ rm_file /usr/lib/systemd/system/netdata-updater.service rm_file /etc/systemd/system/netdata-updater.timer rm_file /lib/systemd/system/netdata-updater.timer rm_file /usr/lib/systemd/system/netdata-updater.timer +rm_file /usr/lib/systemd/system-preset/50-netdata.preset +rm_file /lib/systemd/system-preset/50-netdata.preset rm_file /etc/init.d/netdata rm_file /etc/periodic/daily/netdata-updater rm_file /etc/cron.daily/netdata-updater rm_file /etc/cron.d/netdata-updater -if [ -n "${NETDATA_PREFIX}" ] && [ -d "${NETDATA_PREFIX}" ]; then +if [ -n "${NETDATA_PREFIX}" ] && [ -d "${NETDATA_PREFIX}" ] && [ "netdata" = "$(basename "$NETDATA_PREFIX")" ] ; then rm_dir "${NETDATA_PREFIX}" else - rm_file "/usr/sbin/netdata" - rm_file "/usr/sbin/netdatacli" + rm_file "${NETDATA_PREFIX}/usr/sbin/netdata" + rm_file "${NETDATA_PREFIX}/usr/sbin/netdatacli" rm_file "/tmp/netdata-ipc" - rm_file "/usr/sbin/netdata-claim.sh" - rm_dir "/usr/share/netdata" - rm_dir "/usr/libexec/netdata" - rm_dir "/var/lib/netdata" - rm_dir "/var/cache/netdata" - rm_dir "/var/log/netdata" - rm_dir "/etc/netdata" + rm_file "/tmp/netdata-service-cmds" + rm_file "${NETDATA_PREFIX}/usr/sbin/netdata-claim.sh" + rm_dir "${NETDATA_PREFIX}/usr/share/netdata" + rm_dir "${NETDATA_PREFIX}/usr/libexec/netdata" + rm_dir "${NETDATA_PREFIX}/var/lib/netdata" + rm_dir "${NETDATA_PREFIX}/var/cache/netdata" + rm_dir "${NETDATA_PREFIX}/var/log/netdata" + rm_dir "${NETDATA_PREFIX}/etc/netdata" +fi + +if [ -n "${tmpdir}" ]; then + run rm -rf "${tmpdir}" || true fi FILE_REMOVAL_STATUS=1 -- cgit v1.2.3