05-03-2016, 07:19 AM
(05-03-2016, 04:35 AM)LogicParrot Wrote: The problem with the above script is that you cannot easily stop Cuberite when you really want to. Here's a slightly more sophisticated version:
#!/bin/sh if [ -f stop.txt ]; then rm stop.txt; fi # Remove stop.txt if it exists for some reason while [ ! -f stop.txt ]; do # Keep restarting cuberite until user creates stop.txt ./cuberite echo "Restarting Cuberite in 10 seconds..." sleep 10 done rm stop.txt # Clean up by removing stop.txt
If you stop Cuberite normally, it will restart.
If you create a file called stop.txt, and then stop Cuberite, it will actually stop.
Thanks LogicParrot, this solved my problem!!
I had only to change "./cuberite" to "./Cuberite".
So now the restart of server works!!!