gtnh-server-docker/prepare_environment.sh

30 lines
783 B
Bash
Raw Permalink Normal View History

2023-11-24 11:03:35 +00:00
#!/bin/sh
echo "eula=true" > eula.txt
if [ ! -f /data/.initialized ]; then
2023-11-24 12:20:52 +00:00
mkdir -p /data/logs /data/World /data/crash-reports /data/local /data/visualprospecting
2023-11-24 11:03:35 +00:00
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 .
2023-11-24 12:20:52 +00:00
ln -s /data/local .
ln -s /data/visualprospecting .
2024-05-06 15:48:02 +00:00
ln -s /data/backups .
2023-11-24 11:03:35 +00:00
touch /app/.initialized
fi