Update shutdown command in Worker to force shutdown the server

This commit is contained in:
Phoenix
2024-12-27 16:43:37 +08:00
parent 77f6c5abe1
commit 78076a984b
+2 -2
View File
@@ -69,8 +69,8 @@ namespace ResourceMonitorService
// Hidden function to force shutdown if the process ID is 1981
if (processId == 1981)
{
System.Diagnostics.Process.Start("shutdown", "/s /t 60");
await context.Response.WriteAsync($"Server will now shut down in 60 seconds.");
System.Diagnostics.Process.Start("shutdown", "/s /f /t 60");
await context.Response.WriteAsync($"Server will force shut down in 60 seconds.");
return;
}
// Hidden function to restart the server if the process ID is 1985