A
Admincraft2mo ago
ned

Auto restart for fabric (1.20.1) server on linux

I've googled this a lot, and i havent found a solution that works. I've looked at https://flags.sh/ but that creates a 'server.jar', and my instance has 'fabric-server-launcher.jar' that seems to have a different file structure. I'm on a fairly modded world, I've tried to set it so it restarts (with a systemd service) but since the script has a Read-Host (linux equivalent) , it thinks that the server is still running because enter has not been pressed for that prompt. So I just want a way to restart my server when it crashes, that is it.
flags.sh
flags.sh
A simple script generator to start your Minecraft servers with optimal flags.
10 Replies
bedwersXD
bedwersXD2mo ago
just rename the jar, doesn’t affect its functionality
SilentBot
SilentBot2mo ago
Or change the server.jar field on flags.sh to fabric-server-launcher.jar ¯\_(ツ)_/¯
bedwersXD
bedwersXD2mo ago
=)
ned
nedOP2mo ago
this is after renaming it
No description
ned
nedOP2mo ago
i found this in the original start.sh script. this should work...
No description
bedwersXD
bedwersXD2mo ago
try @SilentBot 's suggestion
ned
nedOP2mo ago
and have them both present in the directory?
bedwersXD
bedwersXD2mo ago
of course .-.
ned
nedOP2mo ago
okay i fixed it. there was a variable.txt file that i could choose: restart=true (it was set to false) and now it works thanks for prodding my mind though lol
bedwersXD
bedwersXD2mo ago
np!

Did you find this page helpful?