Hi I have a problem with a solution to my previous question about getting something to check if the server is started.
So when I use Pgrep -f in my startup script to check if the MC server is running, it does the job, but after multiple restarts the terminal window starts showing pid numbers instead of the actual Minecraft commandline. This was not a problem before since I used to run it with GUI which I don't do anymore.
Picture of my commandline after 3 restarts
My startup script looks like this
#!/bin/sh
while true
do
if ! pgrep -f server.jar
then
java -Xms6G -Xmx6G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -
XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -
XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -
XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -
XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -
XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -
XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true
-jar server.jar --nogui
fi
sleep 5
done