3

Ranters, I need help
Does anyone know how can I run something as a systemd service and still have access to the "console" - the input and output of the program, when I need it?

(It is a minecraft forge server and there are multiple people managing the physical server and one of them managed to corrupt the map yesterday by rebooting the machine without stopping the minecraft server... so there comes the need for a service so it can shut down before the machine reboots... but I also need the access to the console of said minecraft server because sometimes when some modded items are misbehaving the rcon will stop responding while the console still works)

Edit: currently I am running the minecraft server in a detached screen (ddg "screen linux" if you don't know what I am talking about)

Comments
  • 0
    You can connect the io to an socket. man 5 systemd.exec
    Search term: StandardInput=
  • 0
    @stop sounds interesting, where would I redirect it though?

    edit: and more importantly how would I access it?

    (To be clear, I am mostly using Windows and I know how to do some basic tasks in Linux but this is like a spanish village for me)
  • 1
    @stop I would prefer some easy solution that resembles what I am doing now, which is "screen -R"
  • 0
    I have run multiple small Minecraft servers in the past and I always just have an rcon command, so I can run mc commands right from the terminal. I watch the logs with journalctl -f -u minecraftservice

    Edit: didn't read your rant good enough :P
  • 0
Add Comment