You are not logged in.
I'm having a problem with a script I wrote for my Minecraft server. The script is written to dynamically update a configuration file on one of my plugins, then reload the plugin after the file change. My minecraft server console is running in a screen instance, so the script line I use is
screen -S minecraft -X eval 'stuff "[minecraft command]"\015'
This line works flawlessly when I execute it from my shell, but it won't run from my script. Is there a problem with the way the command has been added to my script,. or is there some screen configuration that I need to do in order for it to accept commands from a script?
Offline
I've been having similar problems with an opensim server and screen, and here's what I found:
terminate the server command with "^M" (ctrl-V ctrl-M to get the character).. I'm also not so sure you need eval (see below):
screen -S minecraft -X stuff "[minecraft command]^M"
The other thing I've noted is that if I start the server at boottime, the commands don't get to the server until I've attached and detached the screen session once. (I don't have to do anything once I attach, just attach and detach and my scripts start working).
Re eval: I found a more reliable way to get information back from the server was to temporarily enable screen logging to a temp file, and parse the log file.
Last edited by Roken (2012-07-18 08:14:59)
Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703
/ is the root of all problems.
Offline