no WONDER that wasn't working

This commit is contained in:
brent s 2019-01-18 15:12:17 -05:00
parent 5d4e218db5
commit c55b844ad1
1 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,9 @@
# - SSH timeout can be overridden client-side
# - $TMOUT can be overridden user-side
# we need to actually kill the sshd process attached to the SSH session.
# This does have some limitations, though. Namely, it doesn't work for screen/tmux sessions.
# specifically if they happen to be using byobu with a status bar that updates, because that process
# gathering information for the status bar counts as "activity". Go figure.

import datetime
import os
@ -35,7 +38,7 @@ exclude_users = []


# Get the SSHD PIDs.
ssh_pids = [p for p in psutil.process_iter() if p.name() == 'sshd']
ssh_pids = [p.pid for p in psutil.process_iter() if p.name() == 'sshd']
# If the timeout is set to auto, try to find it.
if timeout == 'auto':
import re