mirror of
https://github.com/jambonz/jambonz-infrastructure.git
synced 2026-10-27 05:04:11 +00:00
21 lines
677 B
Bash
21 lines
677 B
Bash
#!/bin/bash
|
|
|
|
if [ "$1" == "yes" ]; then
|
|
|
|
INFLUXDB_IP=$2
|
|
|
|
cd /tmp
|
|
wget -q https://repos.influxdata.com/influxdata-archive_compat.key
|
|
gpg --with-fingerprint --show-keys ./influxdata-archive_compat.key
|
|
cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
|
|
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
|
|
|
|
sudo apt-get update
|
|
sudo apt-get install -y telegraf
|
|
|
|
sudo cp /tmp/telegraf.conf /etc/telegraf/telegraf.conf
|
|
|
|
sudo systemctl enable telegraf
|
|
sudo systemctl start telegraf
|
|
|
|
fi |