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?
Is it possible to attach to a session that is being used by a service similar to the screen command?
Asked
Active
Viewed 1,380 times
-1
-
I’m voting to close this question because it belongs on https://unix.stackexchange.com/ – GeertPt Jul 07 '21 at 12:09
2 Answers
0
Not in systemd, but you can start the service using
screen -D -m yourservice
which will create a detached screen session that will wait for the process to exit (so systemd does not see the service terminating immediately if you use this in an ExecStart
line). You can then attach to that session normally.

Simon Richter
- 28,572
- 1
- 42
- 64
0
This question belongs on the Unix/Linux StackExchange.
If you want to solve it via programming, you could consider writing a small web application as the interface instead of the console.

GeertPt
- 16,398
- 2
- 37
- 61