Ok it seems /org/freedesktop/systemd1/unit/self is exactly what I was
looking for.
Thank you for your fast response.
Le mar. 10 nov. 2020 à 18:23, Mantas Mikulėnas a écrit :
>
> You can call org.freedesktop.systemd1.Manager.GetUnitByPID() to directly get
> the D-Bus object path based on your PI
You can call org.freedesktop.systemd1.Manager.GetUnitByPID() to directly
get the D-Bus object path based on your PID.
There is also the magic path "/org/freedesktop/systemd1/unit/self" which
always gives properties of the same service (or scope) that you're in.
Finally, it is possible to call sd_
Hello,
My service needs to behave a bit differently when it has been
automatically because of a software fault. I use the
"Restart=on-failure", and I understand that I can read the "NRestarts"
property which is incremented whenever the service is restarted.
The thing is, inside my service, I have