1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-02-02 01:44:40 +00:00

py-i2phosts-maint: activate only approved hosts

This commit is contained in:
Hidden Z 2010-10-28 19:10:57 +00:00
parent 817d4490b9
commit 6fe4d299dd

View File

@ -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