auto_restart-server.toml gets overwritten on each start
KimoriWasTaken opened this issue ยท 3 comments
Minecraft Version
1.20.1
Minecraft Forge Version
47.2.17
Mod Version
2.0.2
Describe the bug
/home/ubuntu/minecraft/world/serverconfig/auto_restart-server.toml changes get overwritten to default on each start.
Expected behavior
config keeps changes
Steps to reproduce
launch startserver.sh
stop server
inspect .toml
References (optional)
No response
Additional info (optional)
startserver.sh
bash -c 'cd ~/minecraft/; screen -d -m -S minecraft ./start.sh'
start.sh
default start.sh that came with Better MC [FORGE] - BMC4
currently in the process of analyzing if the config settings get overwritten with the start or stop of the server
also trying if only read on .toml is a solution
Greetings,
I am running into this exact issue and I have attempted to recreate your solution on using the full path to the shell files, but I may be misunderstanding.
restart_start.sh
#!/bin/bash cd /data/ screen -d -m -S MinecraftData /data/restart_loop.sh
restart_loop.sh
#!/bin/bash while true do java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.20.1-47.2.14/unix_args.txt read -r should_restart < ./auto_restart/restart if [ $should_restart = "0" ] then break fi echo 'If you want to stop the server completely, press STRG-C, before the countdown is at 1!' echo "Rebooting in:" for i in 5 4 3 2 1 do echo "$i..." sleep 1 done echo 'Server neustart!' done
I am running the server within a docker container that uses the itzg/minecraft-server image. I've verified all files in the /data/ (where the server is installed to) have the correct permissions, as well as verified the configs in /WorldFiles/serverconfig/ have the same permissions.
Update:
I was able to get it to not overwrite anymore. What I ended up needing to do was the start.sh script portion of the mod. I was under the assumption that I could only use the restart part but it seems you need both. Once I set up the start.sh script from:
Linux-Start-Script-Guide
I was able to load up the server without it reverting my config file. Hope this helps the next person!