scripts: update default groups

This commit is contained in:
lelgenio 2022-02-13 11:39:09 -03:00
parent 286287778a
commit 36f6544242
1 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,11 @@
#!/bin/sh
for g in docker video input audio wheel; do
sudo usermod "{{@@ env['USER'] @@}}" -aG "$g"
for g in audio video input bluetooth wheel _seatd kvm docker; do
if
cat /etc/group | cut -d: -f1 | grep "^${g}\$"
then
sudo usermod "$USER" -aG "$g"
else
echo "warning: group $g does not exist"
fi
done