fix(fleet): use correct setup endpoint /api/v1/setup instead of /api/latest/fleet/setup
This commit is contained in:
@@ -59,4 +59,4 @@ echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
||||
echo -e "${INFO}${YW} Admin Email:${CL} ${BGN}admin@fleet.local${CL}"
|
||||
echo -e "${INFO}${YW} Admin Password:${CL} ${BGN}grep FLEET_ADMIN_PASSWORD /opt/fleet/.env${CL}"
|
||||
echo -e "${INFO}${YW} Admin Password:${CL} ${BGN}Check inside the container: cat /opt/fleet/.env${CL}"
|
||||
|
||||
@@ -75,7 +75,7 @@ until curl -sf "http://127.0.0.1:8080/healthz" >/dev/null 2>&1; do
|
||||
ELAPSED=$((ELAPSED + 2))
|
||||
[[ $ELAPSED -ge 60 ]] && break
|
||||
done
|
||||
SETUP_RESPONSE=$(curl -s -X POST "http://127.0.0.1:8080/api/latest/fleet/setup" \
|
||||
SETUP_RESPONSE=$(curl -s -X POST "http://127.0.0.1:8080/api/v1/setup" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"admin\":{\"admin\":true,\"email\":\"${FLEET_ADMIN_EMAIL}\",\"name\":\"Admin\",\"password\":\"${FLEET_ADMIN_PASS}\"},\"org_info\":{\"org_name\":\"Fleet\",\"org_logo_url\":\"\"},\"server_url\":\"http://127.0.0.1:8080\"}")
|
||||
FLEET_TOKEN=$(echo "${SETUP_RESPONSE}" | grep -o '"token":"[^"]*"' | cut -d'"' -f4) || true
|
||||
|
||||
Reference in New Issue
Block a user