mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-09-29 18:16:43 +00:00
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:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Runtime distribution only:
|
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.
|
- `catalog/`: index, application templates, curated definitions and overlays.
|
||||||
- `src/`: menu and deployment orchestrator.
|
- `src/`: menu and deployment orchestrator.
|
||||||
- `remote/`: native Proxmox OCI/LXC installation and lifecycle helpers.
|
- `remote/`: native Proxmox OCI/LXC installation and lifecycle helpers.
|
||||||
|
|||||||
@@ -6,6 +6,24 @@ VENV_DIR="$ROOT_DIR/.venv"
|
|||||||
REQUIREMENTS="$ROOT_DIR/requirements.txt"
|
REQUIREMENTS="$ROOT_DIR/requirements.txt"
|
||||||
STAMP="$VENV_DIR/.requirements.sha256"
|
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 || {
|
command -v python3 >/dev/null 2>&1 || {
|
||||||
echo "ERROR: Python 3 is required." >&2
|
echo "ERROR: Python 3 is required." >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user