gtnh-server-docker/prepare_environment.sh
2023-11-24 14:03:35 +03:00

27 lines
661 B
Bash
Executable File

#!/bin/sh
echo "eula=true" > eula.txt
if [ ! -f /data/.initialized ]; then
mkdir -p /data/logs /data/World /data/crash-reports
for i in "server.properties" "usercache.json" "whitelist.json" "ops.json" "config"
do
cp -r $i /data/
done
sed -i 's/online-mode=true/online-mode=false/' /data/server.properties
touch /data/.initialized
fi
if [ ! -f /app/.initialized ]; then
for i in "server.properties" "usercache.json" "whitelist.json" "ops.json" "config"
do
rm -r $i
ln -s /data/$i $i
done
ln -s /data/logs .
ln -s /data/World .
ln -s /data/crash-reports .
touch /app/.initialized
fi