fix(playout): entrypoint handles 2.4.x bin/casparcg layout + LD_LIBRARY_PATH for bundled libs

This commit is contained in:
Zac Gaetano 2026-05-30 16:50:04 -04:00
parent 13bbd4216e
commit 7ab70948a0

View file

@ -17,9 +17,14 @@ fi
mkdir -p /media/casparcg/log /media/casparcg/data /media/templates mkdir -p /media/casparcg/log /media/casparcg/data /media/templates
# 2.4.x zip bundles its own .so files under lib/ — add to LD_LIBRARY_PATH.
export LD_LIBRARY_PATH="/opt/casparcg/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
cd /opt/casparcg cd /opt/casparcg
CASPAR_CFG=/opt/casparcg/casparcg.config CASPAR_CFG=/opt/casparcg/casparcg.config
if [ -x "./casparcg" ]; then CASPAR_BIN="./casparcg"; # 2.4.x: binary at bin/casparcg. 2.5.x: symlinked to casparcg at root.
if [ -x "./bin/casparcg" ]; then CASPAR_BIN="./bin/casparcg";
elif [ -x "./casparcg" ]; then CASPAR_BIN="./casparcg";
elif [ -x "./CasparCG Server" ]; then CASPAR_BIN="./CasparCG Server"; elif [ -x "./CasparCG Server" ]; then CASPAR_BIN="./CasparCG Server";
elif command -v casparcg >/dev/null; then CASPAR_BIN="casparcg"; elif command -v casparcg >/dev/null; then CASPAR_BIN="casparcg";
else echo "[entrypoint] ERROR: casparcg binary not found"; exit 1; fi else echo "[entrypoint] ERROR: casparcg binary not found"; exit 1; fi