On Tue, 2015-06-09 at 19:33 +0200, Jakub Skořepa wrote: > Hello, > My name is Jakub Skořepa and I'm working on Cockpit UI for Systemd > Timers. > > For that I need to create and modify systemd unit files. Cockpit uses > D > -Bus for everything so I need D-Bus API for that. I think that it > would > be beneficial if systemd was able to create unit files on-the-fly > using > through D-Bus method call. > > I plan creating simple server for doing this task but long-term it > woul > d be better if systemd was capable of doing this. > > I propose methods with following signatures: > > # CreateUnit: > > Creates specified unit > > sa{sa{ss}} > | | || > Name | |Value > Section name | > Key > > # ModifyUnit: (same signature) > > If section/key is not then section/key is left intact. > If Value="" then key is erased. > > # CreateUnits: > > Creates multiple units. Same as CreateUnit called for each top-level > > array element. > > a{sa{sa{ss}}} > | | || > Name | |Value > Section name | > Key > > # ModifyUnits: (same signature as CreateUnits) > > Modifies multiple units. Same as ModifyUnit called for each top > -level > array element. >
In order for ModifyUnit() to work, there also needs to be a way to retrieve the current definition of the unit on the system. (And, ideally, a way to retrieve this for any unit currently loaded into systemd).
signature.asc
Description: This is a digitally signed message part
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel