<div dir="ltr">Hi there!<div><br></div><div><div>I have a curiosity: is there some way to systemd to detect when all connections to a given socket are closed, so that the service assigned to that socket unit can be automatically stopped (but the socket unit itself keeps listening)? Something similar to StopWhenUnneeded option, which makes a service stop automatically when its dependants have stopped.</div><div><br></div><div>My practical example: I'm trying new possibilities with my single-GPU multi-seat setup (a bare Xorg server spanning all video outputs, on top of which a Xephyr instance is started for each output/seat). My current system starts a socket-activated systemd service for the bare Xorg when my LightDM starts its first Xephyr instance. I would like to stop the bare Xorg service when all Xephyr-based seats are removed (e.g. their master devices are unplugged or LightDM service is stopped).<br clear="all"><div><br></div><div>Thanks in advance!</div><div>-- <br></div><div class="gmail_signature"><div dir="ltr"><div><b>Laércio de Sousa</b><br></div><div style="text-align:center"><div style="text-align:left"><i>Orientador de Informática</i></div><div style="text-align:left"><u>Escola Municipal "Professor Eulálio Gruppi"</u></div><div style="text-align:left"><i>Rua Ismael da Silva Mello, 559, Mogi Moderno</i></div><i><div style="text-align:left"><i>Mogi das Cruzes - SP</i></div><div style="text-align:left"><i>CEP 08717-390</i></div></i></div><div><span style="font-family:arial;font-size:small">Telefone: (11) 4726-8313</span></div></div></div>
</div></div></div>