[Solved] Power off with switch and relay and gpio

I have build system that switch of power to raspberry after a while that are in halt state with switch relays GPIO transistor rc and bash script and work well but, after I have installed folve from Klaus instructions (and autorun), when switch off from rocker after a while power off (ok) but when restart Web ui not working, I don’t connect from phone ecc… But mpd is up, I should stop mpd service and restart to working. Strange story:if power of from webui and restart all working. You know what command webui power off button send to system? I have Volumio 1.2 and shutdown with sudo shutdown - h now command.
Thanks in advance

Inviato dal mio Nexus 4 utilizzando Tapatalk

Maybe solved:i test it.
In my script for shutdown system kill folve,sleep 10 sec,stop mpd service,sleep 10 sec and the last shutdown.
my script:


echo “ATXRaspi shutdown script starting…”
echo “Asserting pins (17=in,low; 18=out,low)”

gpio -g mode 17 in
gpio -g mode 17 up
gpio -g write 17 1
gpio -g mode 18 out
gpio -g write 18 1
gpio -g mode 23 out
gpio -g write 23 1


#while [ $COUNTER -lt 10 ]; do
while [ 1 ]; do
#echo Looping - counter is $COUNTER
#sleep 1
if [ “$(/home/volumio/wiringPi/gpio/gpio -g read 17)” = “0” ]; then
echo “PIN17 requested a SYSTEM HALT !”
sudo killall folve
sudo sleep 10
sudo service mpd stop
sudo sleep 10
sudo shutdown -h now
sudo sleep 0.5

exit 0

i’m not espert on linux and copy more from linux but seem to work…

Секрет евреев: Еврейские мужчины лечат простатит за 2-3 недели!
Один раз в жизни! Раз и навсегда! Узнаем как… bit.ly/3bqeXp9