L2J Mobius High Five docker setup

This commit is contained in:
2026-09-11 11:54:14 +00:00
commit c2e35cf5ee
27741 changed files with 2714798 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -euo pipefail
if [ -d /l2j/config_override ] && [ -n "$(ls -A /l2j/config_override 2>/dev/null)" ]; then
echo "[login] applying config overrides from /l2j/config_override"
find /l2j/config_override -type f | while read -r f; do
rel="${f#/l2j/config_override/}"
dest="/l2j/$rel"
mkdir -p "$(dirname "$dest")"
cp "$f" "$dest"
echo "[login] -> $dest"
done
fi
echo "[login] waiting for mysql at ${DB_HOST:-mysql}:${DB_PORT:-3306} ..."
until (echo > /dev/tcp/"${DB_HOST:-mysql}"/"${DB_PORT:-3306}") 2>/dev/null; do
sleep 2
done
echo "[login] mysql is up, starting LoginServer"
cd /l2j
# Mobius кладёт jar-ы в libs/, classpath собираем из всех jar там
CLASSPATH="libs/*"
if [ -f "libs/LoginServer.jar" ]; then
exec java -Dfile.encoding=UTF-8 -cp "$CLASSPATH" -jar libs/LoginServer.jar
else
echo "[login] Не найден libs/LoginServer.jar. Содержимое /l2j:"
find /l2j -maxdepth 2
exit 1
fi