systemd / pystemd

A thin Cython-based wrapper on top of libsystemd, focused on exposing the dbus API via sd-bus in an automated and easy to consume way.
GNU Lesser General Public License v2.1
414 stars 36 forks source link

adding missing propertied for unit #82

Closed aleivag closed 1 year ago

aleivag commented 1 year ago

also added the change log

aleivag commented 1 year ago

for test


In [6]: pystemd.run(['/bin/true'], wait=True, raise_on_fail=True, extra={"Restar
   ...: tUSec": 42}, remain_after_exit=True)
Out[6]: <pystemd.systemd1.unit.Unit at 0x7ff6249218a0>

In [7]: u = _

In [8]: u.Id
Out[8]: b'pystemd7c20d033241146eab369a59d552a5319.service'
~ >>> systemctl cat pystemd7c20d033241146eab369a59d552a5319.service   
# This is a transient unit file, created programmatically via the systemd API. Do not edit.
[Unit]
Description=pystemd: pystemd7c20d033241146eab369a59d552a5319.service

[Service]
ExecStart=
ExecStart="/bin/true"
RemainAfterExit=yes
RestartSec=42us
~
~
~
~