[Solved] restart function doesn't work
#5
Big Grin 
(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!!!Big Grin
Reply
Thanks given by:


Messages In This Thread
[Solved] restart function doesn't work - by xelor - 05-03-2016, 01:49 AM
RE: restart function dont works - by LogicParrot - 05-03-2016, 04:24 AM
RE: restart function doesn't work - by xelor - 05-03-2016, 07:19 AM



Users browsing this thread: 1 Guest(s)