Update cbattery
This commit is contained in:
parent
1c56899fab
commit
620e539852
8
cbattery
8
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue