code refactoring

This commit is contained in:
tteckster 2023-03-08 15:37:32 -05:00 committed by GitHub
parent 6d2a8a2ec4
commit 7305fa4f0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 4 additions and 43 deletions

View file

@ -120,12 +120,6 @@ msg_ok "Installed InfluxDB"
read -r -p "Would you like to add Telegraf? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
TELEGRAF="Y"
else
TELEGRAF="N"
fi
if [[ $TELEGRAF == "Y" ]]; then
msg_info "Installing Telegraf"
$STD apt-get install -y telegraf
msg_ok "Installed Telegraf"

View file

@ -102,12 +102,6 @@ msg_ok "Installed k0s Kubernetes"
read -r -p "Would you like to add Helm Package Manager? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
HELM="Y"
else
HELM="N"
fi
if [[ $HELM == "Y" ]]; then
msg_info "Installing Helm"
$STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3)
msg_ok "Installed Helm"

View file

@ -100,12 +100,6 @@ msg_ok "Installed MariaDB"
read -r -p "Would you like to add Adminer? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
ADMINER="Y"
else
ADMINER="N"
fi
if [[ $ADMINER == "Y" ]]; then
msg_info "Installing Adminer"
$STD apt install -y adminer
$STD a2enconf adminer

View file

@ -207,12 +207,6 @@ msg_ok "Installed PostgreSQL"
read -r -p "Would you like to add Adminer? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
ADMINER="Y"
else
ADMINER="N"
fi
if [[ $ADMINER == "Y" ]]; then
msg_info "Installing Adminer"
$STD apt install -y adminer
$STD sudo a2enconf adminer

View file

@ -149,12 +149,6 @@ msg_ok "Installed Python3"
read -r -p "Would you like to add Coral Edge TPU support? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
CORAL="Y"
else
CORAL="N"
fi
if [[ $CORAL == "Y" ]]; then
msg_info "Adding Coral Edge TPU Support"
$STD apt-key add <(curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg)
sh -c 'echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list'

View file

@ -64,15 +64,12 @@ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)
msg_ok "Installed pyenv"
. ~/.bashrc
set -e
msg_info "Installing Python 3.10.8"
pyenv install 3.10.8 &>/dev/null
pyenv global 3.10.8
msg_ok "Installed Python 3.10.8"
msg_info "Installing Python 3.11.1"
pyenv install 3.11.1 &>/dev/null
pyenv global 3.11.1
msg_ok "Installed Python 3.11.1"
read -r -p "Would you like to install Home Assistant Beta? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
HA="Y"
fi
if [[ $HA == "Y" ]]; then
msg_info "Installing Home Assistant Beta"
cat <<EOF >/etc/systemd/system/homeassistant.service
[Unit]
@ -102,9 +99,6 @@ fi
read -r -p "Would you like to install ESPHome Beta? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
ESP="Y"
fi
if [[ $ESP == "Y" ]]; then
msg_info "Installing ESPHome Beta"
mkdir /srv/esphome
cd /srv/esphome
@ -147,9 +141,6 @@ fi
read -r -p "Would you like to install Matter-Server (Beta)? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
MTR="Y"
fi
if [[ $MTR == "Y" ]]; then
msg_info "Installing Matter Server"
apt-get install -y \
libcairo2-dev \