Update shutdown command in Worker to force shutdown the server
This commit is contained in:
@@ -69,8 +69,8 @@ namespace ResourceMonitorService
|
|||||||
// Hidden function to force shutdown if the process ID is 1981
|
// Hidden function to force shutdown if the process ID is 1981
|
||||||
if (processId == 1981)
|
if (processId == 1981)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Process.Start("shutdown", "/s /t 60");
|
System.Diagnostics.Process.Start("shutdown", "/s /f /t 60");
|
||||||
await context.Response.WriteAsync($"Server will now shut down in 60 seconds.");
|
await context.Response.WriteAsync($"Server will force shut down in 60 seconds.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Hidden function to restart the server if the process ID is 1985
|
// Hidden function to restart the server if the process ID is 1985
|
||||||
|
|||||||
Reference in New Issue
Block a user