svchelper/app/bin/user_wait

13 lines
162 B
Plaintext
Raw Normal View History

2024-04-23 02:34:16 +00:00
#!/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