06-20-2024, 10:46 AM
Create a script like below in your home directory for example /home/pi/shutdown_pi.sh
Mark it as executable
Specify the script in your remote config
If the remote config does not run as root then use sudo poweroff in the script.
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.