1
0
mirror of https://github.com/tteck/Proxmox.git synced 2024-12-27 10:57:02 +02:00

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 read -r -p "Would you like to add Telegraf? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
TELEGRAF="Y"
else
TELEGRAF="N"
fi
if [[ $TELEGRAF == "Y" ]]; then
msg_info "Installing Telegraf" msg_info "Installing Telegraf"
$STD apt-get install -y telegraf $STD apt-get install -y telegraf
msg_ok "Installed 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 read -r -p "Would you like to add Helm Package Manager? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
HELM="Y"
else
HELM="N"
fi
if [[ $HELM == "Y" ]]; then
msg_info "Installing Helm" msg_info "Installing Helm"
$STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3) $STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3)
msg_ok "Installed Helm" 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 read -r -p "Would you like to add Adminer? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
ADMINER="Y"
else
ADMINER="N"
fi
if [[ $ADMINER == "Y" ]]; then
msg_info "Installing Adminer" msg_info "Installing Adminer"
$STD apt install -y adminer $STD apt install -y adminer
$STD a2enconf 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 read -r -p "Would you like to add Adminer? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
ADMINER="Y"
else
ADMINER="N"
fi
if [[ $ADMINER == "Y" ]]; then
msg_info "Installing Adminer" msg_info "Installing Adminer"
$STD apt install -y adminer $STD apt install -y adminer
$STD sudo a2enconf 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 read -r -p "Would you like to add Coral Edge TPU support? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
CORAL="Y"
else
CORAL="N"
fi
if [[ $CORAL == "Y" ]]; then
msg_info "Adding Coral Edge TPU Support" msg_info "Adding Coral Edge TPU Support"
$STD apt-key add <(curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg) $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' 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" msg_ok "Installed pyenv"
. ~/.bashrc . ~/.bashrc
set -e set -e
msg_info "Installing Python 3.10.8" msg_info "Installing Python 3.11.1"
pyenv install 3.10.8 &>/dev/null pyenv install 3.11.1 &>/dev/null
pyenv global 3.10.8 pyenv global 3.11.1
msg_ok "Installed Python 3.10.8" msg_ok "Installed Python 3.11.1"
read -r -p "Would you like to install Home Assistant Beta? <y/N> " prompt read -r -p "Would you like to install Home Assistant Beta? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
HA="Y"
fi
if [[ $HA == "Y" ]]; then
msg_info "Installing Home Assistant Beta" msg_info "Installing Home Assistant Beta"
cat <<EOF >/etc/systemd/system/homeassistant.service cat <<EOF >/etc/systemd/system/homeassistant.service
[Unit] [Unit]
@ -102,9 +99,6 @@ fi
read -r -p "Would you like to install ESPHome Beta? <y/N> " prompt read -r -p "Would you like to install ESPHome Beta? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
ESP="Y"
fi
if [[ $ESP == "Y" ]]; then
msg_info "Installing ESPHome Beta" msg_info "Installing ESPHome Beta"
mkdir /srv/esphome mkdir /srv/esphome
cd /srv/esphome cd /srv/esphome
@ -147,9 +141,6 @@ fi
read -r -p "Would you like to install Matter-Server (Beta)? <y/N> " prompt read -r -p "Would you like to install Matter-Server (Beta)? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
MTR="Y"
fi
if [[ $MTR == "Y" ]]; then
msg_info "Installing Matter Server" msg_info "Installing Matter Server"
apt-get install -y \ apt-get install -y \
libcairo2-dev \ libcairo2-dev \