check update added
This commit is contained in:
2
csv/system_info.json
Executable file → Normal file
2
csv/system_info.json
Executable file → Normal file
@@ -1 +1 @@
|
||||
{"update_available": false, "first_boot": true}
|
||||
{"update_available": false, "first_boot": false}
|
||||
|
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")
|
||||
|
@@ -52,7 +52,13 @@
|
||||
|
||||
<link
|
||||
|
||||
rel="stylesheet"
|
||||
rel="stylesheet"
|
||||
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/fontawesome.min.css"
|
||||
|
||||
integrity="sha512-kJ30H6g4NGhWopgdseRb8wTsyllFUYIx3hiUwmGAkgA9B/JbzUBDQVr2VVlWGde6sdBVOG7oU8AL35ORDuMm8g=="
|
||||
|
||||
crossorigin="anonymous"
|
||||
|
||||
/>
|
||||
|
||||
|
Reference in New Issue
Block a user