05-04-2023, 02:42 PM
From script you can test the status if mpd is running as following
Exit status is 0 when running.
Alternative you can use the exit status of `systemctl status mpd`.
You can also monitor the status of mpd by code. See for example my python script mpd2cdspvolume.
Code:
mpc
echo $?
Exit status is 0 when running.
Alternative you can use the exit status of `systemctl status mpd`.
You can also monitor the status of mpd by code. See for example my python script mpd2cdspvolume.