JACOBSMILE / tmodloader1.4

An easy to configure Docker Image for tModLoader 1.4 servers.
Other
120 stars 29 forks source link

Add redirect to allow for tty input. #53

Open shimmeringDiamond opened 2 months ago

shimmeringDiamond commented 2 months ago

Sometimes you will want to send input to the server via enabling the tty (docker run -t) and writing terraria console commands there. This is more convenient than using docker exec tmodloader inject, but its not possible by default since nothing reads from the tty.

So I made a small script that will redirect input from the tty to a pipe and then send the lines from that pipe to tmux via tmux send-keys. Admittedly this workaround results in console commands that are inputed into the tty being printed twice, but I am not sure how to fix that.

tty being used to input command in portainer