@Natanji I suppose something like this should work too:
${NETCAT_CMD} -v -l -p 25565 2>&1 | grep -q -m1 -i "connect" && echo "Netcat caught an connection. The server is coming up again..."
Can you test these changes and confirm that they work for your setup as well? If so, I would publish these with the next minecraft release.
P.S. I assume you wanted to tag me. I created and develop the minecraft server management script and am the current maintainer of this package.
Pinned Comments
edh commented on 2016-06-18 18:24 (UTC) (edited on 2021-10-02 08:19 (UTC) by edh)
To get an overview of the available options provided by the management script, be sure to have a look at the help page or read the according section on the ArchWiki article [1].
You can quit the console without shutting down the server by press ctrl+a d (first ctrl+a and after releasing the buttons press d; ctrl+b also works). This will detach your input from the server console. The attaching and detaching is done with tmux (previously GNU screen) since it lets you view and type into the console, send single commands to it and keep it alive without a connected user. Take a look at the the command overview at the ArchWiki [2] to get a feel for its power. (@carmelo12341)
[1] https://wiki.archlinux.org/title/Minecraft#Setup [2] https://wiki.archlinux.org/title/Tmux