mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 09:08:26 +01:00
20 lines
352 B
Bash
Executable File
20 lines
352 B
Bash
Executable File
#!/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:4443/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
|