This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Your plugin could create an empty file that can be tested against in the batch/shell script to determine if it should restart the server, eliminating the need to issue a break to stop the script loop.
During your on enable, check if the flag file exists from a previous restart. If so delete the file.
When the schedule time to restart the server is reached, create the flag file and stop the server.
If a stop command is issued to the server, your plugin should just shutdown normally without creating the file.
The batch/shell script can use an if statement to test if the file exists. If the file exists it loops, if not it exits.
For Batch something like:DoRestart Java –jar craftbukkit.jarIF EXIST C:\Bukkit\restart.flag GOTO DoRestart
For Bashwhile [ -f /bukkit/restart.flag ] ;do java –jar craftbukkit.jardone
or for bash you could use an infinite loop with an if statement that calls the break command.
I like the idea, and will most likely include it in the next update, thanks
To post a comment, please login or register a new account.