From 532da20188ecc9aa9091083eb7e4f70188d77f6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Dec 2022 10:25:37 -0500 Subject: [PATCH] Update pyenv2.sh --- misc/pyenv2.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh index 9b7126fb..70e99977 100644 --- a/misc/pyenv2.sh +++ b/misc/pyenv2.sh @@ -34,3 +34,25 @@ echo "Installed Home Assistant Beta" echo -e " Go to $(hostname -I | awk '{print $1}'):8123" hass fi + +read -r -p "Would you like to install ESPHome Beta? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + ESP="Y" +fi +if [[ $ESP == "Y" ]]; then +echo "Installing ESPHome" +pip3 install --pre esphome &>/dev/null +cat </etc/systemd/system/esphomeDashboard.service +[Unit] +Description=ESPHome Dashboard +After=network.target +[Service] +ExecStart=/root/.pyenv/versions/3.10.8/bin/esphome /root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/esphome_dashboard dashboard +Restart=always +User=root +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now esphomeDashboard &>/dev/null +echo "Installed ESPHome" +fi