powerblockswitchoff.sh commands not working
-
My PowerBlocks are working just fine. I read that I can edit /etc/powerblockswitchoff.sh and I am trying to play an alarm sound when the power button is pressed to power down.
#!/bin/bash
play alarm.mp3
sleep 10
systemctl poweroffIf I run the script manually it sounds the alarm, sleeps for 10 seconds and then and shuts down.
If I press the power button it sleeps for 10 seconds and then shuts down, but the alarm sound does not play.
Anyone give me a clue?
-
@clarke-baxter give the full path to the MP3 to the play command. Eg
play /path/to/file.mp3
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.