2020-02-26 04:51:48 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#create variable with path to patiobar folder
|
|
|
|
patiodir="/home/pi/Patiobar"
|
|
|
|
|
|
|
|
# change directory to the contents of $patiobar variable
|
|
|
|
cd ${patiodir}
|
|
|
|
|
|
|
|
# define screenPb function
|
|
|
|
screenPb(){
|
|
|
|
screen -S pianobar -d -m pianobar
|
|
|
|
}
|
|
|
|
|
|
|
|
# define runNode function
|
|
|
|
runNode(){
|
|
|
|
node index.js
|
|
|
|
}
|
|
|
|
|
|
|
|
#define openBrowser function
|
|
|
|
openBrowser(){
|
|
|
|
chromium-browser http://192.168.1.186:3000 </dev/null &>/dev/null &
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#call all functions 1 by 1
|
|
|
|
screenPb
|
|
|
|
runNode
|
|
|
|
openBrowser
|
|
|
|
|
|
|
|
# Keeping for later
|
|
|
|
#screen -S pianobar -d -m pianobar | node ~/Patiobar/index.js | chromium-browser #http://192.168.1.186:3000 &
|
|
|
|
|
|
|
|
#screen will not open after all is done, must be opened manually.
|