update flag switched on update
This commit is contained in:
@@ -131,6 +131,7 @@ def index():
|
|||||||
GIF_settings = json.load(open('csv/GIF_settings.json', 'r'))
|
GIF_settings = json.load(open('csv/GIF_settings.json', 'r'))
|
||||||
message_settings = json.load(open('csv/message_settings.json', 'r'))
|
message_settings = json.load(open('csv/message_settings.json', 'r'))
|
||||||
general_settings = json.load(open('csv/general_settings.json', 'r'))
|
general_settings = json.load(open('csv/general_settings.json', 'r'))
|
||||||
|
system_info = json.load(open('csv/system_info.json', 'r'))
|
||||||
try: # incase this doesnt exist
|
try: # incase this doesnt exist
|
||||||
api_keys = api_key2[1]
|
api_keys = api_key2[1]
|
||||||
except:
|
except:
|
||||||
@@ -262,6 +263,10 @@ def stop():
|
|||||||
|
|
||||||
@app.route("/update", methods=['PUT','POST'])
|
@app.route("/update", methods=['PUT','POST'])
|
||||||
def update():
|
def update():
|
||||||
|
system_info = json.load(open('csv/system_info.json', 'r'))
|
||||||
|
system_info["update_available"] = False
|
||||||
|
|
||||||
|
json.dump(system_info, open('csv/system_info.json', 'w+'))
|
||||||
os.system("./update.sh")
|
os.system("./update.sh")
|
||||||
os.system("sudo reboot now")
|
os.system("sudo reboot now")
|
||||||
return index()
|
return index()
|
||||||
|
Reference in New Issue
Block a user