The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

34 linhas
927 B

  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. #
  6. # Unlock a new bubble
  7. #
  8. # Usage:
  9. #
  10. # bunlock unlock-key
  11. #
  12. # unlock-key : the unlock key for the new bubble
  13. #
  14. # Environment variables
  15. #
  16. # BUBBLE_API : which API to use. Default is local (http://127.0.0.1:PORT, where PORT is found in .bubble.env)
  17. # BUBBLE_USER : account to use. Default is root
  18. # BUBBLE_PASS : password for account. Default is root
  19. #
  20. SCRIPT="${0}"
  21. SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd)
  22. REQUIRE_BUBBLE_USER=1
  23. REQUIRE_BUBBLE_PASS=1
  24. . ${SCRIPT_DIR}/bubble_common
  25. if [[ -z "${BUBBLE_API}" ]] ; then
  26. die "No BUBBLE_API env var defined"
  27. fi
  28. UNLOCK_KEY=${1:?no unlock-key provided}
  29. echo "{\"name\":\"${BUBBLE_USER}\",\"password\":\"${BUBBLE_PASS}\"}" | \
  30. ${SCRIPT_DIR}/bpost 'auth/login?k='"${UNLOCK_KEY}"'' - --no-login