mirror of
https://github.com/proxysu/ProxySU.git
synced 2025-04-14 06:30:57 +00:00
Caddy安装优化
This commit is contained in:
parent
cdc1a2b7e9
commit
56dff5ed4f
1 changed files with 34 additions and 15 deletions
|
@ -8336,27 +8336,46 @@ namespace ProxySU
|
||||||
//if (!currentShellCommandResult.Contains("/usr/bin/caddy"))
|
//if (!currentShellCommandResult.Contains("/usr/bin/caddy"))
|
||||||
//if (currentShellCommandResult.Trim().Equals("0") == true)
|
//if (currentShellCommandResult.Trim().Equals("0") == true)
|
||||||
functionResult = FileCheckExists(client, @"/usr/bin/caddy");
|
functionResult = FileCheckExists(client, @"/usr/bin/caddy");
|
||||||
if (functionResult == false)
|
if (functionResult == true)
|
||||||
{
|
{
|
||||||
//****** "安装Caddy失败!" ******
|
//****** "Caddy安装成功!" ******29
|
||||||
MessageBox.Show(Application.Current.FindResource("DisplayInstallInfo_ErrorInstallCaddyFail").ToString());
|
SetUpProgressBarProcessing(66);
|
||||||
//****** "安装Caddy失败!" ******
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_InstalledCaddyOK").ToString();
|
||||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_ErrorInstallCaddyFail").ToString();
|
|
||||||
MainWindowsShowInfo(currentStatus);
|
MainWindowsShowInfo(currentStatus);
|
||||||
|
|
||||||
//client.Disconnect();
|
|
||||||
return false;
|
sshShellCommand = @"systemctl enable caddy";
|
||||||
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
//****** "Caddy安装成功!" ******29
|
functionResult = ProxySoftInstall(client, @"Caddy", @"https://raw.githubusercontent.com/proxysu/shellscript/master/Caddy-Naive/caddy-naive-install.sh");
|
||||||
SetUpProgressBarProcessing(66);
|
//if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return false; }
|
||||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_InstalledCaddyOK").ToString();
|
|
||||||
|
functionResult = FileCheckExists(client, @"/usr/bin/caddy");
|
||||||
|
if (functionResult == true)
|
||||||
|
{
|
||||||
|
//****** "Caddy安装成功!" ******29
|
||||||
|
SetUpProgressBarProcessing(66);
|
||||||
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_InstalledCaddyOK").ToString();
|
||||||
|
MainWindowsShowInfo(currentStatus);
|
||||||
|
|
||||||
|
|
||||||
|
sshShellCommand = @"systemctl enable caddy";
|
||||||
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//****** "安装Caddy失败!" ******
|
||||||
|
MessageBox.Show(Application.Current.FindResource("DisplayInstallInfo_ErrorInstallCaddyFail").ToString());
|
||||||
|
//****** "安装Caddy失败!" ******
|
||||||
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_ErrorInstallCaddyFail").ToString();
|
||||||
MainWindowsShowInfo(currentStatus);
|
MainWindowsShowInfo(currentStatus);
|
||||||
|
|
||||||
|
//client.Disconnect();
|
||||||
sshShellCommand = @"systemctl enable caddy";
|
return false;
|
||||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue