Autostart server

Jelass

New Member
Aug 25, 2019
0
0
1
Hello everyone. I have a problems. First time make server, decide to use FTB. Server work good, from the box, it's awesome. But i can't do autostart. I google something, no one way working. My conf - centos, for autostart use crontab and screen. "@reboot screen /(way to start.sh)/start.sh". But it's not working. If start manualy by "screen ./start.sh" all good, working in background. Help please. Thanks for any answers.
 

grandrolf

Global moderator
Team Member
Global Moderator
Trusted User
Aug 29, 2014
2,658
246
133
sweden
I wouldn't suggest that you try and reboot/close the screen on a schedule - from the Minecraft servers perspective that would be the same as a force shutdown - might make your world corrupt due to sudden forced stop (about the same as pull the power to the server).

The things that you're asking about is not really a Minecraft or FTB "issue", it's related to your setup/os etc.

If you want to use crontab then you need to send the commands -> the screen to be executed in the same fashion as input from you to the console of the Minecraft server.

ex:
screen -p 0 -S SCREENNAME -X eval 'stuff \"stop\"\015'"
(and add the timings that you want)

I would suggest that you find and download some kind of maintenance (or write it yourself), script that contains the tasks that you want to perform - and call on the script + command from crontab instead - but to get you started, above should work.