Habe mal fix Script gebastelt , Grundstruktur:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/bin/bash while true do if [ "$(grep "RUNNING" /proc/asound/card1/pcm0p/sub0/status)" ]; then #vol=`<Abfrage Volume>` #if [ "$vol" -gt "<schwellwet>" ]; then #python3 <py scriptpfad zum setzen von 1> #else #python3 <py scriptpfad zum setzen von 0> #fi echo "running" else #python3 <py scriptpfad zum setzen von 0> echo "not_running" fi sleep 0.5 done |
"running" bezieht sich hier nur auf Status der Karte.
–
Für anschließend: Beendet sich das py Script eigentlich wenn es ausgeführt wurde?