Update influxdb-install.sh

optional install Telegraf
This commit is contained in:
tteckster 2022-10-02 07:45:27 -04:00 committed by GitHub
parent 3d0207fbb1
commit 9299ca4736
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,9 +86,19 @@ apt-get update &>/dev/null
apt-get install -y influxdb &>/dev/null apt-get install -y influxdb &>/dev/null
msg_ok "Installed InfluxDB" msg_ok "Installed InfluxDB"
read -r -p "Would you like to add Telegraf? <y/N> " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
then
TELEGRAF="Y"
else
TELEGRAF="N"
fi
if [[ $TELEGRAF == "Y" ]]; then
msg_info "Installing Telegraf" msg_info "Installing Telegraf"
apt-get install -y telegraf &>/dev/null apt-get install -y telegraf &>/dev/null
msg_ok "Installed Telegraf" msg_ok "Installed Telegraf"
fi
PASS=$(grep -w "root" /etc/shadow | cut -b6); PASS=$(grep -w "root" /etc/shadow | cut -b6);
if [[ $PASS != $ ]]; then if [[ $PASS != $ ]]; then