mirror of
https://github.com/YuzuZensai/palworld-server-docker.git
synced 2026-01-31 14:57:59 +00:00
change some env variables to PalWorldSettings.in
This commit is contained in:
@@ -6,22 +6,6 @@ if [ -n "${PORT}" ]; then
|
|||||||
STARTCOMMAND+=("-port=${PORT}")
|
STARTCOMMAND+=("-port=${PORT}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${PLAYERS}" ]; then
|
|
||||||
STARTCOMMAND+=("-players=${PLAYERS}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${COMMUNITY}" = true ]; then
|
|
||||||
STARTCOMMAND+=("EpicApp=PalServer")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${PUBLIC_IP}" ]; then
|
|
||||||
STARTCOMMAND+=("-publicip=${PUBLIC_IP}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${PUBLIC_PORT}" ]; then
|
|
||||||
STARTCOMMAND+=("-publicport=${PUBLIC_PORT}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${SERVER_NAME}" ]; then
|
if [ -n "${SERVER_NAME}" ]; then
|
||||||
STARTCOMMAND+=("-servername=${SERVER_NAME}")
|
STARTCOMMAND+=("-servername=${SERVER_NAME}")
|
||||||
fi
|
fi
|
||||||
@@ -42,6 +26,10 @@ if [ -n "${QUERY_PORT}" ]; then
|
|||||||
STARTCOMMAND+=("-queryport=${QUERY_PORT}")
|
STARTCOMMAND+=("-queryport=${QUERY_PORT}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${COMMUNITY}" = true ]; then
|
||||||
|
STARTCOMMAND+=("EpicApp=PalServer")
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${MULTITHREADING}" = true ]; then
|
if [ "${MULTITHREADING}" = true ]; then
|
||||||
STARTCOMMAND+=("-useperfthreads" "-NoAsyncLoadingThread" "-UseMultithreadForDS")
|
STARTCOMMAND+=("-useperfthreads" "-NoAsyncLoadingThread" "-UseMultithreadForDS")
|
||||||
fi
|
fi
|
||||||
@@ -63,6 +51,18 @@ if [ ! "$(grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorld
|
|||||||
cp /palworld/DefaultPalWorldSettings.ini /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
|
cp /palworld/DefaultPalWorldSettings.ini /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "${PLAYERS}" ]; then
|
||||||
|
echo "PLAYERS=${PLAYERS}"
|
||||||
|
sed -E -i "s/ServerPlayerMaxNum=[0-9]*/ServerPlayerMaxNum=$PLAYERS/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
|
||||||
|
fi
|
||||||
|
if [ -n "${PUBLIC_IP}" ]; then
|
||||||
|
echo "PUBLIC_IP=${PUBLIC_IP}"
|
||||||
|
sed -E -i "s/PublicIP=\"[^\"]*\"/PublicIP=\"$PUBLIC_IP\"/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
|
||||||
|
fi
|
||||||
|
if [ -n "${PUBLIC_PORT}" ]; then
|
||||||
|
echo "PUBLIC_PORT=${PUBLIC_PORT}"
|
||||||
|
sed -E -i "s/PublicPort=[0-9]*/PublicPort=$PUBLIC_PORT/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
|
||||||
|
fi
|
||||||
if [ -n "${DIFFICULTY}" ]; then
|
if [ -n "${DIFFICULTY}" ]; then
|
||||||
echo "DIFFICULTY=$DIFFICULTY"
|
echo "DIFFICULTY=$DIFFICULTY"
|
||||||
sed -E -i "s/Difficulty=[a-zA-Z]*/Difficulty=$DIFFICULTY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
|
sed -E -i "s/Difficulty=[a-zA-Z]*/Difficulty=$DIFFICULTY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
|
||||||
|
|||||||
Reference in New Issue
Block a user