Skip to content

Commit

Permalink
fixed check if user assigned to group 'audio'
Browse files Browse the repository at this point in the history
  • Loading branch information
trunkmaster committed Jul 25, 2024
1 parent ab47364 commit fc69d8d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Packaging/install_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ add_user()
sudo semodule -e ns-core 2>&1 > /dev/null
sudo restorecon -R /Users 2>&1 > /dev/null
else
groups | grep audio ||
$ECHO "User you're running this script as is not member of 'audio' group - sound will not work."
$ECHO "Consider adding user to group with command:"
$ECHO "$ sudo usermod $USER -a -G audio"
HAS_AUDIO=`groups | grep audio`
if [ "$HAS_AUDIO" = "" ]; then
$ECHO "WARNING: User you're running this script as is not member of 'audio' group - sound will not work."
$ECHO " Consider adding user to group with command:"
$ECHO " $ sudo usermod $USER -a -G audio"
fi
fi
}

Expand Down

0 comments on commit fc69d8d

Please sign in to comment.