From ee06ad86f1b508cbdda7ea66c096986ec000102d Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 17 Aug 2026 11:26:34 +0200 Subject: [PATCH] teslamate: use precompiled Elixir (#16561) --- ct/teslamate.sh | 10 ++++++++++ install/teslamate-install.sh | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ct/teslamate.sh b/ct/teslamate.sh index 57da73241..443086726 100644 --- a/ct/teslamate.sh +++ b/ct/teslamate.sh @@ -35,6 +35,16 @@ function update_script() { systemctl stop teslamate msg_ok "Stopped Service" + if [[ ! -d /opt/elixir ]]; then + msg_info "Migrating to newer Elixir (required by TeslaMate)" + $STD apt remove -y elixir + fetch_and_deploy_gh_release "elixir" "elixir-lang/elixir" "prebuild" "latest" "/opt/elixir" "elixir-otp-27.zip" + for bin in elixir elixirc iex mix; do + ln -sf "/opt/elixir/bin/$bin" "/usr/local/bin/$bin" + done + msg_ok "Migrated to newer Elixir" + fi + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "teslamate" "teslamate-org/teslamate" "tarball" msg_info "Building TeslaMate (Patience)" diff --git a/install/teslamate-install.sh b/install/teslamate-install.sh index 6a7e4b84d..bc5f221e0 100644 --- a/install/teslamate-install.sh +++ b/install/teslamate-install.sh @@ -19,7 +19,6 @@ $STD apt install -y \ erlang \ erlang-dev \ erlang-syntax-tools \ - elixir \ mosquitto \ locales sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen @@ -27,6 +26,11 @@ $STD locale-gen systemctl enable -q --now mosquitto msg_ok "Installed Dependencies" +fetch_and_deploy_gh_release "elixir" "elixir-lang/elixir" "prebuild" "latest" "/opt/elixir" "elixir-otp-27.zip" +for bin in elixir elixirc iex mix; do + ln -sf "/opt/elixir/bin/$bin" "/usr/local/bin/$bin" +done + PG_VERSION="17" setup_postgresql PG_DB_NAME="teslamate" PG_DB_USER="teslamate" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db NODE_VERSION="22" setup_nodejs