wrote script
This commit is contained in:
parent
d1ce66182c
commit
7d1c6130be
34
pianobarstart
Normal file → Executable file
34
pianobarstart
Normal file → Executable file
@ -1 +1,33 @@
|
|||||||
screen -S pianobar -d -m pianobar | node ~/Patiobar/index.js | chromium-browser http://192.168.1.186:3000 &
|
#!/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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user