From b67dc549969e9abafa59cc3d895095ad9ee9ba9c Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Wed, 10 Apr 2024 11:28:44 +0200 Subject: [PATCH] Do not remove files --- cbattery | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cbattery b/cbattery index 15580c1..bf61949 100755 --- a/cbattery +++ b/cbattery @@ -114,10 +114,7 @@ runScript() { enable_charging disable_discharging launch_daemon=/Library/LaunchDaemons/cbattery.plist - if [[ -f "$launch_daemon" ]]; then - sudo launchctl unload -w "$launch_daemon" - sudo rm "$launch_daemon" - fi + [[ -f "$launch_daemon" ]] && sudo launchctl unload -w "$launch_daemon" ;; "charging") echo "Setting $action to $setting"