From 6ccfe8a1a196eaabfcc1ace073f4df9be1343fec Mon Sep 17 00:00:00 2001 From: Mentor Date: Wed, 2 Feb 2022 11:36:29 +0100 Subject: [PATCH] Typo in visudo and permission update --- battery.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/battery.sh b/battery.sh index 0df8559..097742c 100644 --- a/battery.sh +++ b/battery.sh @@ -36,7 +36,7 @@ visudoconfig=" # Visudo settings for the battery utility installed from https://github.com/actuallymentor/battery # intended to be placed in $visudo_path on a mac Cmnd_Alias BATTERYOFF = $binfolder/smc -k CH0B -w 02, $binfolder/smc -k CH0C -w 02 -Cmnd_Alias BATTERYON = $binfolder/smc -k CH0B -w 00, $binfolder/smc -k CH0B -w 00 +Cmnd_Alias BATTERYON = $binfolder/smc -k CH0B -w 00, $binfolder/smc -k CH0C -w 00 $( whoami ) ALL = NOPASSWD: BATTERYOFF $( whoami ) ALL = NOPASSWD: BATTERYON " @@ -108,6 +108,7 @@ if [[ "$action" == "visudo" ]]; then echo -e "\nPress any key to continue\n" read echo -e "$visudoconfig" | sudo tee $visudo_path + sudo chmod 0440 $visudo_path echo -e "Visudo file $visudo_path now contains: \n" sudo cat $visudo_path exit 0