mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 06:16:08 +01:00
find and update email disk usage, ref: https://github.com/usmannasir/cyberpanel/issues/872
This commit is contained in:
@@ -1195,6 +1195,14 @@ class virtualHostUtilities:
|
||||
except:
|
||||
return [int(0), int(0)]
|
||||
|
||||
@staticmethod
|
||||
def getDiskUsageofPath(path):
|
||||
|
||||
try:
|
||||
return subprocess.check_output('du -hs %s --block-size=1M' % (path), shell=True).decode("utf-8").split()[0]
|
||||
except BaseException:
|
||||
return '0MB'
|
||||
|
||||
@staticmethod
|
||||
def permissionControl(path):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user