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:
parent
817d4490b9
commit
6fe4d299dd
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user