Skip to content

Commit 4ca437b

Browse files
committed
Ignore local tty users.
1 parent a0e3f75 commit 4ca437b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

auto-shutdown.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
uptime=$(</proc/uptime)
66
uptime=${uptime%%.*}
77

8-
num_users=$(who | wc -l)
8+
num_users=$(who -m | wc -l)
99
num_notty_logins=$(pgrep -ai sshd | grep "@notty" | wc -l)
1010

1111
# Ensure that the system remains up after boot.

0 commit comments

Comments
 (0)