PortValhalla/scripts/Arch/Config/sudo/install.sh

9 lines
198 B
Bash
Raw Normal View History

2023-04-03 09:00:11 +00:00
#!/bin/bash
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE";
else
2023-04-04 21:43:56 +00:00
wheelPattern="^# \(%wheel \)";
sed -i "/$wheelPattern/{ /NOPASSWD/{ b; }; s/$wheelPattern/\1/; }" /etc/sudoers;
2023-04-03 09:00:11 +00:00
fi;