Sample Header Ad - 728x90

Is the systemd dbus service under org.freedesktop.systemd1 able to manage unit templates?

1 vote
1 answer
1490 views
I'm writing a program, which is managing a lot of instances of some unit templates. My plan was, to use the dbus service of systemd to do so. But apparently, the interface on org.freedesktop.systemd1.Manager can only manage either units, which are already loaded, or unit**Files**. The methods, working on unit files dont't work for enabling or starting template instances, because they apparently aren't designed to work with unit names which don't have a unit file with an exactly matching name, and don't find the template corresponding to the matching instance. The methods working on loaded units also need a unit with that exact name to be already loaded, which isn't the case with units, which haven't been instantiated yet. Also the documentation of the interface doesn't really talk about templates. Isn't this interface supposed to be equally powerful as the systemctl command? Am I just missing something about the interface? Or is there another interface, specifically for templates, which I didn't find yet? or is there just not way, to do this stuff with systemd?
Asked by Niclas (11 rep)
Aug 4, 2022, 07:40 AM
Last activity: Aug 6, 2022, 04:35 PM