#!/bin/bash
### Farbdefinitionen ####
#   TEXT in Weiss       #
#   DATEIEN in Gelb     #
#   ORDNER in HellBlau  #
#########################
# Farbdefinitionen zur Ausgabe 
ROT='\033[0;31m'
HELLROT='\033[1;31m'
GRUEN='\033[0;32m'
HELLGRUEN='\033[1;32m'
GELB='\033[1;33m'
BLAU='\033[0;34m'
HELLBLAU='\033[1;34m'
LILA='\033[0;35m'
HELLLILA='\033[1;35m'
DUNKELESTUERKIS='\033[0;36m'
TUERKIS='\033[1;36m'
HELLGRAU='\033[0;37m'
WEISS='\033[1;37m'
NC='\033[0m' # No Color
#
#
apt update && apt upgrade -y
dpkg-reconfigure tzdata
dpkg-reconfigure locales
clear
echo
echo -e "${WEISS}Instaliere folgende Pakete ${GELB}net-tools ssh mc gnupg2 curl ${NC}"
echo
sleep 4
apt install net-tools ssh mc gnupg2 curl unzip -y
wget -q --show-progress http://web.webolch.de/bauanleitung/downloads/linux/metrikserver.webolch.de/influxdb.sh
bash influxdb.sh
wget -q --show-progress http://web.webolch.de/bauanleitung/downloads/linux/metrikserver.webolch.de/grafana.sh
bash grafana.sh
wget -q --show-progress http://web.webolch.de/bauanleitung/downloads/linux/zip/metrikserver.zip
unzip metrikserver.zip
mv influxdb.conf /etc/influxdb
mv grafana.ini /etc/grafana
mv privkey.pem /etc/grafana
mv cert.pem /etc/grafana
mv sshd_config /etc/ssh/
service influxdb start
clear
systemctl status influxdb --no-pager
systemctl daemon-reload
systemctl enable grafana-server
systemctl start grafana-server
clear
systemctl status grafana-server --no-pager
systemctl restart ssh
sleep 4
clear
systemctl status ssh --no-pager
echo -e "${TUERKIS} !!!!! Die Installation ist jetzt abgeschlossen!!!!!${NC}"
