File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,7 @@ def PreUp(local, ton):
242242 CheckMytonctrlUpdate (local )
243243 check_installer_user ()
244244 check_vport (local , ton )
245+ warnings (local , ton )
245246 # CheckTonUpdate()
246247#end define
247248
@@ -454,6 +455,21 @@ def CheckMytonctrlUpdate(local):
454455 color_print (local .translate ("mytonctrl_update_available" ))
455456#end define
456457
458+ def print_warning (local , warning_name : str ):
459+ color_print ("============================================================================================" )
460+ color_print (local .translate (warning_name ))
461+ color_print ("============================================================================================" )
462+ #end define
463+
464+ def check_disk_usage (local , ton ):
465+ usage = ton .GetDbUsage ()
466+ if usage > 90 :
467+ print_warning (local , "disk_usage_warning" )
468+ #end define
469+
470+ def warnings (local , ton ):
471+ check_disk_usage (local , ton )
472+
457473def CheckTonUpdate (local ):
458474 git_path = "/usr/src/ton"
459475 result = check_git_update (git_path )
You can’t perform that action at this time.
0 commit comments