bug fix: change path of bwmeta
This commit is contained in:
parent
d3401522bd
commit
0b4005e5c3
|
|
@ -25,12 +25,13 @@ class findBWUsage:
|
|||
if not os.path.exists("/home/"+domainName+"/logs"):
|
||||
return 0
|
||||
|
||||
bwmeta = "/home/" + domainName + "/logs/bwmeta"
|
||||
bwmeta = "/home/cyberpanel/%s.bwmeta" % (domainName)
|
||||
|
||||
if not os.path.exists(path):
|
||||
writeMeta = open(bwmeta, 'w')
|
||||
writeMeta.writelines('0\n0\n')
|
||||
writeMeta.close()
|
||||
os.chmod(bwmeta, 0o600)
|
||||
return 1
|
||||
|
||||
if os.path.exists(bwmeta):
|
||||
|
|
@ -56,6 +57,8 @@ class findBWUsage:
|
|||
writeMeta.writelines(str(currentLinesRead) + "\n")
|
||||
writeMeta.close()
|
||||
|
||||
os.chmod(bwmeta, 0o600)
|
||||
|
||||
except BaseException as msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [calculateBandwidth]")
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue