summarylogtreecommitdiffstats
path: root/dynamodb
diff options
context:
space:
mode:
authorDean Galvin2015-09-16 18:01:41 -0400
committerDean Galvin2015-09-16 18:01:41 -0400
commitffb8ac6ca9fa6be1486820a170ee19981581174b (patch)
tree5ba82d984a0a20c39bd4174119d2bd395d5e8aec /dynamodb
downloadaur-ffb8ac6ca9fa6be1486820a170ee19981581174b.tar.gz
Initial import
Diffstat (limited to 'dynamodb')
-rwxr-xr-xdynamodb32
1 files changed, 32 insertions, 0 deletions
diff --git a/dynamodb b/dynamodb
new file mode 100755
index 00000000000..5842790697d
--- /dev/null
+++ b/dynamodb
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+if [ -a ./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[*]}