Update cbattery

This commit is contained in:
Santiago Lo Coco 2024-03-17 15:25:16 +01:00
parent 1c56899fab
commit 620e539852
1 changed files with 2 additions and 6 deletions

View File

@ -57,7 +57,7 @@ function get_battery_percentage() {
function install_visudo_file() { function install_visudo_file() {
sudoers_file=/private/etc/sudoers.d/cbattery sudoers_file=/private/etc/sudoers.d/cbattery
sudo cp "$1" "$sudoers_file" sudo cp ".visudo" "$sudoers_file"
sudo chmod 440 "$sudoers_file" sudo chmod 440 "$sudoers_file"
} }
@ -105,11 +105,7 @@ if [[ "$action" == "status" ]]; then
fi fi
if [[ "$action" == "visudo" ]]; then if [[ "$action" == "visudo" ]]; then
if [[ -n "$setting" ]]; then install_visudo
install_visudo "$setting"
else
install_visudo ".visudo"
fi
exit 0 exit 0
fi fi