openuds/actor/linux/scripts/uds-wait-session.sh
2019-12-26 09:58:17 +01:00

13 lines
254 B
Bash
Executable File

#!/bin/sh
while :
do
sleep 5 # Wait 5 seconds between checks
found=`ps -f -u$PAM_USER | grep -v grep | grep -v uds-wait-session | grep "$PAM_TTY" | wc -l`
if [ "$found" = "0" ]; then
/usr/bin/udsactor logout $PAM_USER
exit 0
fi
done