guacamole/.drone/scripts/login.sh

14 lines
248 B
Bash
Raw Normal View History

2020-09-25 09:08:40 +00:00
n=0
while :
do
2020-10-22 18:08:09 +00:00
docker login $1 --username client --password "$2" \
2020-09-25 09:08:40 +00:00
&& break # substitute your command here
n=$((n+1))
if [ $n -ge 10 ]; then
echo "login failed"
exit 1
fi
echo "retrying login..$n"
sleep 5
done