alip / mpdcron

A ‘cron’ like program for mpd. It can execute scripts based on mpd’s idle events.
http://mpd.wikia.com/wiki/Client:MPDCRON
GNU General Public License v2.0
33 stars 8 forks source link

systemd support #25

Open jgresty opened 9 years ago

jgresty commented 9 years ago

It would be nice to have some systemd support. I have a service file for my own use that could work:

[Unit]
Description=mpdcron

[Service]
Environment="MPDCRON_DIR=/var/lib/mpd/mpdcron"
ExecStart=/usr/bin/mpdcron --no-daemon

[Install]
WantedBy=multi-user.target
mufasa71 commented 9 years ago

+1 Also it would be better to add something like code below, to check if mpd is running.

Requires=mpd.service
After=mpd.service