作者 lyh

gx

@@ -43,8 +43,10 @@ class DomainInfo extends Command @@ -43,8 +43,10 @@ class DomainInfo extends Command
43 foreach ($list as $v){ 43 foreach ($list as $v){
44 if(empty($v['private_key']) || empty($v['private_cert'])){ 44 if(empty($v['private_key']) || empty($v['private_cert'])){
45 //域名结束时间<2天时,重新生成 45 //域名结束时间<2天时,重新生成
46 - if(!empty($v['certificate_end_time']) && ($v['certificate_end_time'] > date('Y-m-d H:i:s',time() + 24*3600))){  
47 - $this->updatePrivate($v); 46 + if(!empty($v['certificate_end_time'])){
  47 + if(($v['certificate_end_time'] > date('Y-m-d H:i:s',time() + 24*3600)) || ($v['certificate_end_time'] < date('Y-m-d H:i:s',time()))){
  48 + $this->updatePrivate($v);
  49 + }
48 } 50 }
49 } 51 }
50 $ssl = $this->updateDomainSsl($v['domain']); 52 $ssl = $this->updateDomainSsl($v['domain']);