#StackBounty: #systemd #gnu-screen #systemd-journald Capture log output for a systemd service running in a screen session

Bounty: 50

I’m running a Minecraft server as a systemd service. The service’s ExecStart is the path to a script whose contents are:

screen -L -DmS minecraft java -Xmx4096M -Xms1024M -jar server.jar nogui

That is, this is running as a simple service, not forked.

I would like for the output of the java call to be logged via systemd’s usual mechanism, in addition to being visible in the screen session. I am almost a total novice when it comes to systemd, so I’m not sure where to start with that. Can I tee the output of the java call into something?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.