Thanks for this Tip.
nano ./button.sh
chmod +x ./button.sh
http://192.168.178.46/gpio-config.php
/home/pi/button.sh 1
/home/pi/button.sh 2
/home/pi/button.sh 3
/home/pi/button.sh 9
nano ./button.sh
chmod +x ./button.sh
http://192.168.178.46/gpio-config.php
/home/pi/button.sh 1
/home/pi/button.sh 2
/home/pi/button.sh 3
/home/pi/button.sh 9
Code:
#!/bin/bash
if [ $# -lt 1 ]
then
echo "Usage : $0 buttonnumber"
exit
fi
case "$1" in
1)
mpc stop
mpc clear
mpc load 'Default Playlist'
mpc play
;;
2)
mpc stop
mpc clear
mpc load musik
mpc play
;;
3)
mpc stop
mpc clear
mpc load Favorites
mpc play
;;
9)
mpc random
mpc next
mpc random
;;
*) echo "Signal number $1 is not processed"
;;
esac