From 22b77fdb768c30e15ac6722e737ea722df9a342d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Jun 2023 13:12:18 -0400 Subject: [PATCH] Update esphome.sh update the installation of either standard or venv --- ct/esphome.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ct/esphome.sh b/ct/esphome.sh index d7d4f753..f858d198 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -52,13 +52,16 @@ function default_settings() { function update_script() { header_info -if [[ ! -f /usr/local/bin/esphome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ ! -f /etc/systemd/system/esphomeDashboard.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping ESPHome" systemctl stop esphomeDashboard msg_ok "Stopped ESPHome" msg_info "Updating ESPHome" -pip3 install esphome --upgrade &>/dev/null +if [[ -d /srv/esphome ]]; then + source /srv/esphome/bin/activate &>/dev/null +fi +pip3 install -U esphome &>/dev/null msg_ok "Updated ESPHome" msg_info "Starting ESPHome"