Update netdata.sh

tweak
This commit is contained in:
tteckster 2023-12-10 14:49:24 -05:00 committed by GitHub
parent 4876578504
commit 76b26b030e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,20 +25,20 @@ while true; do
esac esac
done done
useradd -r -s /bin/false netdata curl -sSL --fail --connect-timeout 10 --retry 3 -o /root/netdata-repo-edge_2-1+debian12_all.deb https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo-edge_2-1+debian12_all.deb
curl -fsSL https://repo.netdata.cloud/netdatabot.gpg.key >/usr/share/keyrings/netdata.gpg
cat <<EOF >/etc/apt/sources.list.d/netdata.list cat <<EOF >/etc/apt/sources.list.d/netdata.list
deb http://repo.netdata.cloud/repos/stable/debian/ bookworm/ deb http://repo.netdata.cloud/repos/stable/debian/ bookworm/
deb http://repo.netdata.cloud/repos/repoconfig/debian/ bookworm/ deb http://repo.netdata.cloud/repos/repoconfig/debian/ bookworm/
EOF EOF
rm -rf /etc/apt/sources.list.d/netdata-edge.list
apt-get update && apt-get -y upgrade apt-get update && apt-get -y upgrade
apt-get install -y netdata apt-get install -y netdata
echo -e "\nInstalled NetData (http://$(hostname -I | awk '{print $1}'):19999)\n" echo -e "\nInstalled NetData (http://$(hostname -I | awk '{print $1}'):19999)\n"
} }
uninstall() { uninstall() {
apt remove -y netdata --purge apt purge -y netdata netdata-core
rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/apt/sources.list.d/netdata.list rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/apt/sources.list.d/netdata.list /usr/share/keyrings/netdata.gpg
apt autoremove -y apt autoremove -y
userdel netdata userdel netdata
echo -e "\nRemoved NetData from Proxmox VE\n" echo -e "\nRemoved NetData from Proxmox VE\n"