Files
ProxMenux/oci/proxmenux-oci.sh
T
MacRimiandClaude Opus 5 bcabcb618c feat(oci): run official container images as native LXC containers
Adds the OCI manager: an engine that turns a Docker Compose file into an
LXC definition, a catalog of 365 applications drawn from LinuxServer.io
and other container image sources, and a per-instance registry recording
what each container was built from. Reachable from the main menu.

Catalog text is translated like every other string in the project: the
taglines go through translate() and land in lang/*.json, so the entries
read in all eight languages instead of only English.

Translation cache builder:
- a failed translation leaves the key absent rather than writing English,
  which previously made the string count as translated forever
- a result identical to a 3+ word source is rejected, catching a provider
  that silently returns the text it was given
- strings that are nothing but glossary terms keep their source spelling
  instead of being discarded as failures
- no backoff between attempts when the provider is deterministic
- application names are protected so "HAOS One" survives translation
- argos joins the provider list, and the workflow reads the OCI sources

Audit & Report:
- findings that moved in the wrong direction between runs are reported
  alongside the ones that improved
- an accepted risk can carry a review date and is flagged when it falls due
- backup checks explain in plain language what they looked at and what to
  do next

Monitor:
- disks can be excluded from periodic reads, and an idle disk says so
  instead of showing a stale temperature
- per-disk identity survives a controller or enclosure change
- scheduled Borg backups resolve their SSH key from the repository entry
- PVE upgrades log the package list and the resulting dpkg changes

The web build no longer copies scripts/ into public/: the documentation
links to GitHub, so nothing read that folder.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 18:24:59 +02:00

41 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -Eeuo pipefail
ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
VENV_DIR="$ROOT_DIR/.venv"
REQUIREMENTS="$ROOT_DIR/requirements.txt"
STAMP="$VENV_DIR/.requirements.sha256"
command -v python3 >/dev/null 2>&1 || {
echo "ERROR: se necesita Python 3 en el Mac." >&2
exit 1
}
if python3 -c 'import yaml, jsonschema' >/dev/null 2>&1; then
PYTHON=python3
else
if [[ ! -x "$VENV_DIR/bin/python" ]] || ! "$VENV_DIR/bin/python" -m pip --version >/dev/null 2>&1; then
echo "Preparando entorno Python local..."
rm -rf "$VENV_DIR"
python3 -m venv "$VENV_DIR" || {
echo "ERROR: no se pudo crear venv. En Debian instala python3-venv, python3-yaml y python3-jsonschema." >&2
exit 1
}
fi
if command -v shasum >/dev/null 2>&1; then
CURRENT_HASH=$(shasum -a 256 "$REQUIREMENTS" | awk '{print $1}')
else
CURRENT_HASH=$(sha256sum "$REQUIREMENTS" | awk '{print $1}')
fi
INSTALLED_HASH=$(cat "$STAMP" 2>/dev/null || true)
if [[ "$CURRENT_HASH" != "$INSTALLED_HASH" ]]; then
echo "Instalando dependencias verificables del conversor..."
"$VENV_DIR/bin/python" -m pip install --disable-pip-version-check -r "$REQUIREMENTS"
printf '%s\n' "$CURRENT_HASH" >"$STAMP"
fi
PYTHON="$VENV_DIR/bin/python"
fi
export PYTHONPATH="$ROOT_DIR/src${PYTHONPATH:+:$PYTHONPATH}"
exec "$PYTHON" -m proxmenux_oci "$@"