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.

27 lines
647 B

  1. #!/bin/bash
  2. ## Should be executable N time in a row with same result.
  3. . lib/common
  4. set -e
  5. if ! url=$(relation:get "${SERVICE_NAME}":odoo-server:web-proxy url); then
  6. err "Monujo doesn't support odoo-server not having a web-proxy yet."
  7. exit 1
  8. fi
  9. if ! dbname=$(relation:get "${SERVICE_NAME}":odoo-server:postgres-database dbname); then
  10. err "Can't find db name of our odoo-server relation."
  11. exit 1
  12. fi
  13. monujo:config_merge "{
  14. \"lokapiHost\": \"$url\",
  15. \"lokapiDb\": \"$dbname\"
  16. }"
  17. if map_url=$(relation:get "${SERVICE_NAME}":map-server:publish-dir url); then
  18. monujo:config_merge "{
  19. \"mapUrl\": \"$map_url\"
  20. }"
  21. fi