Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • This doesn't seem to work when services go into an inactive state (by exiting with success and Restart=on-failure or similar)--is there a way to have the socket stop in this case? Commented Oct 10, 2023 at 16:29
  • When the process closes, I think EOF is sent along the socket to the consumer. In most cases, the other end will close the socket upon receiving an EOF. In the case above, I was testing everything with netcat which does close the socket and exit itself when EOF is received. Commented Oct 11, 2023 at 7:11
  • I see, so it might work if my service closed the socket, I'll have to give that a try. I was trying to avoid reactivation which I was able to fix with remainafterexit. But closing may be a better solution. Commented Oct 14, 2023 at 18:03