Improved username handling
This commit is contained in:
parent
290b05f356
commit
05b1b5032e
@ -5,7 +5,8 @@
|
|||||||
latest="$(wget -qO - 'https://kernel.org' | sed -n '/stable:/{n;p;}' | sed 's.[a-z]\|<\|>\|/\|[[:space:]]..g')"
|
latest="$(wget -qO - 'https://kernel.org' | sed -n '/stable:/{n;p;}' | sed 's.[a-z]\|<\|>\|/\|[[:space:]]..g')"
|
||||||
# Kernel version on kernel.org
|
# Kernel version on kernel.org
|
||||||
current="$(uname -r)" # Current kernel version
|
current="$(uname -r)" # Current kernel version
|
||||||
user="$(users)" # User account
|
uid=1000 # User ID. Change as per your needs.
|
||||||
|
user="$(awk -v val=$uid -F ":" '$3==val{print $1}' /etc/passwd)" # User account (used by sudo -u)
|
||||||
cores="$(nproc)" # Processor cores
|
cores="$(nproc)" # Processor cores
|
||||||
|
|
||||||
if [ -f /tmp/kernelcheck/kernelcheck.pid ] # Create a pid file to avoid concurrent processes
|
if [ -f /tmp/kernelcheck/kernelcheck.pid ] # Create a pid file to avoid concurrent processes
|
||||||
|
Reference in New Issue
Block a user