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
27 lines
647 B
#!/bin/bash
|
|
## Should be executable N time in a row with same result.
|
|
|
|
. lib/common
|
|
|
|
set -e
|
|
|
|
if ! url=$(relation:get "${SERVICE_NAME}":odoo-server:web-proxy url); then
|
|
err "Monujo doesn't support odoo-server not having a web-proxy yet."
|
|
exit 1
|
|
fi
|
|
if ! dbname=$(relation:get "${SERVICE_NAME}":odoo-server:postgres-database dbname); then
|
|
err "Can't find db name of our odoo-server relation."
|
|
exit 1
|
|
fi
|
|
|
|
monujo:config_merge "{
|
|
\"lokapiHost\": \"$url\",
|
|
\"lokapiDb\": \"$dbname\"
|
|
}"
|
|
|
|
|
|
if map_url=$(relation:get "${SERVICE_NAME}":map-server:publish-dir url); then
|
|
monujo:config_merge "{
|
|
\"mapUrl\": \"$map_url\"
|
|
}"
|
|
fi
|