Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Test whether Moode startup has completed from systemd service file
#13
(05-03-2023, 04:55 PM)adrii Wrote: This is essentially working. mpd_oled starts correctly at boot, the service can be started and stopped. The only issue is that stopping the service now leaves some pixels lit on the OLED, so it appears that when the service stops a script that runs mpd_oled it is not the same as when the service directly stops the mpd_oled process. I can probably fix this with an ExecStop in the service file to stop the mpd_oled process with an appropriate signal.

I found a natural solution, which is to run mpd_oled with 'exec' at the end of the launch script. This allows the mpd_oled process to receive the SIGTERM signal sent by systemd when it stops the service, and mpd_oled can then clear the OLED display before it shuts down, just like when it is run directly by the service.

Adrian.
Reply


Messages In This Thread
RE: Test whether Moode startup has completed from systemd service file - by adrii - 05-09-2023, 07:28 AM

Forum Jump: