From 620e5398525bec1ed05320ceb0ea38f9d93f2048 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Sun, 17 Mar 2024 15:25:16 +0100 Subject: [PATCH] Update cbattery --- cbattery | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cbattery b/cbattery index a272473..5ea70c3 100755 --- a/cbattery +++ b/cbattery @@ -57,7 +57,7 @@ function get_battery_percentage() { function install_visudo_file() { sudoers_file=/private/etc/sudoers.d/cbattery - sudo cp "$1" "$sudoers_file" + sudo cp ".visudo" "$sudoers_file" sudo chmod 440 "$sudoers_file" } @@ -105,11 +105,7 @@ if [[ "$action" == "status" ]]; then fi if [[ "$action" == "visudo" ]]; then - if [[ -n "$setting" ]]; then - install_visudo "$setting" - else - install_visudo ".visudo" - fi + install_visudo exit 0 fi