14 lines
457 B
Desktop File
14 lines
457 B
Desktop File
[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
|
|
|