I'm working with an external service that creates its own systemd scopes like system.slice/someapp.slice/instance-400.scope
or user.slice/user-1000.slice/app-1234.scope
.
The scope names embed the pid, so they are dynamic. The Id
and Name
both match the unit name exactly.
Does systemd offer any way to write a .scope
unit file that will apply [Scope]
properties to all instances of the scope by name pattern matching it, or is this something that can only really be done with the cooperation of the launching app?
Details/related at: Applying systemd control group resource limits automatically to specific user applications in a gnome-shell session