Skip to content
Snippets Groups Projects
Commit 9297c398 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Add mail and /var/tmp cleanup for unix systems

parent 3ccb2618
No related branches found
No related tags found
No related merge requests found
......@@ -36,13 +36,19 @@ class Unix(OSBase):
self.cleanup_userdata()
self.cleanup_tmp()
self.cleanup_log()
self.cleanup_mail()
def cleanup_tmp(self):
self.foreach_file('/tmp', self.g.rm_rf, maxdepth=1)
self.foreach_file('/var/tmp', self.g.rm_rf, maxdepth=1)
def cleanup_log(self):
self.foreach_file('/var/log', self.g.truncate, ftype='r')
def cleanup_mail(self):
self.foreach_file('var/spool/mail', self.g.rm_rf, maxdepth=1)
self.foreach_file('var/mail', self.g.rm_rf, maxdepth=1)
def cleanup_userdata(self):
homedirs = ['/root'] + self.ls('/home/')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment