Merge pull request #378 from MacRimi/fix/oci-entrypoint-guard

Say where the OCI converter entry point has to run
This commit is contained in:
MacRimi
2026-09-22 23:17:19 +02:00
committed by GitHub
2 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
Runtime distribution only:
- `proxmenux-oci.sh`: installer entry point.
- `proxmenux-oci.sh`: entry point, run from this directory.
- `catalog/`: index, application templates, curated definitions and overlays.
- `src/`: menu and deployment orchestrator.
- `remote/`: native Proxmox OCI/LXC installation and lifecycle helpers.
+18
View File
@@ -6,6 +6,24 @@ VENV_DIR="$ROOT_DIR/.venv"
REQUIREMENTS="$ROOT_DIR/requirements.txt"
STAMP="$VENV_DIR/.requirements.sha256"
# The orchestrator lives beside this script, so it has to run from where it
# was installed. Piped from a URL there is no directory to read: $0 is "bash",
# ROOT_DIR becomes the working directory, and the first missing file reports a
# path nobody asked for.
if [ ! -r "$REQUIREMENTS" ] || [ ! -d "$ROOT_DIR/src/proxmenux_oci" ]; then
cat >&2 <<EOF
ERROR: this script runs from the directory it was installed in, next to
requirements.txt and src/. It cannot be piped from a URL.
On a Proxmox host with ProxMenux installed:
/usr/local/share/proxmenux/oci/engine/proxmenux-oci.sh "\$@"
From a clone of the repository:
cd oci && ./proxmenux-oci.sh "\$@"
EOF
exit 1
fi
command -v python3 >/dev/null 2>&1 || {
echo "ERROR: Python 3 is required." >&2
exit 1