So I have an automatic backup script hourly backing up important files of the server.
It has many lines like this that send input to the screen session the game server console is running in to broadcast when it starts to backup the files:
screen -x $SCREENNAME -X stuff "`printf "say Backing up world: \'$WORLD\'\r"`
It works fine, unless I'm using a different window inside of the screen session.
When I'm using a different window in the same screen session the script tries to execute the
say Backing up world in the bash terminal I'm using which doesn't work and no message gets sent to the game console.
Is there any way to direct the output to a specific screen inside the seesion. My game console is always on the first screen so screen 0.
I'm on CentOS 7 if that's relevant