|
...
|
...
|
@@ -49,13 +49,13 @@ class DomainInfo extends Command |
|
|
|
$this->startUpdateSslTime();
|
|
|
|
|
|
|
|
//主站证书到期更新
|
|
|
|
// $this->startUpdateCert();
|
|
|
|
$this->startUpdateCert();
|
|
|
|
|
|
|
|
//AMP站证书到期更新
|
|
|
|
// $this->startUpdateAmpCert();
|
|
|
|
$this->startUpdateAmpCert();
|
|
|
|
|
|
|
|
//创建的自定义小语种域名证书到期更新
|
|
|
|
// $this->startUpdateCustomCert();
|
|
|
|
$this->startUpdateCustomCert();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
...
|
...
|
@@ -86,12 +86,12 @@ class DomainInfo extends Command |
|
|
|
|
|
|
|
if ($servers_ip_info['servers_id'] == ServerConfig::SELF_SITE_ID) {
|
|
|
|
//自建站项目,直接获取主站证书有效期并更新
|
|
|
|
// $ssl_time = $this->getDomainSslTime($v['domain']);
|
|
|
|
// if ($ssl_time['from'] && $ssl_time['to']) {
|
|
|
|
// $v->certificate_start_time = $ssl_time['from'];
|
|
|
|
// $v->certificate_end_time = $ssl_time['to'];
|
|
|
|
// $v->save();
|
|
|
|
// }
|
|
|
|
$ssl_time = $this->getDomainSslTime($v['domain']);
|
|
|
|
if ($ssl_time['from'] && $ssl_time['to']) {
|
|
|
|
$v->certificate_start_time = $ssl_time['from'];
|
|
|
|
$v->certificate_end_time = $ssl_time['to'];
|
|
|
|
$v->save();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (empty($v['domain_end_time']) || $v['domain_end_time'] < $end_day) {
|
|
|
|
//获取主站域名有效期并更新
|
|
...
|
...
|
@@ -127,12 +127,12 @@ class DomainInfo extends Command |
|
|
|
}
|
|
|
|
|
|
|
|
//获取主站证书有效期并更新
|
|
|
|
// $ssl_time = $this->getDomainSslTime($v['domain']);
|
|
|
|
// if ($ssl_time['from'] && $ssl_time['to']) {
|
|
|
|
// $v->certificate_start_time = $ssl_time['from'];
|
|
|
|
// $v->certificate_end_time = $ssl_time['to'];
|
|
|
|
// $v->save();
|
|
|
|
// }
|
|
|
|
$ssl_time = $this->getDomainSslTime($v['domain']);
|
|
|
|
if ($ssl_time['from'] && $ssl_time['to']) {
|
|
|
|
$v->certificate_start_time = $ssl_time['from'];
|
|
|
|
$v->certificate_end_time = $ssl_time['to'];
|
|
|
|
$v->save();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (empty($v['domain_end_time']) || $v['domain_end_time'] < $end_day) {
|
|
|
|
//获取主站域名有效期并更新
|
|
...
|
...
|
@@ -150,33 +150,33 @@ class DomainInfo extends Command |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// if ($v['amp_status'] == 1) {
|
|
|
|
// $domain_array = parse_url($v['domain']);
|
|
|
|
// $host = $domain_array['host'] ?? $domain_array['path'];
|
|
|
|
// $host_array = explode('.', $host);
|
|
|
|
// if (count($host_array) <= 2) {
|
|
|
|
// array_unshift($host_array, 'm');
|
|
|
|
// } else {
|
|
|
|
// $host_array[0] = 'm';
|
|
|
|
// }
|
|
|
|
// $amp_domain = implode('.', $host_array);
|
|
|
|
//
|
|
|
|
// if ($servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID) {
|
|
|
|
// //过滤已解析到别的ip的AMP域名
|
|
|
|
// if (!check_domain_record($amp_domain, $servers_ip_info)) {
|
|
|
|
// Log::channel('analyze_other')->error('AMP域名 [' . $amp_domain . '] 已解析到别的IP');
|
|
|
|
// continue;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// //获取AMP站证书有效期并更新
|
|
|
|
// $amp_ssl_time = $this->getDomainSslTime($amp_domain);
|
|
|
|
// if ($amp_ssl_time['from'] && $amp_ssl_time['to']) {
|
|
|
|
// $v->amp_certificate_start_time = $amp_ssl_time['from'];
|
|
|
|
// $v->amp_certificate_end_time = $amp_ssl_time['to'];
|
|
|
|
// $v->save();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
if ($v['amp_status'] == 1) {
|
|
|
|
$domain_array = parse_url($v['domain']);
|
|
|
|
$host = $domain_array['host'] ?? $domain_array['path'];
|
|
|
|
$host_array = explode('.', $host);
|
|
|
|
if (count($host_array) <= 2) {
|
|
|
|
array_unshift($host_array, 'm');
|
|
|
|
} else {
|
|
|
|
$host_array[0] = 'm';
|
|
|
|
}
|
|
|
|
$amp_domain = implode('.', $host_array);
|
|
|
|
|
|
|
|
if ($servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID) {
|
|
|
|
//过滤已解析到别的ip的AMP域名
|
|
|
|
if (!check_domain_record($amp_domain, $servers_ip_info)) {
|
|
|
|
Log::channel('analyze_other')->error('AMP域名 [' . $amp_domain . '] 已解析到别的IP');
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//获取AMP站证书有效期并更新
|
|
|
|
$amp_ssl_time = $this->getDomainSslTime($amp_domain);
|
|
|
|
if ($amp_ssl_time['from'] && $amp_ssl_time['to']) {
|
|
|
|
$v->amp_certificate_start_time = $amp_ssl_time['from'];
|
|
|
|
$v->amp_certificate_end_time = $amp_ssl_time['to'];
|
|
|
|
$v->save();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -420,7 +420,7 @@ class DomainInfo extends Command |
|
|
|
'type' => MessagePush::TYPE_DOMAIN,
|
|
|
|
'content' => $message,
|
|
|
|
'ref_ids' => $domain_id,
|
|
|
|
'send_time' => date('Y-m-d 16:00:00'),
|
|
|
|
'send_time' => date('Y-m-d 14:00:00'),
|
|
|
|
'status' => 0,
|
|
|
|
];
|
|
|
|
//写入一条推送消息 自动消费
|
...
|
...
|
|