Browse Source

py-i2phosts-maint: activate only approved hosts

pull/1/head
Hidden Z 14 years ago
parent
commit
6fe4d299dd
  1. 4
      py-i2phosts-maint

4
py-i2phosts-maint

@ -73,8 +73,8 @@ for host in all_hosts:
if host.expires < datetime.datetime.now().date(): if host.expires < datetime.datetime.now().date():
log.info('deactivating %s, reason: expired', host.name) log.info('deactivating %s, reason: expired', host.name)
host.activated = False host.activated = False
# if not expired and added more than 3 days ago then activate # if not expired and added more than 3 days ago and approved then activate
elif dl > datetime.timedelta(days=3) and host.activated == False: 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) log.info('activating %s, reason: host up and added more than 3 days ago', host.name)
host.activated = True host.activated = True
# if expired two years ago then delete # if expired two years ago then delete

Loading…
Cancel
Save