Skip to content

Commit

Permalink
Update index.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Sep 15, 2024
1 parent 1a0b789 commit 8c4ab4a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/acme_pandominassl_apply/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,7 @@ def runHookDstDomain(row):
if row['effective_date'] != '':
effective_date = int(row['effective_date'])
now_int = int(time.time())

day = (now_int - effective_date)/86400
# print(effective_date,now_int,day)
if int(day) < 8:
common_log = '【'+domain+'】未过期'
hookWriteLog(common_log)
Expand All @@ -616,6 +614,12 @@ def runHookDstDomain(row):

# acme.sh --issue -d "example.com" -d "*.example.com" --dns dns_cf
cmd_apply = 'acme.sh --issue --dns '+str(cmd_data['type'])+' -d '+domain+' -d "*.'+domain+'"'
if row['effective_date'] != '':
effective_date = int(row['effective_date'])
now_int = int(time.time())
day = (now_int - effective_date)/86400
if int(day) > 7:
cmd_apply = 'acme.sh --issue --dns '+str(cmd_data['type'])+' -d '+domain+' -d "*.'+domain+'" --force'
cmd += cmd_apply

run_log = runLog()
Expand Down

0 comments on commit 8c4ab4a

Please sign in to comment.