File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ def get_status():
4343 temp = "undefined"
4444
4545 uptime = subprocess .check_output (["uptime" ]).decode ('utf-8' ).replace ('\n ' , '' )
46- internet_status = subprocess .check_output (["./scripts /check_conn.sh" ]).decode ('utf-8' ).replace ('\n ' , '' )
46+ internet_status = subprocess .check_output (["./utils /check_conn.sh" ]).decode ('utf-8' ).replace ('\n ' , '' )
4747 return {'internet_status' : internet_status ,
4848 'temp' : temp ,
4949 'uptime' : uptime }
@@ -52,9 +52,12 @@ def get_status():
5252def get_info ():
5353 # [:-2] strips out '\n' (cat)
5454 try :
55- backend_commit = subprocess .check_output (["git" , "rev-parse" , "HEAD" ])[0 :7 ].decode ('utf-8' )
55+ with open ('manifest.json' , 'r' ) as f :
56+ metadata = json .load (f )
57+ backend_commit = metadata ["backendCommit" ][0 :7 ]
5658 except :
57- backend_commit = 'undefined'
59+ backend_commit = "undefined"
60+
5861 try :
5962 coderbot_version = subprocess .check_output (["cat" , "/etc/coderbot/version" ]).decode ('utf-8' ).replace ('\n ' , '' )
6063 except :
File renamed without changes.
You can’t perform that action at this time.
0 commit comments