docker-scripts/linux/ecosystem/ninjam/latest/docker-entrypoint.sh
2023-08-06 21:57:55 +03:00

20 lines
662 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
# Setup default Opts
: ${NINJAM_CONFIG:=example.cfg}
: ${NINJAM_PORT:=2049}
: ${NINJAM_UID:=1337}
: ${NINJAM_ARCHIVE:=/app/archive}
: ${NINJAM_LOG:=/app/log}
: ${NINJAM_RUN:=/app/run}
: ${NINJAM_LOGFILE:=${NINJAM_LOG}/ninjamserver.log}
: ${NINJAM_PID:=${NINJAM_RUN}/ninjamserver.pid}
echo "======================================================"
echo "[NINJAM] Starting NINJAM Server..."
echo "======================================================"
cd ${NINJAM_BIN}
${NINJAM_BIN}/ninjamsrv ${NINJAM_CONFIG} -port ${NINJAM_PORT} -setuid ${NINJAM_UID} -archive ${NINJAM_ARCHIVE} -logfile ${NINJAM_LOGFILE} -pidfile ${NINJAM_PID}