sudo /usr/local/sbin/wmf-auto-restart -s exim4 fails as its unable to find the MainPID
Feb 27 13:56:30 durum1001 wmf-auto-restart: DEBUG: 2023-02-27 13:56:30,197 : systemctl is-active check returned 0 Feb 27 13:56:30 durum1001 wmf-auto-restart: DEBUG: 2023-02-27 13:56:30,204 : PID query for MainPID returned MainPID=0 Feb 27 13:56:30 durum1001 wmf-auto-restart: INFO: 2023-02-27 13:56:30,208 : Could not query the PID of exim4: 1
Running the pid query directly we get the following
sudo /bin/systemctl show -p MainPID exim4 MainPID=0
I have not looked to much but i did notice the generated systemd unit has GuessMainPID=no. it also has Restart=no and RemainAfterExit=yes which may mean its not ran as a proper daemon.