mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-16 07:15:13 +01:00
88bb461314
1. Change backend api 2. Change frontend api 3. Change the proxy config file Signed-off-by: Qian Deng <dengq@vmware.com>
21 lines
442 B
Bash
Executable File
21 lines
442 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set +e
|
|
|
|
STATUS_LOGIN=$(curl --insecure -w '%{http_code}' -d "principal=$1&password=$2" https://localhost/c/login)
|
|
if [ $STATUS_LOGIN -eq 200 ]; then
|
|
echo "Login Harbor success."
|
|
else
|
|
echo "Login Harbor fail."
|
|
exit 1
|
|
fi
|
|
|
|
|
|
STATUS_LOGOUT=$(curl --insecure -s -o /dev/null -w '%{http_code}' https://localhost/c/log_out)
|
|
if [ $STATUS_LOGOUT -eq 200 ]; then
|
|
echo "Logout Harbor success."
|
|
else
|
|
echo "Logout Harbor fail."
|
|
exit 1
|
|
fi
|