summaryrefslogtreecommitdiff
path: root/btn_track.sh
diff options
context:
space:
mode:
Diffstat (limited to 'btn_track.sh')
-rw-r--r--btn_track.sh37
1 files changed, 0 insertions, 37 deletions
diff --git a/btn_track.sh b/btn_track.sh
deleted file mode 100644
index c6a3ce5..0000000
--- a/btn_track.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-#Set GPIO ID with push button
-GPIO_ID="24"
-
-#Initialize GPIO
-echo $GPIO_ID > /sys/class/gpio/export
-echo in > /sys/class/gpio/gpio$GPIO_ID/direction
-
-#Start MPC
-mpc clear
-mpc load radios
-mpc repeat on
-mpc play
-
-printf "MPC started"
-
-i=0
-echo "Loop check push"
-while :
-do
- until /bin/grep 1 /sys/class/gpio/gpio$GPIO_ID/value >> /dev/null
- do
- /bin/sleep .1
- done
-
- let i++
- if [ $i -ge 30 ]
- then
- printf "Shutdown by button"
- sudo systemctl poweroff
- break
- fi
-
- echo "Next Track"
- mpc next
-done