Search code examples
linuxsystemdsystemctl

Is it possible to attach to a session that is being used by a service similar to the screen command?


I am running a game server as a service using systemctl to start and stop a script that runs the whole thing. I tried to modify the script to let me use a screen so I could attach to the process that the server is being run on, and issue commands. But so far I've not had much luck. Is it possible to attach to services that are running on a server?


Solution

  • This question belongs on the Unix/Linux StackExchange.

    See e.g: https://unix.stackexchange.com/questions/453998/systemd-connect-to-stdin-stdout-after-service-has-started

    If you want to solve it via programming, you could consider writing a small web application as the interface instead of the console.