Sample Header Ad - 728x90

Manually stopped service is not properly stopped

0 votes
2 answers
1364 views
I have a Server, that is supposed to activate if someone tries to connect to it. For this I created a systemd socket and service that builds a proxy for my server and starts it. Thanks to this Tutorial it wasn't too hard. I made a FIFO-Pipe to communicate with the running server and if nobody is active on it I want the server to stop. If I stop the Server through the pipe the Server.service stays in a loaded deactivating stop state while the proxy.service stays in the running. (state from systemctl list-units) I want the Service to restart again if someone tries to connect again, but this only works if I manually systemctl stop server.service. ---------- proxy.socket [Socket] ListenStream=25565 [Install] WantedBy=sockets.target proxy.server [Unit] Requires=server.service After=server.service [Service] ExecStart=/lib/systemd/systemd-socket-proxyd 127.0.0.1:25555 server.service [Unit] Description=my Server [Service] User=nonRootUser ExecStart=/home/nonRootUser/server/startup-fifo.sh ExecStop=/home/nonRootUser/server/cmd stop
Asked by Rennsemmel01 (1 rep)
Feb 29, 2020, 06:40 PM
Last activity: Aug 14, 2020, 04:44 AM