Re: [systemd-devel] Howto detect a program/service is started by systemd?

2025-07-21 Thread Chris Kottaridis
I don't know if it is appropriate or not, but I used the sd-bus library. I just ask systemd if my service is running. If it is running I then get the service's MainPID. If the mainPID matches my process pid then I started from the systemd. If not then I didn't. I only use it for debugging. If I s

[systemd-devel] How to get argument list for methods

2025-06-16 Thread Chris Kottaridis
I am beginning to use the sd-bus library. I have been able to get a couple of properties, MainPID and SubState. I would like to use the Stop method. I am using cups as an example. This commands shows that in thee Unit interface there is a Start and Stop method: $ busctl introspect org.freedesk