...
|
...
|
@@ -32,7 +32,7 @@ public function handle() |
|
|
|
|
|
public function checkDomainSsl()
|
|
|
{
|
|
|
$end_day = date('Y-m-d H:i:s', time() + 5 * 24 * 3600);//5天后到期
|
|
|
$end_day = date('Y-m-d H:i:s', strtotime('+15 days'));//15天后到期
|
|
|
|
|
|
$site_domain = env('SITE_DOMAIN', '');
|
|
|
$site_ip = env('SITE_IP', '');
|
...
|
...
|
@@ -189,8 +189,8 @@ public function setDomainSsl($site_id, $host, $domain_list, $key = '', $cer = '' |
|
|
{
|
|
|
if (empty($key) || empty($cer)) {
|
|
|
$ssl = $this->bt->GetSSL($host);
|
|
|
if (isset($ssl['cert_data']['notAfter']) && strtotime($ssl['cert_data']['notAfter']) - time() > 259200) {
|
|
|
// 如果已经申请了ssl证书, 并且证书有效期超过3天, 那么就使用已经申请好的证书
|
|
|
if (isset($ssl['cert_data']['notAfter']) && strtotime($ssl['cert_data']['notAfter']) - time() > 1296000) {
|
|
|
// 如果已经申请了ssl证书, 并且证书有效期超过15天, 那么就使用已经申请好的证书
|
|
|
$key = $ssl['key'];
|
|
|
$cer = $ssl['csr'];
|
|
|
$is_set_status = !$ssl['status'];
|
...
|
...
|
|