provisioning tool for building opinionated architecture
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
542 B

2 months ago
  1. #!/bin/bash
  2. ### CHECK
  3. function check() {
  4. PREFIX="recipe:discourse:check"
  5. container_exists "$CONTAINER" || return 1
  6. container_running "$CONTAINER" || return 2
  7. echo "container <$CONTAINER> approved successfully!"
  8. }
  9. ### INSTALL
  10. function install() {
  11. PREFIX="recipe:discourse:install"
  12. : $PREFIX
  13. launch_container "$CONTAINER"
  14. echo "initializing discourse ... "
  15. PREFIX="" echo "OK"
  16. }
  17. ### MAIN
  18. . "$MIAOU_BASEDIR/lib/init.sh"
  19. arg1_required "$@"
  20. readonly CONTAINER="$1"
  21. check || (
  22. install
  23. check
  24. )