Skip to content
Snippets Groups Projects
Commit bfe140ac authored by root's avatar root
Browse files

Merge branch 'warden-3' of homeproj.cesnet.cz:warden into warden-3

parents 701ab0a7 0bb458f8
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ D. Configuration
cron
SCRIPT_PATH=/opt/warden_client/
*/5 * * * * root cd $SCRIPT_PATH; warden3-kippo-sender.py > /dev/null 2>&1
*/5 * * * * root cd $SCRIPT_PATH; python warden3-kippo-sender.py > /dev/null 2>&1
Note: Repeat interval must be the same as value of 'awin'.
......
......@@ -11,6 +11,7 @@ from time import time, gmtime, strftime
from math import trunc
from uuid import uuid4
from os import path
import sys
import MySQLdb as my
import MySQLdb.cursors as mycursors
......@@ -71,14 +72,16 @@ def main():
awin = aconfig.get('awin', DEFAULT_AWIN) * 60
wconfig['name'] = aname
wclient = Client(**wconfig)
aanonymised = aconfig.get('anonymised', DEFAULT_ANONYMISED)
atargetnet = aconfig.get('target_net', DEFAULT_TARGET_NET)
if aanonymised not in ['no', 'yes', 'omit']:
wclient.logger.error("Configuration error: anonymised: '%s' - possible typo? use 'no', 'yes' or 'omit'" % aanonymised)
sys.exit(2)
atargetnet = aconfig.get('target_net', DEFAULT_TARGET_NET)
aanonymised = aanonymised if (atargetnet != DEFAULT_TARGET_NET) or (aanonymised == 'omit') else DEFAULT_ANONYMISED
wclient = Client(**wconfig)
con = my.connect( host=aconfig['dbhost'], user=aconfig['dbuser'], passwd=aconfig['dbpass'],
db=aconfig['dbname'], port=aconfig['dbport'], cursorclass=mycursors.DictCursor)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment