Is there a way for the plugin to check for a crash?
Is there a way for the plugin to check for a crash?
Not really. If the server has crashed, the plugin wouldn't be loaded. Plugins can only work if the server is running.
Could write something to a data/config file when the plugin is loaded and unloaded. Then if the plugin starts up and the file doesn't contain the right message, you know the server crashed and the plugin wasn't shut down properly.
Wulf
Not really. If the server has crashed, the plugin wouldn't be loaded. Plugins can only work if the server is running.
Well, then, I would like to know how to check if there is a server crash with a discord bot.
The only time it would know is if it isn't online or if you do what was suggested above.krwolf76
Well, then, I would like to know how to check if there is a server crash with a discord bot.
Well in theory, plugin can modify server process and add crash handler (if references will be unlocked)Wulf
Not really. If the server has crashed, the plugin wouldn't be loaded. Plugins can only work if the server is running.
You haven't mentioned which OS or installation method you used, but if you're using LGSM it has a useful command 'monitor' which checks if the server is reachable, and if not it auto-restarts it. You would just run this regularly via a cron job.
JimDeadlock
You haven't mentioned which OS or installation method you used, but if you're using LGSM it has a useful command 'monitor' which checks if the server is reachable, and if not it auto-restarts it. You would just run this regularly via a cron job.
os windows 10 :(
We provide basic batch and shell scripts that handle that as well for both Windows and Linux.JimDeadlock
You haven't mentioned which OS or installation method you used, but if you're using LGSM it has a useful command 'monitor' which checks if the server is reachable, and if not it auto-restarts it. You would just run this regularly via a cron job.