diff options
Diffstat (limited to 'workflow-designer-init/src/main/docker/start.sh')
-rw-r--r-- | workflow-designer-init/src/main/docker/start.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/workflow-designer-init/src/main/docker/start.sh b/workflow-designer-init/src/main/docker/start.sh index 919277fd..8acb2cf6 100644 --- a/workflow-designer-init/src/main/docker/start.sh +++ b/workflow-designer-init/src/main/docker/start.sh @@ -25,9 +25,14 @@ if [[ -z "${CS_HOST}" ]]; then exit 1 fi -if [ $is_cs_unauthenticated -eq 1 ]; then - cqlsh -u ${CS_USER} -p ${CS_PASSWORD} -f /create_workflow_db.cql ${CS_HOST} ${CS_PORT} -else - cqlsh -f /create_workflow_db.cql ${CS_HOST} ${CS_PORT} -fi +cql_from_file() { + + if [ $is_cs_unauthenticated -eq 1 ]; then + cqlsh -u ${CS_USER} -p ${CS_PASSWORD} -f $1 ${CS_HOST} ${CS_PORT} + else + cqlsh -f $1 ${CS_HOST} ${CS_PORT} + fi +} +cql_from_file /create_keyspaces.cql +cql_from_file /create_tables.cql |