The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
778 B

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