Replace halt command with shutdown and add new reboot command

This commit is contained in:
Stone_Red
2026-06-10 04:20:46 +02:00
parent fad05a3e9a
commit 6728835d77
3 changed files with 21 additions and 6 deletions
+5 -5
View File
@@ -1,14 +1,14 @@
namespace RemSox.UI.CLI.Commands;
public sealed class HaltCommand : ICommand
public sealed class ShutdownCommand : ICommand
{
public string Name => "halt";
public string Name => "shutdown";
public string Description => "Halt the system";
public string Description => "Shutdown the system";
public void Execute(string? arguments, Action<string> printLine)
{
printLine("Halting system...");
Environment.Exit(0);
printLine("Shutting down system...");
Sys.Power.Shutdown();
}
}
+14
View File
@@ -0,0 +1,14 @@
namespace RemSox.UI.CLI.Commands;
public class RebootCommand : ICommand
{
public string Name => "reboot";
public string Description => "Reboot the system";
public void Execute(string? arguments, Action<string> printLine)
{
printLine("Rebooting system...");
Sys.Power.Reboot();
}
}