Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Is there Command to Shutdown Moodeaudio
#1
Hi

Is there a command usig MPC to shutdown moodeaudio using remoto control
I have try the following but still can,t seem to get it to work


 many thanks

begin
prog = irexec
button = KEY_POWER
config = mpc shutdown now
end

begin
prog = irexec
button = KEY_POWER
config = mpc stop; sudo shutdown -h now
end
Reply
#2
Create a script like below in your home directory for example /home/pi/shutdown_pi.sh
Code:
#!/bin/bash
mpc stop
poweroff

Mark it as executable
Code:
sudo chmod +x /home/pi/shutdown_pi.sh

Specify the script in your remote config
Code:
config = /home/pi/shutdown_pi.sh

If the remote config does not run as root then use sudo poweroff in the script.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(06-20-2024, 10:46 AM)Tim Curtis Wrote: Create a script like below in your home directory for example /home/pi/shutdown_pi.sh
Code:
#!/bin/bash
mpc stop
poweroff

Mark it as executable
Code:
sudo chmod +x /home/pi/shutdown_pi.sh

Specify the script in your remote config
Code:
config = /home/pi/shutdown_pi.sh

If the remote config does not run as root then use sudo poweroff in the script.

Many Thanks Tim it works like charm
Reply


Forum Jump: