misc/mpdtosystemshutdown.service

14 lines
457 B
SYSTEMD
Raw Normal View History

2017-02-25 14:08:22 +01:00
[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