check update added
This commit is contained in:
12
server.py
12
server.py
@@ -26,7 +26,7 @@ import urllib.request
|
||||
|
||||
#open('log.txt', 'w').close() #wipe logs
|
||||
|
||||
|
||||
os.system("sudo ./check_update.sh")
|
||||
#api_caller = pexpect.spawn("sudo -E taskset -c 3 python3 api_caller.py")
|
||||
api_caller = pexpect.spawn("sudo -E taskset -c 3 python3 database_caller.py")
|
||||
api_caller.sendline('A')
|
||||
@@ -121,6 +121,7 @@ def index():
|
||||
|
||||
|
||||
templateData = {
|
||||
'system_info':system_info,
|
||||
'currently_displaying': currently_displaying,
|
||||
'not_displaying': not_displaying,
|
||||
'stocks_settings': stocks_settings,
|
||||
@@ -235,8 +236,13 @@ def stop():
|
||||
|
||||
@app.route("/update", methods=['PUT','POST'])
|
||||
def update():
|
||||
os.system("./update.sh")
|
||||
os.system("sudo reboot now")
|
||||
uptodate = os.system('sudo ./check_update.sh')
|
||||
print('python:', uptodate)
|
||||
|
||||
print(uptodate == 'not up to date')
|
||||
print(uptodate == 'up to date')
|
||||
#os.system("./update.sh")
|
||||
#os.system("sudo reboot now")
|
||||
return index()
|
||||
|
||||
@app.route("/restart")
|
||||
|
Reference in New Issue
Block a user