mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-12 08:29:16 +00:00
Fix lnbits status color
This commit is contained in:
parent
982dd407d5
commit
b040bff158
|
@ -546,9 +546,9 @@ def get_lnbits_status_and_color():
|
|||
if is_lnbits_enabled():
|
||||
status_code = get_service_status_code("lnbits")
|
||||
if status_code != 0:
|
||||
lnbits_status_color = "red"
|
||||
color = "red"
|
||||
else:
|
||||
lnbits_status_color = "green"
|
||||
color = "green"
|
||||
else:
|
||||
status = "Waiting on LND..."
|
||||
return status,color
|
||||
|
@ -876,6 +876,26 @@ def has_sd_rw_error():
|
|||
return os.path.isfile("/tmp/sd_rw_error")
|
||||
|
||||
|
||||
#==================================
|
||||
# Out of Memory Error Functions
|
||||
#==================================
|
||||
def has_oom_error():
|
||||
return os.path.isfile("/tmp/oom_error")
|
||||
def clear_oom_error():
|
||||
os.system("rm -f /tmp/oom_error")
|
||||
os.system("rm -f /tmp/oom_info")
|
||||
def set_oom_error(oom_error):
|
||||
os.system("touch /tmp/oom_error")
|
||||
set_file_contents("/tmp/oom_info", oom_error)
|
||||
def get_oom_error_info():
|
||||
try:
|
||||
with open("/tmp/oom_info", "r") as f:
|
||||
return f.read()
|
||||
except:
|
||||
return "ERROR"
|
||||
return "ERROR"
|
||||
|
||||
|
||||
#==================================
|
||||
# Docker Functions
|
||||
#==================================
|
||||
|
|
Loading…
Reference in New Issue
Block a user