1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2025-02-19 16:03:17 +03:00

修复caddy所用Email的生成bug

This commit is contained in:
ProxySU 2020-04-20 18:35:18 +08:00
parent fe6a424255
commit 6f8c4ba234
3 changed files with 3 additions and 2 deletions

View File

@ -798,8 +798,9 @@ namespace ProxySU
UploadConfig(connectionInfo, serverConfig, upLoadPath); UploadConfig(connectionInfo, serverConfig, upLoadPath);
//设置Caddyfile文件中的tls 邮箱 //设置Caddyfile文件中的tls 邮箱
string sshCmdEmail = $"email={ReceiveConfigurationParameters[4]};email=${{email/./@}};echo $email";//结尾有回车符 //string sshCmdEmail = $"email={ReceiveConfigurationParameters[4]};email=${{email/./@}};echo $email";//结尾有回车符
string email = client.RunCommand(sshCmdEmail).Result.Replace("\n", "");//删除结尾的回车符 //string email = client.RunCommand(sshCmdEmail).Result.Replace("\n", "");//删除结尾的回车符
string email = $"admin@{ReceiveConfigurationParameters[4]}";
string sshCmd = $"sed -i 's/off/{email}/' {upLoadPath}";//设置Caddyfile中的邮箱 string sshCmd = $"sed -i 's/off/{email}/' {upLoadPath}";//设置Caddyfile中的邮箱
client.RunCommand(sshCmd); client.RunCommand(sshCmd);
//设置Path //设置Path

Binary file not shown.

Binary file not shown.