thank you very much for this very usefull thread. I had the same problem especially with the rc.local file (I´am still on 1.1) and the not existing gpio folder. It works flawlessly now.
There is only one thing I can suggest …
I found on a blog a modified version of the script which makes a “cleaner” shutdown. Thanks to astronomydomine, I could adjust it for Volumio.
#this is the GPIO pin connected to the lead on switch labeled OUT
#this is the GPIO pin connected to the lead on switch labeled IN
echo “$GPIOpin1” > /sys/class/gpio/export
echo “in” > /sys/class/gpio/gpio$GPIOpin1/direction
echo “$GPIOpin2” > /sys/class/gpio/export
echo “out” > /sys/class/gpio/gpio$GPIOpin2/direction
echo “1” > /sys/class/gpio/gpio$GPIOpin2/value
while [ 1 = 1 ]; do
if [ $power = 1 -a $oldpower = 0 ]; then
sudo mpc stop
sudo shutdown -h now
You will notice that the power off with the switch needs so more seconds because makes a more safely shutdown.
Maybe you like it