mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2026-02-21 15:31:12 +08:00
修复fnOS部署失败
This commit is contained in:
parent
224c27d796
commit
d1eaaec650
@ -880,9 +880,7 @@ class DeployHelper
|
||||
sudo visudo<br/>
|
||||
#在文件最后一行增加以下内容,需要将username替换成自己的用户名<br/>
|
||||
username ALL=(ALL) NOPASSWD: NOPASSWD: ALL<br/>
|
||||
ctrl+x 保存退出<br/>
|
||||
sudo mkdir -p /home/<用户名><br/>
|
||||
sudo chown -R <用户名>: /home/<用户名><br/>',
|
||||
ctrl+x 保存退出<br/>',
|
||||
'tasknote' => '系统会根据关联SSL证书的域名,自动更新对应证书',
|
||||
'inputs' => [
|
||||
'host' => [
|
||||
|
||||
@ -52,7 +52,7 @@ class fnos implements DeployInterface
|
||||
$this->exec($connection, '上传证书文件', "sudo tee ".$certPath." > /dev/null <<'EOF'\n".$fullchain."\nEOF");
|
||||
$this->exec($connection, '上传私钥文件', "sudo tee ".$keyPath." > /dev/null <<'EOF'\n".$privatekey."\nEOF");
|
||||
$this->exec($connection, '刷新目录权限', 'sudo chmod 0755 "'.$certDir.'" -R');
|
||||
$this->exec($connection, '更新数据表', 'sudo -u postgres psql -d trim_connect -c "UPDATE cert SET valid_to='.$certInfo['validTo_time_t'].'000,valid_from='.$certInfo['validFrom_time_t'].'000,issued_by=\''.$certInfo['issuer']['CN'].'\',updated_time='.getMillisecond().' WHERE private_key=\''.$keyPath.'\'"');
|
||||
$this->exec($connection, '更新数据表', 'cd /tmp && sudo -u postgres psql -d trim_connect -c "UPDATE cert SET valid_to='.$certInfo['validTo_time_t'].'000,valid_from='.$certInfo['validFrom_time_t'].'000,issued_by=\''.$certInfo['issuer']['CN'].'\',updated_time='.getMillisecond().' WHERE private_key=\''.$keyPath.'\'"');
|
||||
$this->log('证书 '.$row['domain'].' 更新成功');
|
||||
$success++;
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ class qingcloud implements DnsInterface
|
||||
|
||||
if ($Type == 'MX') {
|
||||
$Value = intval($MX).' '.$Value;
|
||||
} elseif ($Type == 'TXT') {
|
||||
} elseif ($Type == 'TXT' && substr($Value, 0, 1) != '"') {
|
||||
$Value = '"'.$Value.'"';
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ class qingcloud implements DnsInterface
|
||||
|
||||
if ($Type == 'MX') {
|
||||
$Value = intval($MX).' '.$Value;
|
||||
} elseif ($Type == 'TXT') {
|
||||
} elseif ($Type == 'TXT' && substr($Value, 0, 1) != '"') {
|
||||
$Value = '"'.$Value.'"';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user