auth2db (0.2.5-2+dfsg-4) auth2db-alert.patch

Summary

 auth2db-alert |   25 ++++++-------------------
 1 file changed, 6 insertions(+), 19 deletions(-)

    
download this patch

Patch contents

--- auth2db.old/auth2db-alert	2008-04-22 10:37:02.000000000 -0300
+++ auth2db/auth2db-alert	2008-04-22 16:34:04.000000000 -0300
@@ -33,33 +33,22 @@
 import traceback
 
 import smtplib
-
-sys.path.insert(1,"/usr/share/auth2db/modules/")
-
 from configobj import ConfigObj
 
+
 #CONFIG_AUTH_PATH = "/var/log/"
 CONFIG_PATH = "/etc/auth2db/"
-#CONFIG_PATH_FLAG = CONFIG_PATH+"flag.d/"
 CONFIG_PATH_FLAG = "/var/lib/auth2db/flag.d/"
-#CONFIG_PATH_TMP = "/tmp/"
 CONFIG_PATH_TMP = "/var/lib/auth2db/tmp/"
 
 config = ConfigObj(CONFIG_PATH+'auth2db.conf')
 config_filters = ConfigObj(CONFIG_PATH+"filters.conf")
 
 # Carga en las variables el archivo config.dat
-CONFIG_HOST = config['CONFIG_HOST']
-CONFIG_DB = config['CONFIG_DB']
-CONFIG_USER = config['CONFIG_USER']
-CONFIG_PASS = config['CONFIG_PASS']
-
-ACTIVE_ALERTS = config['ACTIVE_ALERTS']
-
-#CONFIG_HOST = "localhost"
-#CONFIG_DB = "authlog"
-#CONFIG_USER = "root"
-#CONFIG_PASS = ""
+CONFIG_HOST = config['dbserver']
+CONFIG_DB = config['dbname']
+CONFIG_USER = config['dbuser']
+CONFIG_PASS = config['dbpass']
 
 
 def send_email(subject,email,msg_body):
@@ -171,9 +160,7 @@
 
 
 def main():
-    if ACTIVE_ALERTS == "y" or ACTIVE_ALERTS == "Y":
-        alert()
-    
+	alert()
 
 #Esta linea lanza la funcion principal si aun no esta lanzada
 if __name__ =='__main__':