Checking requirements in script

Checking requirements for sudo users in script
This commit is contained in:
lunardunno 2024-10-27 13:09:41 +04:00 committed by GitHub
parent e7b25719e4
commit 6c22a7372d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,2 +1,3 @@
echo $LC_MESSAGES | grep -qE "en_US.UTF-8|C.UTF-8" || export LC_MESSAGES=C.UTF-8;\
CUR_USER=$(whoami);\ CUR_USER=$(whoami);\
groups $CUR_USER groups $CUR_USER | grep sudo && sudo -n -u $CUR_USER sh -c "sudo -n uname 2>&1 > /dev/null"