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

missing restart signature #77

Closed aleivag closed 1 year ago

aleivag commented 1 year ago

created a unit

In [7]: pystemd.run(["/bin/sleep", "infinity"], extra={"Restart": "always"}).Id
Out[7]: b'pystemd71fff13ca22d4168810c828cf6076e76.service'

and then check the unit

~ >>> systemctl cat pystemd71fff13ca22d4168810c828cf6076e76.service                      [1]
# /run/systemd/transient/pystemd71fff13ca22d4168810c828cf6076e76.service
# This is a transient unit file, created programmatically via the systemd API. Do not edit.
[Unit]
Description=pystemd: pystemd71fff13ca22d4168810c828cf6076e76.service

[Service]
ExecStart=
ExecStart="/bin/sleep" "infinity"
RemainAfterExit=no
Restart=always

restart is there... profit!