i am trying to create simple monitor of icecast service,
is there reason why pystemd is returning Service.MainPID always 0 ?
In [2]: unit = Unit("icecast2.service", _autoload=True)
In [3]: unit.Service.MainPID
Out[3]: 0
systemctl status icecast2.service
● icecast2.service - LSB: Icecast2 streaming media server
Loaded: loaded (/etc/init.d/icecast2; generated)
Active: active (running) since Sun 2024-04-14 20:46:21 UTC; 44min ago
Docs: man:systemd-sysv-generator(8)
Process: 2091674 ExecStart=/etc/init.d/icecast2 start (code=exited, status=0/SUCCESS)
hi
i am trying to create simple monitor of icecast service, is there reason why
pystemd
is returningService.MainPID
always0
?real
PID
: