DockerMC/.docker/server/start.sh
NorbiPeti 3d81bd3700
Implement server start-stop logic, fix issues
- Fixed the volume being at /mcserver on host using the .env file
2022-07-04 00:00:04 +02:00

11 lines
223 B
Bash

#for file in *.jar; do
# echo $file
#done
trap "echo Received stop signal; pkill java" INT TERM EXIT
ls -la
file=$(ls *.jar | tail -1)
echo Starting $file
mkdir -p $MC_SERVER
cd $MC_SERVER
java -jar ../$file
echo Stopped!