mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 10:45:45 +01:00
19 lines
353 B
Bash
19 lines
353 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
set -e
|
||
|
|
||
|
TIMEOUT=10
|
||
|
while [ $TIMEOUT -gt 0 ]; do
|
||
|
STATUS=$(curl -s -o /dev/null -w '%{http_code}' https://127.0.0.1/notary/v2/ -kv)
|
||
|
if [ $STATUS -eq 401 ]; then
|
||
|
echo "Notary is running success."
|
||
|
break
|
||
|
fi
|
||
|
TIMEOUT=$(($TIMEOUT - 1))
|
||
|
sleep 5
|
||
|
done
|
||
|
|
||
|
if [ $TIMEOUT -eq 0 ]; then
|
||
|
echo "Notary is running fail."
|
||
|
exit 1
|
||
|
fi
|