服务器自动更新

This commit is contained in:
snltty
2024-07-19 15:57:16 +08:00
parent b16ffa3ea4
commit 7a039d4b1c
37 changed files with 760 additions and 267 deletions

View File

@@ -39,7 +39,15 @@ namespace linker.service
{
if (Process.GetProcessesByName(mainExeName).Any() == false)
{
RestartService();
if (File.Exists($"{mainExeName}.exe.temp"))
{
RestartService();
}
else
{
KillExe();
OpenExe();
}
}
}
catch (Exception)