The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

31 рядки
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