MinecraftServerControl / mscs

Powerful command-line control for UNIX and Linux powered Minecraft servers
https://minecraftservercontrol.github.io
BSD 2-Clause "Simplified" License
485 stars 62 forks source link

Add automatic crash detection and restarts #271

Closed Roflicide closed 3 years ago

Roflicide commented 3 years ago

Hi,

This is an updated PR from #257 : New changes:

I still need to figure out if there's a way to check if there's a server monitor process running without using flock (which the code uses right now). As I mentioned in the last PR, I tried using the createLockFile() function that's in the script but it didn't work for me for some reason.

Probably should also test it a bit more. It does seem to be working as intended on my computer, though!

Thanks

sandain commented 3 years ago

Thanks for the new PR @Roflicide. This looks much better!

I had to rebuild my server a month ago due to a failed drive, and haven't yet installed MSCS (I haven't even played Minecraft in what seems like years). I'll try to make some time soon to give this a try. If @zanix or anyone else has the chance to test this out, and approves it before I get the chance, feel free to merge the PR.

sandain commented 3 years ago

What is the status of this PR? Has anyone been able to test it? I don't have time right now (switching jobs, moving to a new state, etc). The only change request I see is to add documentation for the new options..

Integration with my PR #274 can come before or after this PR as far as I'm concerned..

zanix commented 3 years ago

I haven't had time to test this, and @Roflicide still need to make a couple changes.

Roflicide commented 3 years ago

Just updated the docs! also, i learned today that flock is part of the util-linux package, which is a standard linux package shipped with all linux distros, so i think most people should already have it! but i've updated the install instructions just in case.

anyone else is welcome to do more testing with this PR if they'd like! i'd probably like to do a little more testing, but also good to merge too.

Roflicide commented 3 years ago

Change those calls to flock with $FLOCK

thanks for the catch, fixed!

sandain commented 3 years ago

Sorry all, I moved across the country and don't currently have my server setup for testing purposes. Has this been tested? Is it now ready to merge?

zanix commented 3 years ago

Hey @Roflicide, this needs a rebase

Roflicide commented 3 years ago

Thanks for reviewing @sandain @zanix , going to re-open this as a new PR as I accidently deleted the old fork (but I still have the code)