Compare commits

..

3 Commits

Author SHA1 Message Date
tteckster fb394e9e81
Update netdata.sh
tweak
2023-12-19 20:23:19 -05:00
tteckster 524e80e881
Update CHANGELOG.md 2023-12-19 20:17:36 -05:00
tteckster e441bdbad6
Create netdata.sh 2023-12-19 19:49:20 -05:00
2 changed files with 79 additions and 0 deletions

View File

@ -4,6 +4,13 @@
- All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. - All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
## 2023-12-19
### Changed
- **Proxmox VE Netdata**
- NEW Script
## 2023-12-10 ## 2023-12-10
### Changed ### Changed

72
misc/netdata.sh Normal file
View File

@ -0,0 +1,72 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2023 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
clear
cat <<"EOF"
_ __ __ ____ __
/ | / /__ / /_/ __ \____ _/ /_____ _
/ |/ / _ \/ __/ / / / __ `/ __/ __ `/
/ /| / __/ /_/ /_/ / /_/ / /_/ /_/ /
/_/ |_/\___/\__/_____/\__,_/\__/\__,_/
EOF
install() {
while true; do
read -p "This script will install NetData on Proxmox VE. Proceed(y/n)?" yn
case $yn in
[Yy]*) break ;;
[Nn]*) exit ;;
*) echo "Please answer yes or no." ;;
esac
done
wget -q https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo_2-2+debian12_all.deb
dpkg -i netdata-repo_2-2+debian12_all.deb
rm -rf netdata-repo_2-2+debian12_all.deb
apt-get update &>/dev/null
apt-get -y upgrade
apt-get install -y netdata
echo -e "\nInstalled NetData (http://$(hostname -I | awk '{print $1}'):19999)\n"
}
uninstall() {
systemctl stop netdata
apt-get remove --purge -y netdata netdata-repo
rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/apt/sources.list.d/netdata.list
rm -rf /etc/apt/trusted.gpg.d/netdata-archive-keyring.gpg
systemctl daemon-reload
apt autoremove -y
userdel netdata
echo -e "\nRemoved NetData from Proxmox VE\n"
}
if ! command -v pveversion >/dev/null 2>&1; then
clear
echo -e "\n No PVE Detected!\n"
exit
fi
OPTIONS=(Install "Install NetData on Proxmox VE" \
Uninstall "Uninstall NetData from Proxmox VE")
# Show the whiptail menu and save the user's choice
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "NetData" --menu "Select an option:" 10 58 2 \
"${OPTIONS[@]}" 3>&1 1>&2 2>&3)
case $CHOICE in
"Install")
install
;;
"Uninstall")
uninstall
;;
*)
echo "Exiting..."
exit 0
;;
esac