From 6fe4d299dd34df144e91a3f547d1040aeb6eec6d Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Thu, 28 Oct 2010 19:10:57 +0000 Subject: [PATCH] py-i2phosts-maint: activate only approved hosts --- py-i2phosts-maint | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py-i2phosts-maint b/py-i2phosts-maint index 9c6d1bf..213cf01 100755 --- a/py-i2phosts-maint +++ b/py-i2phosts-maint @@ -73,8 +73,8 @@ for host in all_hosts: if host.expires < datetime.datetime.now().date(): log.info('deactivating %s, reason: expired', host.name) host.activated = False - # if not expired and added more than 3 days ago then activate - elif dl > datetime.timedelta(days=3) and host.activated == False: + # if not expired and added more than 3 days ago and approved then activate + elif dl > datetime.timedelta(days=3) and host.activated == False and host.approved == True: log.info('activating %s, reason: host up and added more than 3 days ago', host.name) host.activated = True # if expired two years ago then delete