take only the last active user from open session list

This commit is contained in:
Pakobbix 2023-01-20 00:11:57 +01:00 committed by GitHub
parent f82e067869
commit 9d3b26ba51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ sudo echo
if ! which whiptail >/dev/null; then if ! which whiptail >/dev/null; then
sudo apt-get install whiptail -y sudo apt-get install whiptail -y
fi fi
linux_user=$(who | awk '{print $1}') linux_user=$(w | awk '{print $1}' | tail -n1)
{ {
echo 0 echo 0
sudo apt-get update >/dev/null sudo apt-get update >/dev/null