rad-docker/start.sh
Niklas f3247a20d3
All checks were successful
continuous-integration/drone/push Build is passing
fixed dir check for linking
2021-05-09 18:48:22 +02:00

40 lines
655 B
Bash
Executable File

#!/usr/bin/env bash
set -e
toLinkedFiles=(
LaunchServer.sh
README-howto.txt
forge-1.12.2-14.23.5.2854.jar
libraries
llibrary
minecraft_server.1.12.2.jar
mods
scripts
structures
)
toCoptFiles=(
config
options.txt
server.properties
)
chmod +x LaunchServer.sh
for linkedFile in "${toLinkedFiles[@]}"
do
[[ -f /data/$linkedFile || -d /data/$linkedFile ]] || ln -s /minecraft/$linkedFile /data/$linkedFile
done
for copyedFile in "${toCoptFiles[@]}"
do
[ -f /data/$copyedFile ] || cp -r /minecraft/$copyedFile /data/$copyedFile
done
echo "eula=true" > /data/eula.txt
cd /data
./LaunchServer.sh