mark2devel / mark2

Minecraft Multi Server Wrapper Written in Python with Twisted; Pull Requests HIGHLY Encouraged, Collaborators Needed Discord: https://discord.gg/zymJygHNpv
Other
207 stars 44 forks source link

mark2 init.d/systemd script #75

Closed snuufix closed 7 years ago

snuufix commented 7 years ago

Hello, first of all, thank you for this wrapper, it definetly is THE best one. But I'm curious why there are no linux service/startup scripts for it? It would seem a quite requested feature but my searches did not find anything useful. I can write my own, but it would definetly be worse and more buggy than if someone who knows the internals of mark2 would do it.

dwaynehulsman commented 7 years ago

This is in fact really easy to do. I got this from Vemacs's guide:

Run: sudo nano /etc/crontab

Add this to the end, obviously customizing your server location and username: @reboot <username> mark2 start /home/<username>/spigot

Save the file, and that should be covered. If you really need to test it, you can attempt to restart the server: sudo reboot

snuufix commented 7 years ago

Thank you @dwaynehulsman. I'm familiar with crontabs but didn't thought of this easy option. :D The most genious things are always simple. I also created a restart script that will deal even with frozen mark2 each day at 6am.