summaryrefslogtreecommitdiff
path: root/vigilctl/src
diff options
context:
space:
mode:
authornamilsk <namilsk@namilsk.tech>2026-01-10 16:17:21 +0300
committernamilsk <namilsk@namilsk.tech>2026-01-10 16:17:21 +0300
commitd114acb6103706e56f7d2090569c354987033d7e (patch)
tree903840d0fa893370a33bddb0abf4cbe678d08f57 /vigilctl/src
parent620e092c927d04d454c2efd94b7beaf448133531 (diff)
Fixed parts naming
Diffstat (limited to 'vigilctl/src')
-rw-r--r--vigilctl/src/args_dispatcher.rs0
-rw-r--r--vigilctl/src/main.rs40
2 files changed, 40 insertions, 0 deletions
diff --git a/vigilctl/src/args_dispatcher.rs b/vigilctl/src/args_dispatcher.rs
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vigilctl/src/args_dispatcher.rs
diff --git a/vigilctl/src/main.rs b/vigilctl/src/main.rs
new file mode 100644
index 0000000..08ff37c
--- /dev/null
+++ b/vigilctl/src/main.rs
@@ -0,0 +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() {
+ let args = Cli::parse();
+
+ println!("command: {:?}", args.command);
+}