auto startup script added

This commit is contained in:
Neythen 2021-05-05 22:00:12 +01:00
parent 4cc6e07824
commit 07cf1e7c7a
5 changed files with 10 additions and 6 deletions

View File

@ -1 +1 @@
f,9 m,4
1 f m 9 4

View File

@ -57,7 +57,8 @@ def hello():
now = datetime.datetime.now() now = datetime.datetime.now()
timeString = now.strftime("%Y-%m-%d %H:%M") timeString = now.strftime("%Y-%m-%d %H:%M")
LogoList = os.listdir('logos') logos_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos')
LogoList = os.listdir(logos_path)
templateData = { templateData = {
'title' : 'Stock Ticker Control Panel', 'title' : 'Stock Ticker Control Panel',
'time': timeString, 'time': timeString,

3
startup.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cd /home/pi/fintic
python3 server.py

View File

@ -352,8 +352,8 @@ if __name__ == '__main__':
#print(sys.stdin.readlines()) #print(sys.stdin.readlines())
stock_ticker = StockTicker() stock_ticker = StockTicker()
csv_path = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'csv'), 'settings.csv')
f = open('csv/settings.csv') f = open(csv_path)
CSV = csv.reader(f) CSV = csv.reader(f)
@ -369,8 +369,8 @@ if __name__ == '__main__':
#t = time.time() #t = time.time()
#api_caller = pexpect.spawn("sudo -E python3 api_caller.py") #api_caller = pexpect.spawn("sudo -E python3 api_caller.py")
#print('time to call api', time.time()-t) #print('time to call api', time.time()-t)
stock_ticker.getFullStockImage() #stock_ticker.getFullStockImage()
stock_ticker.displayMatrix() #stock_ticker.displayMatrix()
while True: while True: