|
|
@ -67,9 +67,16 @@ set -e |
|
|
|
## Ensure odoo is launched |
|
|
|
service_def=$(get_compose_service_def "$SERVICE_NAME") |
|
|
|
|
|
|
|
ADMIN_PASSWORD=$(echo "$service_def" | shyaml get-value options.admin-password) || { |
|
|
|
err "Could not find 'admin-password' in $SERVICE_NAME service definition." |
|
|
|
exit 1 |
|
|
|
## XXXvlab: should be moved to lib |
|
|
|
CONFIG=$SERVICE_CONFIGSTORE/etc/odoo-server.conf |
|
|
|
ADMIN_PASSWORD=$(echo "$service_def" | shyaml -q get-value options.admin-password) || { |
|
|
|
if [ -e "$CONFIG" ]; then |
|
|
|
ADMIN_PASSWORD=$(grep ^admin_passwd "$CONFIG" | sed -r 's/^admin_passwd\s+=\s+(.+)$/\1/g') |
|
|
|
fi |
|
|
|
if [ -z "$ADMIN_PASSWORD" ]; then |
|
|
|
err "Could not find 'admin-password' in $SERVICE_NAME service definition nor in config file." |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|