svchelper/app/bin/user_wait
2024-04-23 04:34:16 +02:00

13 lines
162 B
Bash

#!/usr/bin/env bash
set +e
COUNT=0
while [ "$COUNT" -le "$2" ]; do
ps -u "$1"
if [ "$?" != "0" ]; then
exit 0
fi
sleep 1
COUNT=$(($COUNT + 1))
done
exit 1