Created
January 21, 2017 13:24
-
-
Save premek/ea2273c635dc83468d1931c6fb76b91a to your computer and use it in GitHub Desktop.
guitar start/restart/record scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if test "$1" = "record"; then | |
killall chuck.alsa; chuck.alsa --dac3 --adc3 --in1 --bufsize100 /home/pi/chuck/g.ck /home/pi/chuck/rec.ck:/home/pi/rec.wav & | |
exit | |
fi | |
if test "$1" = "play"; then | |
killall chuck.alsa; chuck.alsa --dac3 --adc3 --in1 --bufsize100 /home/pi/chuck/g.ck & | |
exit | |
fi | |
killall chuck.alsa; chuck.alsa --dac3 --adc3 --in1 --bufsize100 /home/pi/chuck/g.ck & | |
bash /home/pi/jslisten/jslisten.sh 2>&1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Generic] | |
program="/home/pi/guitar.sh record" | |
button1=8 | |
button2= | |
button3= | |
button4= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Generic] | |
program=/home/pi/guitar.sh play | |
button1=9 | |
button2= | |
button3= | |
button4= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /home/pi/jslisten | |
killall jslisten | |
for F in jslisten-*; do | |
echo Running $F | |
cp $F /home/pi/.jslisten | |
start-stop-daemon --name $F --start --exec /usr/bin/sudo -- -H -u pi "/home/pi/jslisten/jslisten" & | |
sleep 1 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/rc.local | |
#... | |
/usr/bin/sudo -H -u pi bash /home/pi/guitar.sh & | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment