Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Get nuxeo config parameters as <name>=<value> pairs, one per line.
- # grep gets rid of other output.
- # Perform replacement so that the results can be assigned to an associative array.
- RAW_CONFIG=$(
- nuxeoctl --get-regexp config '.' |
- grep '=' |
- sed -r 's/([^=]*)=(.*)/\[\1\]="\2"/')
- # Assign transformed results to an associative array.
- declare -A CONFIG
- eval "CONFIG=(${RAW_CONFIG})"
- # Export postgresql vars.
- export PGPASSWORD="${CONFIG[nuxeo.db.password]}"
- export PGUSER="${CONFIG[nuxeo.db.user]}"
- export PGDATABASE="${CONFIG[nuxeo.db.name]}"
- export PGHOST="${CONFIG[nuxeo.db.host]}"
- export PGPORT="${CONFIG[nuxeo.db.port]}"
- # Export other important things
- export NX_DATA_DIR="${CONFIG[nuxeo.data.dir]}"
- export NX_S3_BUCKET="${CONFIG[nuxeo.s3storage.bucket]}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement