From 64acdd080fae96b6422d66617c56155fa2aad0aa Mon Sep 17 00:00:00 2001 From: Stefan Midjich Date: Thu, 16 Nov 2017 21:53:22 +0100 Subject: [PATCH] more verbose --- tools/manage_client.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/manage_client.py b/tools/manage_client.py index 1a8fdc5..2a1fe7a 100644 --- a/tools/manage_client.py +++ b/tools/manage_client.py @@ -141,11 +141,19 @@ if args.refresh: continue if client.new: + if args.verbose: + print('Creating new client:{ip}'.format( + ip=client.ip_address + )) client.commit() if int(packets_val) != client.last_packets: client.last_activity = current_date client.last_packets = int(packets_val) + if args.verbose: + print('Updating activity for client:{ip}'.format( + ip=client.ip_address + )) client.commit() # Also do a purge of clients that have no traffic for 24 hrs @@ -154,6 +162,10 @@ if args.refresh: if client.last_packets >= int(packets_val) and time_diff.days >= 1: client.enabled = False + if args.verbose: + print('Enabling client:{ip}'.format( + ip=client.ip_address + )) client.commit() for src_ip in args.src_ip: