also die gpio-button.py nimmt den GPIO Befehl des buttons auf und schickt ihn an die playout_controls.sh in dieser kümmern sich dann viele Zeile um den shutdown mit dem Befehl sudo halt, wenn ich das jetzt richtig sehen
Hier mal Zeile 140-169 der playout_controls
Code
case $COMMAND in
shutdown)
if [ "$DEBUG" == "true" ]; then echo " shutdown" >> $PATHDATA/../logs/debug.log; fi
$PATHDATA/resume_play.sh -c=savepos && mpc clear
#remove shuffle mode if active
SHUFFLE_STATUS=$(echo -e status\\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=random: ).*')
if [ "$SHUFFLE_STATUS" == 1 ] ; then mpc random off; fi
sleep 1
/usr/bin/mpg123 $PATHDATA/../shared/shutdownsound.mp3
sleep 3
sudo halt
;;
shutdownsilent)
# doesn't play a shutdown sound
$PATHDATA/resume_play.sh -c=savepos && mpc clear
#remove shuffle mode if active
SHUFFLE_STATUS=$(echo -e status\\nclose | nc -w 1 localhost 6600 | grep -o -P '(?<=random: ).*')
if [ "$SHUFFLE_STATUS" == 1 ] ; then mpc random off; fi
sudo halt
;;
shutdownafter)
# remove shutdown times if existent
for i in `sudo atq -q t | awk '{print $1}'`;do sudo atrm $i;done
# -c=shutdownafter -v=0 is to remove the shutdown timer
if [ $VALUE -gt 0 ];
then
# shutdown pi after $VALUE minutes
echo "$PATHDATA/playout_controls.sh -c=shutdownsilent" | at -q t now + $VALUE minute
fi
;;
Alles anzeigen
wie man das jetzt für das Display abfangen kann, keine Ahnung. Ich denke man müsste diese playout_controls.sh für das display anpassen und den trigger dort einsetzen