'sys': '/var/log/syslog',
'smb': '/var/log/samba',
'zfs': '/var/log/zpool.log',
- 'alloc': '/tmp/alloc',
+ 'alloc': '/var/log/du.log',
'postfix': '/var/log/mail.log',
'httpd': '/var/log/apache2'
}
closetag(tag, 1)
tempfile.close()
mailprep(config['output'], MAILPATH)
- if (config['mail']['to'] != None):
+ if (config['mail']['to']):
logger.debug("sending email")
ms = subject(config['mail']['subject'])
cmd = "/bin/cat " + MAILPATH + " | /usr/bin/mail --debug-level=10 -a 'Content-type: text/html' -s '" + ms + "' " + config['mail']['to']
else:
out.append([p, "used " + parsesize(alloc_f), "delta " + parsesize(delta)])
contentnew += (p + '\t' + str(alloc_f) + '\n')
- writelog('alloc', contentnew)
+ if config['rotate'] == 'y':
+ writelog('alloc', contentnew)
writetitle("du")
logger.debug("disk usage data is " + str(out))