Pull JSON schemas at build/test not run time
[dcaegen2/platform.git] / mod / onboardingapi / start.sh
1 #!/bin/bash
2
3 if [ -z $PG_CONN ]; then
4     echo "PG_CONN variable has not been set"
5     echo "PG_CONN contains the full postgresql URI"
6     exit 1
7 fi
8
9 mkdir -p ~/.config/dcae-cli
10 if [ ! -f ~/.config/dcae-cli/config.json ]; then
11     echo "Creating dcae-cli config"
12     echo "{\"server_url\": \"$SERVER_URL\", \"db_url\": \"$PG_CONN\", \"path_component_spec\": \"$PATH_COMPONENT_SPEC\", \"path_data_format\": \"$PATH_DATA_FORMAT\"}" > ~/.config/dcae-cli/config.json
13 fi
14
15 dcae_cli http --live