I've been trying to set up an automated backup system for a minecraft server, and I'm having trouble with screen, specifically when using 'screen -r sessionname -X "/var/minecraft/somebatchfile"', nothing happens.
My process flow is somewhat like this at the moment:
screen -m -d -S minecraft /var/minecraft/bin/server_nogui.sh
This starts the minecraft server without any trouble. However, the issue is that even simple followups like this fail:
screen -r minecraft -X "stop"
I get no error message or success message, and the server does not actually disconnect clients and shut down, like it should. I assume I'm doing something wrong, but I don't know what. Is there some obvious mistake I'm making? I've read the man page a bit but I'm having no luck figuring it out myself.