RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    powerblockswitchoff.sh commands not working

    Scheduled Pinned Locked Moved Help and Support
    shutdown script
    2 Posts 2 Posters 292 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      clarke-baxter
      last edited by

      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 poweroff

      If 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?

      BuZzB 1 Reply Last reply Reply Quote 0
      • BuZzB
        BuZz administrators @clarke-baxter
        last edited by BuZz

        @clarke-baxter give the full path to the MP3 to the play command. Eg

        play /path/to/file.mp3

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        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.