作者 刘锟

update

... ... @@ -43,6 +43,8 @@ class Temp extends Command
public function handle()
{
$check = dns_get_record('www.egwall.com', DNS_A);
dd($check);
$this->change_cname_projects();
}
... ... @@ -629,18 +631,18 @@ class Temp extends Command
$domain = $domain_info['domain'];
//迁移主站
try {
$check = dns_get_record($domain, DNS_A);
$host = $check[0]['host'] ?? '';
} catch (\Exception $e) {
$this->output($domain . ' | 获取解析记录失败');
continue;
}
if ($host != 'cname.globalso.com') {
$this->output($domain . ' | 未解析cname');
continue;
}
// try {
// $check = dns_get_record($domain, DNS_A);
// $host = $check[0]['host'] ?? '';
// } catch (\Exception $e) {
// $this->output($domain . ' | 获取解析记录失败');
// continue;
// }
//
// if ($host != 'cname.globalso.com') {
// $this->output($domain . ' | 未解析cname');
// continue;
// }
//获取主站备份证书
$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
}
$amp_domain = implode('.', $host_array);
try {
$check_amp = dns_get_record($amp_domain, DNS_A);
$host_amp = $check_amp[0]['host'] ?? '';
} catch (\Exception $e) {
$this->output($amp_domain . ' | 获取解析记录失败');
continue;
}
if ($host_amp != 'cname.globalso.com') {
$this->output($amp_domain . ' | 未解析cname');
continue;
}
// try {
// $check_amp = dns_get_record($amp_domain, DNS_A);
// $host_amp = $check_amp[0]['host'] ?? '';
// } catch (\Exception $e) {
// $this->output($amp_domain . ' | 获取解析记录失败');
// continue;
// }
//
// if ($host_amp != 'cname.globalso.com') {
// $this->output($amp_domain . ' | 未解析cname');
// continue;
// }
//获取amp站备份证书
$ssl_info_amp = DB::table('gl_domain_ssl_backup')->select(['private_key', 'private_cert'])->where('domain', $amp_domain)->first();
... ...