Update influxdb-install.sh

This commit is contained in:
tteckster 2022-10-02 20:46:25 -04:00 committed by GitHub
parent 84a4c26b2d
commit abec4b0fa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,9 +81,21 @@ wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - &>/dev/
echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list &>/dev/null echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list &>/dev/null
msg_ok "Set up InfluxDB Repository" msg_ok "Set up InfluxDB Repository"
read -r -p "Which version of InfluxDB to install? (1 or 2) " prompt
if [[ $prompt == "2" ]]
then
INFLUX="2"
else
INFLUX="1"
fi
msg_info "Installing InfluxDB" msg_info "Installing InfluxDB"
apt-get update &>/dev/null apt-get update &>/dev/null
if [[ $INFLUX == "2" ]]; then
apt-get install -y influxdb2 &>/dev/null
else
apt-get install -y influxdb &>/dev/null apt-get install -y influxdb &>/dev/null
fi
msg_ok "Installed InfluxDB" msg_ok "Installed InfluxDB"
read -r -p "Would you like to add Telegraf? <y/N> " prompt read -r -p "Would you like to add Telegraf? <y/N> " prompt