作者 刘锟

update

@@ -43,6 +43,8 @@ class Temp extends Command @@ -43,6 +43,8 @@ class Temp extends Command
43 43
44 public function handle() 44 public function handle()
45 { 45 {
  46 + $check = dns_get_record('www.egwall.com', DNS_A);
  47 + dd($check);
46 $this->change_cname_projects(); 48 $this->change_cname_projects();
47 } 49 }
48 50
@@ -629,18 +631,18 @@ class Temp extends Command @@ -629,18 +631,18 @@ class Temp extends Command
629 $domain = $domain_info['domain']; 631 $domain = $domain_info['domain'];
630 632
631 //迁移主站 633 //迁移主站
632 - try {  
633 - $check = dns_get_record($domain, DNS_A);  
634 - $host = $check[0]['host'] ?? '';  
635 - } catch (\Exception $e) {  
636 - $this->output($domain . ' | 获取解析记录失败');  
637 - continue;  
638 - }  
639 -  
640 - if ($host != 'cname.globalso.com') {  
641 - $this->output($domain . ' | 未解析cname');  
642 - continue;  
643 - } 634 +// try {
  635 +// $check = dns_get_record($domain, DNS_A);
  636 +// $host = $check[0]['host'] ?? '';
  637 +// } catch (\Exception $e) {
  638 +// $this->output($domain . ' | 获取解析记录失败');
  639 +// continue;
  640 +// }
  641 +//
  642 +// if ($host != 'cname.globalso.com') {
  643 +// $this->output($domain . ' | 未解析cname');
  644 +// continue;
  645 +// }
644 646
645 //获取主站备份证书 647 //获取主站备份证书
646 $ssl_info = DB::table('gl_domain_ssl_backup')->select(['private_key', 'private_cert'])->where('domain', $domain)->first(); 648 $ssl_info = DB::table('gl_domain_ssl_backup')->select(['private_key', 'private_cert'])->where('domain', $domain)->first();
@@ -706,18 +708,18 @@ class Temp extends Command @@ -706,18 +708,18 @@ class Temp extends Command
706 } 708 }
707 $amp_domain = implode('.', $host_array); 709 $amp_domain = implode('.', $host_array);
708 710
709 - try {  
710 - $check_amp = dns_get_record($amp_domain, DNS_A);  
711 - $host_amp = $check_amp[0]['host'] ?? '';  
712 - } catch (\Exception $e) {  
713 - $this->output($amp_domain . ' | 获取解析记录失败');  
714 - continue;  
715 - }  
716 -  
717 - if ($host_amp != 'cname.globalso.com') {  
718 - $this->output($amp_domain . ' | 未解析cname');  
719 - continue;  
720 - } 711 +// try {
  712 +// $check_amp = dns_get_record($amp_domain, DNS_A);
  713 +// $host_amp = $check_amp[0]['host'] ?? '';
  714 +// } catch (\Exception $e) {
  715 +// $this->output($amp_domain . ' | 获取解析记录失败');
  716 +// continue;
  717 +// }
  718 +//
  719 +// if ($host_amp != 'cname.globalso.com') {
  720 +// $this->output($amp_domain . ' | 未解析cname');
  721 +// continue;
  722 +// }
721 723
722 //获取amp站备份证书 724 //获取amp站备份证书
723 $ssl_info_amp = DB::table('gl_domain_ssl_backup')->select(['private_key', 'private_cert'])->where('domain', $amp_domain)->first(); 725 $ssl_info_amp = DB::table('gl_domain_ssl_backup')->select(['private_key', 'private_cert'])->where('domain', $amp_domain)->first();