pub enum ServiceCommands {
Install,
Uninstall {
keep_config: bool,
},
Start,
Stop,
Restart,
Enable,
Disable,
}Expand description
Background service management commands.
These commands control the lifecycle of the background daemon service that handles automatic credential synchronization.
Variants§
Install
Install and start the sync daemon
Installs the systemd service and starts automatic background synchronization. Requires Linux or WSL with systemd enabled. Creates necessary configuration files and sets up auto-start on system boot.
Platform Requirements: Linux or WSL with systemd enabled
Uninstall
Stop and uninstall the sync daemon
Stops the running service and removes it from the system. Optionally preserves configuration files for future reinstallation.
Start
Start the sync daemon
Starts the background service if it’s installed but not running. The service will begin monitoring for credential changes and performing automatic synchronization.
Stop
Stop the sync daemon
Stops the running background service while leaving it installed. Automatic synchronization will cease until the service is restarted.
Restart
Restart the sync daemon
Stops and then starts the background service, useful for applying configuration changes or recovering from errors.
Enable
Enable daemon auto-start on system boot
Configures the service to start automatically when the system boots. Ensures continuous credential synchronization across reboots.
Disable
Disable daemon auto-start
Prevents the service from starting automatically on system boot. The service can still be started manually when needed.
Trait Implementations§
Source§impl FromArgMatches for ServiceCommands
impl FromArgMatches for ServiceCommands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for ServiceCommands
impl Subcommand for ServiceCommands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand