I'm using my Raspberry Pi as a music server : I've installed MPD running under Archlinux ARM.
I'd like to set a cronjob that would check wether MPD has been active for a given period of time and if it's beeni inactive, safely shutdown the system by issuing a shutdown -h now command.
How can I check wether a daemon has been active or not in the last XXX minutes.