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"