crazy-max / csgo-server-launcher

Counter-Strike Global Offensive Dedicated Server Launcher
GNU Lesser General Public License v3.0
586 stars 119 forks source link

How to run commands via one-liner SSH and get output? #59

Closed HTMHell closed 4 years ago

HTMHell commented 5 years ago

I have a NodeJS script that connects to the server via SSH. I want to run commands at /etc/init.d/csgo-server-launcher console in that SSH connection. I managed to do so by running the following command: export TERM=screen && echo "command" | /etc/init.d/csgo-server-launcher console The only issue is, I don't get an output, because the console is still hanging there.

I want to run the command host_map and get the output. Is it possible?

I think that if I close the csgo-server-launcher console terminal it will fix that issue. Is it possible to that? (like exit in MySQL)

crazy-max commented 4 years ago

This is not currently supported. Feel free to open a PR to fix that. Thanks.