From 2ea5f2c48ed2d784eb977d1d0b9a51dba80ac92e Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Fri, 25 Oct 2013 11:09:57 -0400 Subject: [PATCH] Added logging output during cleanup --- tmpufw | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tmpufw b/tmpufw index cec8700..6fb55ee 100755 --- a/tmpufw +++ b/tmpufw @@ -68,7 +68,7 @@ class tmpufw(object): try: handle = open(pid_file, 'w') handle.write(str(getpid())) - handle.close(); + handle.close() except IOError: self.error('unable to create PID file: ' + pid_file) @@ -91,9 +91,11 @@ class tmpufw(object): # Checks if rule has expired if current_time < float(timestamp): handle.write(line) + print(time() + "\tskipped rule: " + rule) else: try: - self.ufw_execute('delete ' + rule); + self.ufw_execute('delete ' + rule) + print(time() + "\tdeleted rule: " + rule) except CalledProcessError as error: self.ufw_error(error)