volumio/Volumio-WebUI — pull request #35 by jomo (2014-09-25 18:34:52+00:00)
Title: Make mpd play nicely with shairport

When shairport starts streaming, mpd will stop playing. (Not sure if this was already in the script :smiley:)
When shairport stops streaming, mpd will start playing again *only* if it has already been playing before.

To determine if mpd is playing it runs `mpc | grep playing` and then creates a file at `/tmp/.restart_mpd`. If that file exists, it will delete it and run `mpc play` after shairport stopped.