diff options
| author | namilsk <namilsk@namilsk.tech> | 2026-01-10 16:13:47 +0300 |
|---|---|---|
| committer | namilsk <namilsk@namilsk.tech> | 2026-01-10 16:13:47 +0300 |
| commit | 620e092c927d04d454c2efd94b7beaf448133531 (patch) | |
| tree | 55fa1767775d75f0bb822aa110aea582ef6b6a68 /vegilctl/src/main.rs | |
| parent | c6146c7109fd24ee15c11a7a79eee6d3f0c822e0 (diff) | |
| parent | a10ceac5a5ff6de2c85757384e97c273a3038f6c (diff) | |
Merge remote-tracking branch 'origin/vigilctl'
Diffstat (limited to 'vegilctl/src/main.rs')
| -rw-r--r-- | vegilctl/src/main.rs | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/vegilctl/src/main.rs b/vegilctl/src/main.rs index e7a11a9..08ff37c 100644 --- a/vegilctl/src/main.rs +++ b/vegilctl/src/main.rs @@ -1,3 +1,40 @@ +use clap::{Parser, Subcommand}; + +#[derive(Subcommand, Clone,Debug)] +enum Command { + /// Check Service Status + Status { of: String }, + /// Stop Specified Service + Stop { service: String }, + /// Start Specified Service + Start { service: String }, + /// Start Service after system initialization (Add Service symlink to Vigil service startup + /// list) + Enable { service: String }, + /// Remove Service From Service initialization list + Disable { service: String }, + /// Power Management Commands + #[command(subcommand)] + Power(PowerCommand) +} +#[derive(Subcommand, Clone, Debug)] +enum PowerCommand { + /// Reboot System + Reboot, + /// Poweroff System + Poweroff, + /// Halt + Halt +} +#[derive(Parser)] +#[command(name = "vigilctl")] +#[command(about = "Vigil control manager")] +struct Cli { + #[command(subcommand)] + command: Command, +} fn main() { - println!("Hello, world!"); + let args = Cli::parse(); + + println!("command: {:?}", args.command); } |
