Skip to content

Commit

Permalink
ignore clash binary when uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerwooo committed Jan 13, 2023
1 parent 56ed928 commit 5fa0c72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "clashrup"
description = "Simple CLI to manage your systemd clash.service and config subscriptions on Linux."
version = "0.2.4"
version = "0.2.5"
edition = "2021"
readme = "README.md"
license = "MIT"
Expand Down
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ async fn main() {

match &args.command {
Some(Commands::Setup) => {
println!(
"{} Setting up clash's binary, config, and systemd service...",
prefix.cyan()
);

// Attempt to download and setup clash binary if needed
if fs::metadata(&clash_target_binary_path).is_ok() {
// If clash binary already exists at `clash_target_binary_path`, then skip setup
Expand Down Expand Up @@ -215,8 +220,8 @@ async fn main() {
Systemctl::new().stop("clash.service").execute();
Systemctl::new().disable("clash.service").execute();

// delete_file(&clash_target_binary_path, prefix);
delete_file(&clash_target_service_path, prefix);
delete_file(&clash_target_binary_path, prefix);
delete_file(&clash_target_config_path, prefix);

println!("{} Disable and reload systemd services", prefix.green());
Expand Down

0 comments on commit 5fa0c72

Please sign in to comment.