summarylogtreecommitdiffstats
path: root/dynamodb
blob: 8ed7c8a73d8888a6cfbe44c054f971286f3fa976 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash

if [ -e /etc/dynamodb/config.cfg ]; then
  source /etc/dynamodb/config.cfg
else
  shared=true
  dbPath=/var/lib/dynamodb
  port=8000
fi


librarypath=/usr/share/dynamodb/DynamoDBLocal_lib
jar=/usr/share/dynamodb/DynamoDBLocal.jar
args=("-Djava.library.path=$librarypath" "-jar $jar" "-port $port")

if [ $shared ]; then
  args+=('-sharedDb')
fi

if [ $inMemory ]; then
  args+=('-inMemory')
else
  args+=("-dbPath $dbPath")
fi

args+=($additionalArgs)

command=java

echo ${args[*]}

$command ${args[*]}