I'm trying to run a Minecraft server like this
[Unit] Description = Run Paperclip server Next = network.target [Service] Type = forking ProtectHome = true ProtectSystem = complete PrivateDevices = true PrivateTmp = true NoNewPrivileges = true InaccessibleDirectories = / root / sys / srv / media - / lost + found ReadWriteDirectories = / opt / minecraft WorkingDirectory = / opt / minecraft User = Minecraft Group = Minecraft ExecStart = / usr / bin / screen -DmS minecraft / usr / bin / java -Xmx1536M -jar paperclip.jar ExecStop = / usr / bin / screen -p 0 -S minecraft -X & # 39; save everything & # 39; ExecStop = / usr / bin / screen -p 0 -S minecraft -X & # 39; stop & # 39; ExecStop = / bin / sleep 5 [Install] WantedBy = multi-user.target
It works except that the systemd will not "come out". It just hangs in the terminal. I can press ctrl-D or eventually, but this is not a desired behavior. What am I missing?