Added MPD shutdown script

master
Markus Koch 2017-02-25 14:08:22 +01:00
parent 8abaa306bb
commit f81fdd7cfa
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
[Unit]
Description=MPD to system shutdown
[Service]
ExecStart=/bin/sh -c "sleep 1 && /usr/bin/inotifywait -e open /media/media/Music/0others/shutdown.mp3 && mpc del 0 && shutdown -h now"
[Install]
WantedBy=multi-user.target
# Courtesy of: http://hannes.enjoys.it/blog/2014/07/shutting-down-the-operating-system-by-playing-a-kill-song-in-mpd/
# When MPD tries to play file, Linux will shut down.
# Copy to /etc/systemd/system/mpdtosystemshutdown.service