[systemd-devel] "StopWhenUnneeded"-like option for socket-activated services?

Laércio de Sousa laerciosousa at sme-mogidascruzes.sp.gov.br
Thu Sep 17 04:02:21 PDT 2015


Hi there!

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.

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).

Thanks in advance!
-- 
*Laércio de Sousa*
*Orientador de Informática*
*Escola Municipal "Professor Eulálio Gruppi"*
*Rua Ismael da Silva Mello, 559, Mogi Moderno*
*Mogi das Cruzes - SPCEP 08717-390*
Telefone: (11) 4726-8313
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150917/c269c350/attachment.html>


More information about the systemd-devel mailing list