Awesome-Python-Scripts/Minecraft_server_in_background
2019-10-03 16:06:51 +02:00
..
README.md Add script to run a Minecraft server in the background 2019-10-03 16:06:51 +02:00
run.py Add script to run a Minecraft server in the background 2019-10-03 16:06:51 +02:00
start.sh Add script to run a Minecraft server in the background 2019-10-03 16:06:51 +02:00

Running a Minecraft server in the background

This program runs a script (which can be specified) in a subprocess with redirected output (new output location can be specified) and periodically checks a file for a keyword (both the name of the file to check and the keyword to check for can be specified) and exits (stopping the subprocess via sending a command), if the contents of the file include the keyword.

You probably want to run this script in background, e.g. calling it via './run.py &' or via 'nohup ./run.py &'.

A sample invocation could look like this:

nohup ./run.py &

Now the specified script, e.g. a Minecraft server, is running in the background.

echo stop > command.txt

After a short delay, the script in the background will be stopped.