diff --git a/install/evcc-install.sh b/install/evcc-install.sh index b92bd209..ec87ca27 100644 --- a/install/evcc-install.sh +++ b/install/evcc-install.sh @@ -19,21 +19,26 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ curl \ sudo \ - mc + mc \ + debian-keyring \ + debian-archive-keyring \ + lsb-release \ + gpg \ + apt-transport-https msg_ok "Installed Dependencies" -RELEASE=$(curl -s https://api.github.com/repos/evcc-io/evcc/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -msg_info "Installing ${APPLICATION} ${RELEASE}" -wget -q "https://github.com/evcc-io/evcc/releases/download/${RELEASE}/evcc_${RELEASE}_amd64.deb" -$STD dpkg -i evcc_${RELEASE}_amd64.deb -echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" -msg_ok "Installed ${APPLICATION} ${RELEASE}" +msg_info "Setting up evcc Repository" +curl -fsSL https://dl.evcc.io/public/evcc/stable/gpg.EAD5D0E07B0EC0FD.key | gpg --dearmor -o /etc/apt/keyrings/evcc-stable.gpg || msg_error "Failed to download GPG key" +echo "deb [signed-by=/etc/apt/keyrings/evcc-stable.gpg] https://dl.evcc.io/public/evcc/stable/deb/debian $(lsb_release -cs) main" >/etc/apt/sources.list.d/evcc-stable.list || msg_error "Failed to add EVCC repository" + +msg_info "Installing ${APPLICATION}" +$STD sudo apt install -y evcc +msg_ok "Installed ${APPLICATION}" motd_ssh customize msg_info "Cleaning up" -rm -rf evcc_${RELEASE}_amd64.deb $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" \ No newline at end of file