Compare commits

..
Author SHA1 Message Date
MickLesk 226979e8b3 romm: keep the asset links in sync with ROMM_BASE_PATH 2026-09-30 19:20:56 +02:00
4 changed files with 8 additions and 4 deletions
+2
View File
@@ -218,6 +218,8 @@ EOF
#!/usr/bin/env bash
base="$(grep -m1 '^ROMM_BASE_PATH=' /opt/romm/.env 2>/dev/null | cut -d= -f2)"
base="${base:-/var/lib/romm}"
ln -sfn "${base}/resources" /opt/romm/frontend/dist/assets/romm/resources
ln -sfn "${base}/assets" /opt/romm/frontend/dist/assets/romm/assets
[[ -f /etc/angie/http.d/romm.conf ]] || exit 0
sed -i -e "s|alias .*/library/;|alias ${base}/library/;|" \
-e "s|alias .*/cache/;|alias ${base}/cache/;|" /etc/angie/http.d/romm.conf
+2 -2
View File
@@ -49,14 +49,14 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "teslamate" "teslamate-org/teslamate" "tarball"
msg_info "Building TeslaMate (Patience)"
cd /opt/teslamate/elixir
cd /opt/teslamate
export MIX_ENV=prod
$STD mix local.hex --force
$STD mix local.rebar --force
$STD mix deps.get --only prod
$STD npm install --prefix ./assets
$STD npm run deploy --prefix ./assets
$STD mix do phx.digest, release --overwrite --path /opt/teslamate/_build/prod/rel/teslamate
$STD mix do phx.digest, release --overwrite
msg_ok "Built TeslaMate"
msg_info "Starting Service"
+2
View File
@@ -334,6 +334,8 @@ cat <<'SYNCEOF' >/usr/local/bin/romm-sync-angie-paths
#!/usr/bin/env bash
base="$(grep -m1 '^ROMM_BASE_PATH=' /opt/romm/.env 2>/dev/null | cut -d= -f2)"
base="${base:-/var/lib/romm}"
ln -sfn "${base}/resources" /opt/romm/frontend/dist/assets/romm/resources
ln -sfn "${base}/assets" /opt/romm/frontend/dist/assets/romm/assets
[[ -f /etc/angie/http.d/romm.conf ]] || exit 0
sed -i -e "s|alias .*/library/;|alias ${base}/library/;|" \
-e "s|alias .*/cache/;|alias ${base}/cache/;|" /etc/angie/http.d/romm.conf
+2 -2
View File
@@ -49,14 +49,14 @@ msg_ok "Installed Grafana"
fetch_and_deploy_gh_release "teslamate" "teslamate-org/teslamate" "tarball"
msg_info "Building TeslaMate (Patience)"
cd /opt/teslamate/elixir
cd /opt/teslamate
export MIX_ENV=prod
$STD mix local.hex --force
$STD mix local.rebar --force
$STD mix deps.get --only prod
$STD npm install --prefix ./assets
$STD npm run deploy --prefix ./assets
$STD mix do phx.digest, release --overwrite --path /opt/teslamate/_build/prod/rel/teslamate
$STD mix do phx.digest, release --overwrite
msg_ok "Built TeslaMate"
msg_info "Configuring TeslaMate"