I try to execute equivalent code as:
systemctl --user --machine=myuser@ show --property=ActiveState,SubState mopidy
I tried the following code, but I can't see my user service:
with DBus(user_mode=True) as bus:
with Manager(bus=bus) as m:
for unit_info in m.Manager.ListUnits():
unit = Unit(unit_info[0], _autoload=True)
if 'mopidy' in unit.Unit.Names:
print(unit.Unit.Names, unit.Unit.ActiveState)
Do you know how to use equivalent of parameter --machine with pystemd please?
I try to execute equivalent code as:
systemctl --user --machine=myuser@ show --property=ActiveState,SubState mopidyI tried the following code, but I can't see my user service:
Do you know how to use equivalent of parameter --machine with pystemd please?