#! /bin/sh /usr/share/dpatch/dpatch-run ## 00_gamin_cleanup.dpatch by Yaroslav Halchenko ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad fail2ban-0.7.8~/server/filtergamin.py fail2ban-0.7.8/server/filtergamin.py --- fail2ban-0.7.8~/server/filtergamin.py 2006-11-06 17:47:30.000000000 -0500 +++ fail2ban-0.7.8/server/filtergamin.py 2007-03-24 18:40:13.000000000 -0400 @@ -117,5 +117,15 @@ time.sleep(self.getSleepTime()) else: time.sleep(self.getSleepTime()) + # Cleanup Gamin + self.__cleanup() logSys.debug(self.jail.getName() + ": filter terminated") return True + + ## + # Desallocates the resources used by Gamin. + + def __cleanup(self): + for path in Filter.getLogPath(self): + self.monitor.stop_watch(path) + del self.monitor